Jan Ciger wrote:
> I was thinking about the same issue because we would like to move over
> to a COLLADA-based production pipeline. What would be good enough is a
> possibility to register a callback to be called, whenever an object is
> loaded, passing the root node of the corresponding DOM subtree. Then it
> would be easy to parse out the required parts, either manually or using
> the COLLADA DOM and feed them into the physics engine.
>   
Yes, I agree. It should mainly be a matter of modifying the collada 
reader slightly so that
it allows for the callbacks and hooks necessary for integration with a 
physics engine.
> I do not believe that the Collada loader for OSG will ever support
> physics - it doesn't really make sense, OSG is a scene graph and physics
> could be implemented in many different ways.
>   
No, and it shouldn't. The question is how it can be best adapted for 
efficient integration with a
physics engine - and if this adaption can be submitted to the cvs. It 
shouldn't be a problem
I think, but might require some slight changes in the design of the 
plug-in strategy to open for
these types of hooks/callbacks. Will look into the actual code next week...
>> Of course the same questions apply for a collada exporter..
>>     
>
> For example, the Blender exporter for Collada exports physical
> properties too (e.g. the collision bounding volumes and masses).
> However, that is likely because Blender includes its own physics engine
> already.
>   
Yes, but I meant something else. A physics/graphics based simulator 
should be able to dump
its state into a collada file (like osg is able to dump a state into an 
osg-file).
So, if one would develop a Collada exporter for OSG, one should also be 
able to use hooks/callbacks
to the same exporter so that the physics engine can dump the state of 
the physics scene.

Of course, the above strategy means that the physics engine will depend 
on osg for it's collada
reader/writer, rather than having it's own support for collada. This is 
also slightly frustrating,
since a physics engine should be open for integration with any graphics 
library - but I guess
I can live with it, since it would still solve most of our problems.

/Kenneth


-- 
Kenneth Bodin, HPC2N
Director VRlab
UmeƄ University, Sweden
[EMAIL PROTECTED]

Philosophy of science is about as useful
to scientists as ornithology is to birds.
-- Richard P. Feynman

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to