3D Face normals
Posted: 18 Jul 2011, 02:23
I'm using CADImport.net to read in dwg files and display the contents with opengl. This is working really well but I have one niggle/problem.
In order to display 3ds models correctly that have been constructed with 3d Solids I'm using the 3dsout and 3dsin commands via autocad and then exploding to convert the model into 3d faces. This works just fine and my model appears.
However some of the faces are incorrectly lighted due to the winding mode of the polygons being different. its only a couple in a model but results in bright or dark spots. Of course I can't correct these as I have no idea whether they are the other side of the model or not. However autocad renders them correctly?
I can see that the triangles are in a different winding order but I have no idea why and I can't see anything that would tell me the winding order of the 3d face?
So my questions are:
1.) Is there a property to indicate the winding mode?
2.) Why can't import.net handle polygonmesh? i.e why do i have to do 3dsout and 3dsin?
3.) Why is autocad able to handle the incorrect winding order?
I have tried the opengl sample in the downloads but this actually renders less than what I have got so far.
Any help or hints (even if thats autocad hints on how to resolve incorrect winding order) would be very much appreciated.
Cheers,
James