Crystal Space
Welcome, Guest. Please login or register.
November 26, 2014, 09:33:56 pm

Login with username, password and session length
Search:     Advanced search
9026 Posts in 2046 Topics by 9140 Members
Latest Member: Corrycrifford
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Problem designing a project
« previous next »
Pages: [1] Print
Author Topic: Problem designing a project  (Read 3697 times)
eversor
Guest


Email
« on: July 18, 2005, 08:07:02 am »

Hi! I am designing a level for my app and i've got a problem when i load it in walktest (well, i've got the problem using my app either)
The problem occurs when i load the level, i can see through the walls (but only through some of them). I don't know what is the problem (i think it is something missiing)
this is the link to the code: http://rafb.net/paste/results/dyZxDt13.html

P.D. I haven't define a wall for the roof, can it be the problem? Thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: July 18, 2005, 08:11:10 am »

Hi! I am designing a level for my app and i've got a problem when i load it in walktest (well, i've got the problem using my app either)
The problem occurs when i load the level, i can see through the walls (but only through some of them). I don't know what is the problem (i think it is something missiing)
this is the link to the code: http://rafb.net/paste/results/dyZxDt13.html

P.D. I haven't define a wall for the roof, can it be the problem? Thanks

You are aware that a polygon has only one side? i.e. you can only see the polygon from one direction (i.e. the direction from which the vertices are oriented in clock wise order). So make sure all vertices are oriented correctly.

Greetings,
Logged
eversor
Guest


Email
« Reply #2 on: July 18, 2005, 11:09:44 am »

I don't know exactly if the problem is because of the vertex (if i don't use the clock wise the walls won't  appear) but when i load a cal3d character in a room i can see it through some walls (but not through others) so the problem would be only in some parts, can you explain me something about that or telling me where can i find some information about that?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: July 18, 2005, 11:12:41 am »

I don't know exactly if the problem is because of the vertex (if i don't use the clock wise the walls won't  appear) but when i load a cal3d character in a room i can see it through some walls (but not through others) so the problem would be only in some parts, can you explain me something about that or telling me where can i find some information about that?

Hmm... I think you need to show me a screenshot of the effect. I'm not sure I understand your problem exactly.

Greetings,
Logged
eversor
Guest


Email
« Reply #4 on: July 18, 2005, 12:49:38 pm »



