[osg-users] Computing Normals for Drawables
Jean-Sébastien Guay
jean-sebastien.guay at cm-labs.com
Fri Nov 6 08:55:41 PST 2009
Hi James,
> If I turn normals off I see a sigificant reduction in the amount of memory in use, hence I am currently looking at implementing a visitor to compute 1 normal per triangle which would still give the appearance I need and reduce the memory load.
As Simon mentioned, using per primitive bindings drop you down to OpenGL
slow paths, so if you have a large number of drawables you will surely
see a performance hit. Additionally, one normal per primitive will mean
that you will have a faceted look which may not be what you want.
You may find that in your case, you just have to bite the bullet and
accept the higher memory usage.
You could of course reduce the number of vertices your geometry has.
Otherwise, a possible alternative would be using PagedLOD with objects
split up into various LODs so that when objects are further away, they
have less geometry, and when they're closer up OSG automatically loads
up the more refined version (and would expire and unload the lower res
version eventually). But then the scene graph structure becomes a bit
more complicated.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
More information about the osg-users
mailing list