[osg-users] Paul, Another FLT Export BUG.

Argentieri, John-P63223 John.Argentieri at gdc4s.com
Mon Sep 15 07:26:41 PDT 2008


Paul,
 
No, I was not aware of this. However, I am using BIND_PER_PRIMITIVE with
osgUtil::DelaunayTriangulator/DelaunayConstraint as in the osgdelaunay
example. Since I can quickly get the triangles, I just have to
cross-multiply and normalize to get each primitive normal.
 
The other thing that I could to is calculate the normals in the same way
as above, but assign one to each vertex in a map. Then if a vertex is a
part of two triangles, I could add the new triangle's normal and divide
by two.
 
In fact, I'll probably use the strategy above. Thank you for your help
and your time, Paul.
 
Have a great week! Your pal,
John
 
________________________________

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Paul
Martz
Sent: Sunday, September 14, 2008 4:36 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] Paul, Another FLT Export BUG.


By the way, are you aware that BIND_PER_PRIMITIVE is the least efficient
way to render in OSG? There is no OpenGL vertex arrays equivalent for
this, so the best OSG can do to support it is specify slow path
glBegin/glEnd calls stored in a display list. If you can fix your data
to not use BIND_PER_PRIMITIVE, not only would you avoid this issue in
the FLT exporter, but you'd also potentially experience a performance
boost (depending on where your bottleneck is).
 
In fact, the reason this bug is in the exporter is probably because I
didn't test BIND_PER_PRIMITIVE, thinking that no one really uses that
binding anyway. (At least, no one who cares about performance uses it.)
   -Paul
 


________________________________

	From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
Argentieri, John-P63223
	Sent: Friday, September 12, 2008 2:49 PM
	To: osg-users at openscenegraph.org
	Subject: [osg-users] Paul, Another FLT Export BUG.
	
	

	Paul, 

	We've found another FLT export BUG which happens when geometry
normal bind mode is BIND_PER_PRIMITIVE. It looks like it's trying to
convert the normal array to BIND_PER_VERTEX, but it fails. Here's our
example:

	<<test.osg>> 
	In osgviewer, look at the surface and toggle both lighting
modes. Then convert and do the same. 

	I hope that helps! Your pal, 

	John Argentieri 
	General Dynamics C4 Systems 
	Battle Management Systems Division 
	Software Engineer 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080915/535c4b6f/attachment-0003.htm>


More information about the osg-users mailing list