From: Matthias B. <ba...@ir...> - 2004-06-25 18:55:02
|
Timothy Stranex wrote: > On Fri, 2004-06-25 at 02:31, brett hartshorn wrote: >>It would be nice to have some fast C functions that can convert ODE's dReals vertices to osg's >>Vec3 vertices and pass that object directly to an osg geode. These functions could then be >>exposed to Python, then we would not have to do the conversion in Python using tuples as the >>middle-man. It sounds like its going to be hard, any ideas? > > A function capable of doing that would need to know the internal > structure of the Python Geode class and the C++ Geode class. To do that, > PyODE would have the added dependencies of both PyOSG and OSG. In my opinion, we should keep PyODE free from additional dependencies. This means the data has to be passed in a library independent way. While musing about the problem a bit I wondered if it's really that essential to pass the data between a 3D engine and PyODE. "Where does the data come from?" I can also ask that question when looking at the 3D engine which doesn't produce the data. I would say it's usually a 3D modeller where the data is produced. So we rather need a way to read the data produced from those modellers. And isn't that the reason why they developed the XODE format? So having an XODE importer might probably be more important than I thought in the beginning. I think the chances are not that bad that there will be plugins for the most popular 3D packages that can export XODE. Another point is, that I think it's not uncommon to have different meshes for rendering and for collision detection. You want to keep the collision meshes as simple as possible to get interactive rates whereas you want the displayed mesh to be as "nice" and smooth as possible. It might even be the case that an entirely different representation is used for rendering such as subdivision surfaces or NURBS patches. Well, I don't say a direct connection to a 3D engine wouldn't be useful, I only thought that there also has to be another way so we can deal with the above points. - Matthias - |