3D Face normals

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
jimpn
Posts: 1
Joined: 18 Jul 2011, 02:12

3D Face normals

Post by jimpn » 18 Jul 2011, 02:23

View 1 showing incorrectly lit side rails
View 1 showing incorrectly lit side rails
boat1.jpg (65.94 KiB) Viewed 14904 times
Hi,

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
boat2.jpg (56.63 KiB) Viewed 14904 times
Last edited by jimpn on 22 Jul 2011, 23:50, edited 1 time in total.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: 3D Face normals

Post by support » 19 Jul 2011, 12:54

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: 3D Face normals

Post by support » 25 Jul 2011, 11:25

Hello.
We haven't received incorrectly lit side rails using Viewer demo:
boat1.jpg
boat1.jpg (127.42 KiB) Viewed 14889 times
boat2.jpg
boat2.jpg (139.64 KiB) Viewed 14889 times
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

Post Reply