Hi Dirk,
Thank you very much for your answer.
On Thu, May 8, 2008 at 10:53 AM, Dirk Reiners wrote:
>
> > I've already done a decent amount of research. I also searched this list
> and
> > found the wiki page http://opensg.vrsource.org/trac/wiki/HDI/HugeScenes-
> > but it was not terribly helpful.
>
> Yeah, on your problem essentially it says: use offsets instead of absolute
> positions.
Yes, but I don't think it would work well anyway. For a moving camera, it
means I would have to update the transform matrices of hundreds of objects
every couple of frames.
I can imagine how that would kill performance in a cluster (having to
transfer all matrices to all nodes), and distribution is the main reason why
we chose OpenSG.
It would be much better if we could update just a single DoubleTransform
enclosing the whole scene, or something like that.
> It seems that our problem would be solved if we could use double-precision
> > floats for the camera; or have a DoubleTransform somewhere in the
> > scenegraph, and have the render traversal accumulate the matrices using
> > double-precision.
>
> ...and do all the math related to that (bounding volumes, frustum culling,
> box,
> plane, line primitives etc.) in double precision, too.
You find it tiring, I find it scary (wouldn't know where to begin) :-)
> It seems you have already considered adding DoubleTransforms to OpenSG,
> but
> > later the idea was dumped.
> > I must ask: why?
>
> The problem is the cost. The transformations themselves are not too
> expensive,
> but the bounding box and culling parts are used very often, and in many
> different operations, so just switching them to double would have a
> noticeable
> impact. So you can't just do that, you have to support both single and
> double
> versions of everything, and have a semi-intelligent way to switch between
> them.
> In the end it seemed like a pretty serious amount of work, and only rather
> few
> people were interested in it. As the page says we might revisit that for 2,
> but
> unless there is a fairly clear interest form the users it might not be all
> that
> high up in the priority list.
>
Sorry for asking, but: are you sure the cost is that bad? I'd done float vs
double tests some years ago and found doubles to be only slightly slower. I
always thought the main problem was the extra memory cost, but I don't know
how bad that would be for a scene graph (if you don't use doubles for
geometry). There are many physics engines out there that use doubles for
everything (and they do a LOT of math per frame).
> If you don't think DoubleTransforms are really important,
> do you know any other decent way to solve our precision problems?
There's no trivial way to do it. However, if your system is built
> intelligently
> it's not all that hard.
>
> Most people that have these scenarios use some tiling mechanism (i.e. have
> tiles
> of geometry that are paged in and out instead of one gigantic scenegraph),
> where
> inside the tiles float precision is fine, and only the whole tile is moved
> around with a high precision transform. If that's the case you can keep the
> viewpoint yourself in double, and just update the tile matrices with the
> difference of their real position and the viewpoint for every frame,
> essentially
> keeping the viewpoint fixed and moving the world underneath it. That way
> you
> keep the precision where you need it (around the viewer), and you don't see
> it
> where it's lost (far away).
OK, but how about distributed visualizations? The cost of moving every
object in the scene is probably too high.
Also, I have my doubts which one is more complex: to model a seamless tiled
world using OpenSG as-is, or changing OpenSG to use doubles at critical
places (like OpenSceneGraph).
It can be very hard to model a seamless tiled world, and if you want to get
good precision within a tile it can't be much large. Some of our
buildings/plants would have to be split in multiple tiles, so we would have
to deal with splitting geometry and simulations, not only scene graph
nodes...
It would be much nicer if we could throw in doubles where it matters :-)
Thanks for the discussion and any additional help.
-- Thiago
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users