Hi Marko,

I just returned from a long time rest after my book published. And I'm
thinking of implementing a flexible integration of OSG and different
physics engines, too, for the 3.1 releases (not coming yet). :-)

My plan is to make use of update callbacks instead of creating new
types of nodes. Using callbacks is noninvasive to the scene graph, and
can also benefit from the serialization functionalities. It will be
much better if we could thus make use of the database pager and
load/unload physics attributes as node callbacks in real-time. Another
idea in my mind is to use plugins to support different physics engines
like ODE, Bullet, Newton, PhysX, etc. An abstract layer is required
then, and physics engines will re-implement the layer in plugins with
their own APIs.

I'm going to start working on an initial support after the Chinese
spring festival (Feb. 2 - Feb.9). Before that I'll focus on making OSG
work with Flash and the new RTX format, as well as preparing for the
holiday celebration and my wedding schedule. :-)

Cheers,

Wang Rui


2011/1/11 Marko Srebre <marko.sre...@gmail.com>:
> Hello,
>
> I am considering the overall design of how physics engine should be 
> integrated with OSG if I wanted to support complete serialization (load/save) 
> of both OSG nodes and the physics state. With new dev versions there is 
> serialization support for OSG and let us assume we can can somehow dump the 
> physics engine state. I am wondering how should it all be implemented.
>
> One idea I have is, the physics world could be implemented as an OSG node so 
> it could be serialized by osg standards as a part of a scene graph. However, 
> I am not sure this is a good design, putting something like that into a osg 
> node, since it hasn't got anything to do with rendering. Also, this node 
> would have rigid bodies and collision shapes which in turn need references to 
> other nodes (not necessariliry children) which are used as a graphics 
> representation of physics objects in the scene graph for position/attitude 
> updates. So it is all interconnected, and such references would need to be 
> restored upon state load.
>
> The other solution would be to keep physics out of the scene graph... that 
> way osg serialization support cannot be used for physics state. If physics 
> engine had any serialization that could be used, but there would still need 
> to be a "register" that knows how to connect appropriate physics bodies to 
> OSG nodes after both states have been restored.
>
> I would appreciate any suggestions and ideas, or if anyone has experience to 
> share regarding this topic. Thanks.
>
> Cheers,
> Marko
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=35517#35517
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to