I presume the problem geometry has Normal's defined correctly ? 

Best Regards 

 

Gordon

__________________________________________________________

Gordon Tomlinson
Email         : [EMAIL PROTECTED]
YIM/AIM       : Gordon3dBrit
MSN IM        : [EMAIL PROTECTED]
Website       : www.3dscenegraph.com
__________________________________________________________

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Northcott
Sent: Saturday, October 14, 2006 2:14 PM
To: [email protected]
Subject: [osg-users] Lighting / Shading problem on program generated
models..

Hi all..

I am attempting to speed up a very large cluster of unit cubes which have
been serving to model the 3D topography of a pipeline scan.. A typical Scene
Graph has some 700,000 unit cubes in it, and millions of point sprites.. The
clusters of unit cubes are still making this sloooooooow though (even with
data optimization, and switching chunks in and out based on their distance
to the viewer)!

I have found that by generating the data for all the cubes using vertices
and groups of Geometry objects that this approach is much faster. Up to
twice as fast for the same data. Coupled with some useful suggestions given
earlier in this mailing list I am now very happy using a hybrid of scaled
point sprites to model data further away from the viewpoint.. alongside
either the older unit cube method, or my new generated method.

Unfortunately... My generated 'models' are very washed out in colour, and
are not shaded, thus appearing flat.
Compared to unit cubes in the same scene graph they are very bland indeed,
and you cannot make out any definition at all.

Similarly, if I try to change the render mode for point sprites, to say
lines, I lose any lighting on the objects and they appear dull and dark.

I have tried lots of different state set settings, as well as looking at the
arrangement of my vertices in my geometry, just in case... I am confused and
think this must be something to do with the way I cam creating the models,
as I cannot see how other models in the same scene graph, at the same level
in the tree, are all rendered perfectly shaded and lit.

I am obviously missing something and wondered if anyone can tell me where my
problem may lie..

To clarify for my generated models I have followed very closely the pyramid
example distributed with OSG. Instead of making triangles I am making lots
and lots of cuboids, and attaching a colour array.

Thanks for any help..

Kind regards,
Stephen.


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to