Note: You must be registered in order to post a reply.
|
Wackedout1 |
Posted - Aug 24 2005 : 12:37:23 PM I'm working on an Editor for the game GTA San Andreas.
I decided to try and make a 3D preview, with some hard work I got the file format decoded and drawn. But before I even got to mess with textures my object was showing up transparent. (Only when Light is enabled)
Here is an example...
I have tried to setting CULLMODE to NONE/CW/CCW and they all have diffrent effects.
I have also played with the ambient colors setting it to "1" makes it solid with no shading and anything less makes it transparent. Also some things show up on the wrong side (can see the opposite door threw the one on the side your looking at)
So dose anyone know what i can check to see what else could be wrong. |
Eric Coleman |
Posted - Aug 25 2005 : 08:14:10 AM Well, it looks like the winding order is reversed on the doors on the back of your trailer. When creating triangles in any software package, it is important make sure your triangles' vertices are created in the correct order, either clockwise or counter-clockwise.
This order allows directx and opengl to discard (not draw) triangle that are facing away from the camera. When you're in front of a triangle it is drawn, when you're behind it then it is not drawn. The "front" and "back" of a triangle is determined by the winding order of the vertices of the triangle.
By setting the cullmode to NONE then the test for front/back of a triangle is ignored and all triangles are drawn. The CW and CCW values allow you to determine which winding order you want to draw and discard.
As for seeing object through other objects, you might want to make sure you're using a Z-buffer. |
Spodi |
Posted - Aug 25 2005 : 12:24:24 AM No idea of what could be wrong. You can also try posting in some of the more "active" forums. :)
Game Programming Wiki Forum (VB): http://gpwiki.org/forums/viewforum.php?f=1
Xtreme Visual Basic Forum (where all the pros hang out :p): http://visualbasicforum.com/ |
|
|
VBGamer |
© |
|
|
|
|