3D Face normals
Moderators: SDS, support, admin
3D Face normals
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
- Attachments
-
- boat2.jpg (56.63 KiB) Viewed 14904 times
Last edited by jimpn on 22 Jul 2011, 23:50, edited 1 time in total.
Re: 3D Face normals
Hello.
There isn't a property to indicate winding order of vertices. Winding order (clock-wise or counter clock-wise) generally defines if we’re looking at 3DFace front or its back. Possibly the issue you have described depends on light source instead the winding order. Please send any file that shows the mentioned issue to support@cadsofttools.com for testing.
CAD Import .NET handles polygonal meshes that represented as a variant of TsgDXFPolyLine entity. However regions and surfaces not supported.
Alexander.
There isn't a property to indicate winding order of vertices. Winding order (clock-wise or counter clock-wise) generally defines if we’re looking at 3DFace front or its back. Possibly the issue you have described depends on light source instead the winding order. Please send any file that shows the mentioned issue to support@cadsofttools.com for testing.
CAD Import .NET handles polygonal meshes that represented as a variant of TsgDXFPolyLine entity. However regions and surfaces not supported.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: 3D Face normals
Hello.
We haven't received incorrectly lit side rails using Viewer demo: Possibly you have customized light sources for rendering? CAD Import .NET current version doesn't support this feature.
Alexander.
We haven't received incorrectly lit side rails using Viewer demo: Possibly you have customized light sources for rendering? CAD Import .NET current version doesn't support this feature.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support