Re: [osg-users] OSG, physics serialization
Well, it's not PhysX, but there is osgBullet: http://code.google.com/p/osgbullet/ (http://code.google.com/p/osgbullet/) I don't know if it has the particle fluids capability you need though. [/quote] Bullet doesn't have particle fluids that are integrated with rest of the engine (i.e. interactions/collisions with other geometry), which is why I need PhysX. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46778#46778 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG, physics serialization
> > has any work been done in this direction yet? I need to port an > application using Nvidia PhysX (esp. particle fluids) to OSG in the next > few weeks and I wonder if there is anything better than this demo ( > http://forum.openscenegraph.org/viewtopic.php?t=1101&highlight=physx) > from 2009 to base my code on > > Well, it's not PhysX, but there is osgBullet: http://code.google.com/p/osgbullet/ I don't know if it has the particle fluids capability you need though. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG, physics serialization
Hi, has any work been done in this direction yet? I need to port an application using Nvidia PhysX (esp. particle fluids) to OSG in the next few weeks and I wonder if there is anything better than this demo (http://forum.openscenegraph.org/viewtopic.php?t=1101&highlight=physx) from 2009 to base my code on Thank you! Cheers, Karan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46776#46776 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG, physics serialization
On 1/11/2011 1:53 AM, Marko Srebre wrote: 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. osgBullet provides some rudimentary support for this with PhysicsState.cpp/.h and CreationRecord.cpp/.h. PhysicsState stores the current physics state for bodies in motion (transform, linear velocity, etc). CreationRecord stores information needed to create a Bullet rigid body and collision shape after a restore. This pair of classes gives you the minimum information to save and recreate a single Bullet rigid body (and associated collision shape). I have used this successfully in some closed-source code to save a physics simulation in the "middle of the action", exit, restart and reload, and continue with the physics simulation exactly where I left off. Yes, you still need to associate the physics data with the OSG visual representation, but generally applications need to associate a lot of data with individual scene elements, so presumably this is a problem your app has already solved. osgBullet currently doesn't have any examples that show how to do this save/restore, but contributions are welcome. FYI: osgbullet.googlecode.com -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG, physics serialization
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 : > 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
[osg-users] OSG, physics serialization
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