Broken texture when opening door

Software: Away3D 3.x

Manuel L., Member
Posted: 07 October 2011 07:39 AM   Total Posts: 99

Hey guys i have a problem when i try to open a door of my bsptree
project. The door object is splitted and the texture is broken. When
the door is closed it holds two meshes. After i rotated it it holds 4
meshes, which seem to be wrong sorted.
I have created a simple example which shows my problem. Maybe someone
can help me. On the upper left i have a textfield which shows some
information about the rotated object.
Click on the door to open it. Press [3], [4], [5] or [6] to rotate the
meshes of the door separately. This shows where the problem seems to
be.
Hopefully somebody can fix this for me.

http://eyearmedia.de/away3d/error.html

thank you very much :-*

   

Manuel L., Member
Posted: 08 October 2011 06:32 PM   Total Posts: 99   [ # 1 ]

hmm no answer? does nobody know something about this problem? hmmm

   

Manuel L., Member
Posted: 10 October 2011 11:34 AM   Total Posts: 99   [ # 2 ]

hmm last try before i give up ^^
please :(

   

FlashDev2007, Newbie
Posted: 10 October 2011 12:18 PM   Total Posts: 4   [ # 3 ]

All I see is a red screen, no door!

   

Manuel L., Member
Posted: 10 October 2011 02:04 PM   Total Posts: 99   [ # 4 ]

oh sorry ... because of there is no light it seems to be a static picture ... try looking around and you will see the door at one point ^^

   

Avatar
Fabrice Closier, Administrator
Posted: 10 October 2011 07:15 PM   Total Posts: 1265   [ # 5 ]

What happends if the door top is bits lower, are you sure no door geometry intersect the tree geometry?

   

Manuel L., Member
Posted: 11 October 2011 07:34 AM   Total Posts: 99   [ # 6 ]

thank you for your reply fabrice ... the door doesnt intersect with the geometry, but i scaled the door in every axis so that it doesnt fit exactly into the geometry but having space at bottom, left, top and right, so that it is not possible to intersect the geometry anyway. no success ... its still the same issue :-(

   

Manuel L., Member
Posted: 11 October 2011 07:41 AM   Total Posts: 99   [ # 7 ]

walking again through the example posted above, i realized that when going closer to the opened door (where the error occours) and looking around, sometimes the door is shown correctly. its very strange ...

   

Avatar
Fabrice Closier, Administrator
Posted: 11 October 2011 08:28 AM   Total Posts: 1265   [ # 8 ]

What you could do is to rotate the door less than 90 degrees. Say 89.9 or modify the door geometry in its thickness so that its not either exactly perpendicular or parallel to the bsp object. A very little angle diff should be enough to fix this problem and should not be obvious for the eye.
Also make sure that your door do not have bothsides set to true. And that the door geometry do not hold vertices defined along the side of another face.

   

Manuel L., Member
Posted: 11 October 2011 09:11 AM   Total Posts: 99   [ # 9 ]

thank you fabrice ... maybe the problem is that bothsides is set to true, but what shell i do instead? when walking through the door, with bothsides = false the door seem to disappear you know? shell i use a cube instead of a plane for the door?

   

Manuel L., Member
Posted: 11 October 2011 09:32 AM   Total Posts: 99   [ # 10 ]

lets say i solved the problem with the broken texture ... then there is another problem when rotating the door. the door rotates basically around the center point, where the pivotpoint is set by default. the solution should be to move the pivot point before rotating but when i do this the door object gets broken again. it seems that only a part of the object gets the new pivot point ^^

   

Avatar
Fabrice Closier, Administrator
Posted: 11 October 2011 08:05 PM   Total Posts: 1265   [ # 11 ]

The art is to rotate the door without intersecting the bsp model.
if your door is a plane or a cube, simply move its pivot or parse the vertices and move them on their “x” (assuming x is the width axis) about half the width of the mesh.
If its a cube and you have set the pivot point at say “the left side”, make sure the side of the cube do not intersect the wall. Pretty much like in real world.

   

Manuel L., Member
Posted: 12 October 2011 08:30 AM   Total Posts: 99   [ # 12 ]

Right, i know exactly what you mean, but i followed all these rules at modelling. nothing intersects the bsp model, also when rotating the door. i think there is something wrong when setting the pivotpoint.

first question is: do i have to set a new position when changing the pivotpoint? when i only change the pivotpoint value to the left (-x), the door is set to the right (+x).

second question is: does the pivotpoint affect the collision detection? Cause when i change the pivotpoint, i.e. (door.width / 2) to the left, the collsiion detection only works for half of the door.

third question is: where do i have to change the pivotpoint? in my modelling software? in prefab? before adding to the tree? after adding to the tree?

i have three examples for you:
first, without setting any values.
http://eyearmedia.de/away3d/pivot/nothing.html

second, with only setting pivotpoint.x = -400 (door.width = 800).
http://eyearmedia.de/away3d/pivot/onlypivot.html

third, with setting pivotpoint.x = -400 and updating position = -400.
http://eyearmedia.de/away3d/pivot/pivotpos.html

click on the door to open it += 10. please take a look. for me its very strange, but maybe you can get a solution because you know everything about the structure wink

thank you very much :-*

   

Manuel L., Member
Posted: 14 October 2011 06:40 AM   Total Posts: 99   [ # 13 ]

Last try: any ideas?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X