Re: [osg-users] LOD for stateset

2009-08-13 Thread Paul Martz
Use an LOD node. Add child Group nodes and attach a different StateSet to each. Then attach your model as a child to each Group. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 Rabbi Robinson wrote: Hi, What is the best approach to change stateset based o

Re: [osg-users] LOD for stateset

2009-08-13 Thread Jason Daly
Rabbi Robinson wrote: Hi, Is there quick way I can get the distance from the camera or I need to save or reference to the position of the camera each frame and use that to compute the distance? Thank you! I'm sure there's a way. I don't know exactly what it is off the top of my head, an

Re: [osg-users] LOD for stateset

2009-08-13 Thread Rabbi Robinson
Hi, Is there quick way I can get the distance from the camera or I need to save or reference to the position of the camera each frame and use that to compute the distance? Thank you! Cheers, Rabbi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=1

Re: [osg-users] LOD for stateset

2009-08-13 Thread Jason Daly
Rabbi Robinson wrote: Hi, What is the best approach to change stateset based on the distance between the object and the camera? You could attach an update callback to the StateSet in question. The callback could compute the distance and adjust the state as needed. You could also duplic

[osg-users] LOD for stateset

2009-08-13 Thread Rabbi Robinson
Hi, What is the best approach to change stateset based on the distance between the object and the camera? Thank you! Cheers, Rabbi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16205#16205 ___ os