[osg-users] [osgPlugins] Need help with setting/calculating normals

Daniel Lecklider lecklider_daniel at bah.com
Tue Jun 28 17:52:14 PDT 2016


Hi,

First of all I am new to OSG so forgive me if I am making any mistakes.

I am creating a plugin for a proprietary 3d model format that we use at my work. These model files only contain grid points and unsorted primitives such as TRI's and QUADs.

Currently when I create the model I am not setting normals since non are provided by the file format. So I used the smoothing visitor to calculate the normals for me. However when I do this I get weird white spots all over model when I rotate it and look at it.

It seems like this really occurs when there is a 2d shape that is outjutting into 3d space. (Essentially has no or almost no width).

Is there any way I can calculate the proper normals, even though they are not given? Or is there any way to fix this rendering issue.

And do not worry about the models color, each section has its own section to denote different things for our clients.

Thank you!

Cheers,
Daniel

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67888#67888




Attachments: 
http://forum.openscenegraph.org//files/osg2_109.png
http://forum.openscenegraph.org//files/osg1_115.png





More information about the osg-users mailing list