As you can see, the wall on the right should last until the green line, but you can see the room behind it (and obviously you shouldn't)

Thanks.
Logged
eversor
Guest


Email
« Reply #5 on: July 19, 2005, 06:19:22 pm »

I have tried to change the vertex another time but i still can see through the walls. I think the problem is designing the room but i can't find out where the problem is, so if someone can help me or give some ideas i will be grateful.
Logged
deckerego
Full Member
***
Posts: 149


View Profile WWW
« Reply #6 on: July 20, 2005, 01:37:23 pm »

Five bucks says your normals are inverted. What did you use to create the map (i.e. Blender, notepad, etc)
Logged
eversor
Guest


Email
« Reply #7 on: July 22, 2005, 10:22:16 am »

I write the map using the notepad. I've based it on the one described in the community articles section
Logged
deckerego
Full Member
***
Posts: 149


View Profile WWW
« Reply #8 on: July 22, 2005, 03:45:34 pm »

That would lead me to think that the vertexes are out of order... it matters what order you add your vertexes, since the order determines which way the normal of your polygon faces.

If you like, post either the tutorial you're working through (I think there are three on the community site) or the XML for your map.
Logged
eversor
Guest


Email
« Reply #9 on: July 24, 2005, 05:48:39 pm »

Here is my code:

<world>
   <textures>
      <texture name="oldmetal">
         <file>/lib/stdtex/oldmetal.jpg</file>
      </texture>
      <texture name="marmol">
         <file>/lib/stdtex/andrew_marble4.jpg</file>
      </texture>
   </textures>
   <shaders>
      <shader>
         <file>/shader/std_lighting_detail.xml</file>
      </shader>
   </shaders>
   <materials>
      <material name="oldmetal">
         <texture>oldmetal</texture>
         <shader type="standard">std_lighting_detail</shader>
         <shadervar name="tex detail" type="texture">oldmetal</shadervar>
         <shadervar name="detail texture scale" type="vector2">10,10</shadervar>
      </material>
      <material name="marmol">
         <texture>marmol</texture>
         <shader type="standard">std_lighting_detail</shader>
         <shadervar name="tex detail" type="texture">marmol</shadervar>
         <shadervar name="detail texture scale" type="vector2">10,10</shadervar>
      </material>
   </materials>
   <sounds>
      <sound name="tada.wav">
         <file>/lib/std/tada.wav</file>
      </sound>
   </sounds>
   <library>/lib/std/library</library>
   <plugins>
      <plugin name="thing">crystalspace.mesh.loader.thing</plugin>
      <plugin name="thingFact">crystalspace.mesh.loader.factory.thing</plugin>
   </plugins>
   <meshfact name="walls">
      <plugin>thingFact</plugin>
      <params>
      <v x="0" y="0" z="0"/>
      <v x="-18" y="0" z="0"/>
      <v x="-18" y="0" z="-22"/>
      <v x="2" y="0" z="-22"/>
      <v x="0" y="5" z="0"/>
      <v x="-18" y="5" z="0"/>
      <v x="-18" y="5" z="-22"/>
      <v x="2" y="5" z="-22"/>
      
      <v x="22" y="0" z="-22"/>
      <v x="22" y="0" z="-31"/>
      <v x="3" y="0" z="-31"/>
      <v x="22" y="5" z="-22"/>
      <v x="22" y="5" z="-31"/>
      <v x="3" y="5" z="-31"/>
      
      <v x="-15" y="0" z="-31"/>
      <v x="-31" y="0" z="-31"/>
      <v x="-31" y="0" z="-22"/>
      <v x="-15" y="5" z="-31"/>
      <v x="-31" y="5" z="-31"/>
      <v x="-31" y="5" z="-22"/>
      
      <v x="8" y="0" z="-55"/>
      <v x="-15" y="0" z="-55"/>
      <v x="8" y="5" z="-55"/>
      <v x="-15" y="5" z="-55"/>
      
      <v x="29" y="0" z="-52"/>
      <v x="29" y="0" z="-58"/>
      <v x="11" y="0" z="-60"/>
      <v x="29" y="5" z="-52"/>
      <v x="29" y="5" z="-58"/>
      <v x="11" y="5" z="-60"/>
      
      <v x="-9" y="0" z="-60"/>
      <v x="-31" y="0" z="-60"/>
      <v x="-31" y="0" z="-55"/>
      <v x="-9" y="5" z="-60"/>
      <v x="-31" y="5" z="-60"/>
      <v x="-31" y="5" z="-55"/>
      
      <material>oldmetal</material>
      <texlen>4</texlen>
      <p name="suelo1">
         <v>3</v><v>2</v><v>1</v><v>0</v>
      </p>
      <p name="back_suelo1">
         <v>0</v><v>1</v><v>5</v><v>4</v>
      </p>
      <p name="dcha_suelo1">
         <v>3</v><v>0</v><v>4</v><v>7</v>
      </p>
      <p name="izq_suelo1">
         <v>6</v><v>5</v><v>1</v><v>2</v>
      </p>
      
      <p name="suelo2">
         <v>9</v><v>10</v><v>3</v><v>8</v>
      </p>
      <p name="back_suelo2">
         <v>8</v><v>3</v><v>7</v><v>11</v>
      </p>
      <p name="dcha_suelo2">
         <v>9</v><v>8</v><v>11</v><v>12</v>
      </p>
      <p name="front_suelo2">
         <v>12</v><v>13</v><v>10</v><v>9</v>
      </p>
      
      <material>marmol</material>
      <texlen>4</texlen>
      <p name="suelo3">
         <v>10</v><v>14</v><v>2</v><v>3</v>
      </p>
      
      <material>oldmetal</material>
      <texlen>4</texlen>
      <p name="suelo4">
         <v>14</v><v>15</v><v>16</v><v>2</v>
      </p>
      <p name="back_suelo4">
         <v>2</v><v>16</v><v>19</v><v>6</v>
      </p>
      <p name="izq_suelo4">
         <v>18</v><v>19</v><v>16</v><v>15</v>
      </p>
      <p name="front_suelo4">
         <v>17</v><v>18</v><v>15</v><v>14</v>
      </p>
      
      <material>oldmetal</material>
      <p name="suelo5">
         <v>20</v><v>21</v><v>14</v><v>10</v>
      </p>

      <p name="dcha_suelo5">
         <v>20</v><v>10</v><v>13</v><v>22</v>
      </p>
      
      <p name="izq_suelo5">
         <v>23</v><v>17</v><v>14</v><v>21</v>
      </p>
      
      <material>marmol</material>
      <p name="suelo7">
         <v>26</v><v>30</v><v>21</v><v>20</v>
      </p>
      
      <material>oldmetal</material>
      <p name="suelo6">
         <v>25</v><v>26</v><v>20</v><v>24</v>
      </p>
      <p name="back_suelo6">
         <v>24</v><v>20</v><v>22</v><v>27</v>
      </p>
      <p name="dcha_suelo6">
         <v>25</v><v>24</v><v>27</v><v>28</v>
      </p>
      <p name="front_suelo6">
         <v>28</v><v>29</v><v>26</v><v>25</v>
      </p>
      
      
      <p name="suelo8">
         <v>30</v><v>31</v><v>32</v><v>21</v>
      </p>
      <p name="back_suelo8">
         <v>21</v><v>32</v><v>35</v><v>23</v>
      </p>
      <p name="izq_suelo8">
         <v>34</v><v>35</v><v>32</v><v>31</v>
      </p>
      <p name="front_suelo8">
         <v>33</v><v>34</v><v>31</v><v>30</v>
      </p>
      </params>
   </meshfact>
   <start>
      <sector>room</sector>
      <position x="-10" y="4" z="-5" />
   </start>
   <sector name="room">
   <portals>
      <portal name="port1">
         <v x="7.9" y="0" z="-55"/>
         <v x="2.9" y="0" z="-31"/>
         <v x="2.9" y="5" z="-31"/>
         <v x="7.9" y="5" z="-55"/>
         <wv x="1" y="0" z="0" />
         <ww x="0" y="0" z="0" />
         <sector>ayuntamiento</sector>
         <ww x="-1" y="0" z="0" />
      </portal>
      <priority>object</priority>
   </portals>
      <meshobj name="walls1">
         <plugin>thing</plugin>
         <zfill />
         <params>
            <factory>walls</factory>
         </params>
      </meshobj>
   <light name="light_suelo1">
      <center x="-10" y="1" z="-5" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   <light name="light_suelo2">
      <center x="15" y="1" z="-26" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   <light name="light_suelo3">
      <center x="-10" y="1" z="-27" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   <light name="light_suelo4">
      <center x="-23" y="1" z="-26" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   <light name="light_suelo5">
      <center x="-10" y="1" z="-42" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   <light name="light_suelo7">
      <center x="0" y="1" z="-58" />
      <radius>60</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   </sector>
   
   <sector name="ayuntamiento">
      <portals>
         <portal name="port1">
            <v x="8.1" y="5" z="-55"/>5 22
            <v x="3.1" y="5" z="-31"/>3 13
            <v x="3.1" y="0" z="-31"/>1 10
            <v x="8.1" y="0" z="-55"/>4 20
            <wv x="1" y="0" z="0" />
            <ww x="0" y="0" z="0" />
            <sector>room</sector>
            <ww x="1" y="0" z="0" />
         </portal>
         <priority>object</priority>
      </portals>
      <meshobj name="walls_ayunt">
         <plugin>thing</plugin>
         <zfill />
         <params>
            <v x="22" y="0" z="-31"/>0 9
            <v x="3" y="0" z="-31"/>1 10
            <v x="22" y="5" z="-31"/>2 12
            <v x="3" y="5" z="-31"/>3 13
            <v x="8" y="0" z="-55"/>4 20
            <v x="8" y="5" z="-55"/>5 22
            <v x="29" y="0" z="-52"/>6 24
            <v x="29" y="5" z="-52"/>7 27
            
         <material>marmol</material>
         <p name="suelo2">
            <v>6</v><v>4</v><v>1</v><v>0</v>
         </p>
         <p name="techo">
            <v>5</v><v>7</v><v>2</v><v>3</v>
         </p>
         <p name="back_suelo2">
            <v>0</v><v>1</v><v>3</v><v>2</v>
         </p>
         <p name="dcha_suelo2">
            <v>6</v><v>0</v><v>2</v><v>7</v>
         </p>
         <p name="front_suelo2">
            <v>7</v><v>5</v><v>4</v><v>6</v>
         </p>
         </params>
      </meshobj>
   <light name="light_suelo1">
      <center x="15" y="1" z="-40" />
      <radius>30</radius>
      <color red="2" green="2" blue="2" />
      <dynamic />
   </light>
   </sector>
</world>
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.337 seconds with 16 queries.