Hello,

  did you have performance problems having 120.000 stars? I don't know how
do you achieve it (i'm new and i don't know to much things). Can you use LOD
nodes ? LOD nodes let you have each children draw only at certain distances
criteria. Something like:

  - Point : Very far.
  - Point Smooth : far.
  - Point Sprite: near.
  - Sphere: Very near.

 This can let OSG make the changes for you.

2007/7/16, Benjamin Cabut <[EMAIL PROTECTED]>:

 Hello,

    I am working on a bench application that do this:
    using DepthPartitionNode, I fly in a starfield.

    Stars are Point, Point Smooth or Point Sprite dependind magnitude
(calculated depending distance)
    I want to be able to draw 3D Sphere (and in the future more complex
object) when I am near enough to a star.

    I tryed in the update of this StarsCatalog Object to add a Child to my
SceneRoot when I'm close to a star, but as soon as I go in the "travers"
application crash...
    I don't understand why... I tough update was done for this, dynamic
modification, so I tough it was possible to dynamicaly add an object to the
scene.

    Is it forbiden to change the scene graph in an update function? is
there limitations?
    Is it the best way to do what I want or do you think of another
technics?

    I tought to instance one or two spheres and change the MatrixTransform
when needed in the Updates, but I would like to know if you have better
idea...

    The scene has got currently 120000 Stars but should go to 4 000 000...

    Regards.


CABUT Benjamin

_______________________________________________
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