Export physics
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2011 at 06:20, xxxxxxxx wrote:
I want to export physics scenes from C4D, I used *.bullet exporter, but bullet almost always crashes trying to load exported models(I fought with him a lot and dropped finally). So I have two questions:
- Is it possible to acquire COLLADA export plugin sources, so I can extend it to export physics.
- Is it possible to write physics export plugin (preferably in Python)? I can't find in SDK functionality to obtain physics properties.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2011 at 08:44, xxxxxxxx wrote:
-
Sorry, it's not possible to obtain the source code.
-
You can write your own exporters in Python. They are derived from the ScreenSaverData class. There is an example included in the Python docs (Py-IES Meta). What you export is really up to you. For instance you could step through an animated scene and export the current state of the scene for each frame.
cheers,
Matthias -
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2011 at 12:12, xxxxxxxx wrote:
Thank you for reply Matthias.
I wrote simple export plugin, but I still can't find in SDK functions to obtain rigid body properties(mass, transformation), collision shapes(e.g. type=CYLINDER, height = 10.0, radius = 1.0), constraints, etc.
I've marked on the screenshot wanted information:
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2011 at 12:39, xxxxxxxx wrote:
The descriptions in "Dynamics Body" belong to the attached dynamics tag.
Example:
dynamics_tag=op.GetTag(180000102) if not dynamics_tag: return print dynamics_tag[c4d.RIGID_BODY_TRIGGER] #trigger
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2011 at 04:48, xxxxxxxx wrote:
Originally posted by xxxxxxxx
The descriptions in "Dynamics Body" belong to the attached dynamics tag.
Example:
dynamics_tag=op.GetTag(180000102) if not dynamics_tag: return print dynamics_tag[c4d.RIGID_BODY_TRIGGER] #trigger
Thanks, this helped a lot.
I use "CINEMA 4D R12\modules\dynamics2\res\description\dynrigidbodytag.res" as the description for the dynamic tag. But the description is insufficent. E.g. there is only specification of the shape type of the rigid body, but not the geometry. Is there a way to retreive shape extent and other spatial information?
LONG RIGID_BODY_SHAPE {CYCLE {RIGID_BODY_SHAPE_DEFAULT; RIGID_BODY_SHAPE_DEFAULT_MODYNAMICS; RIGID_BODY_SHAPE_BOX; RIGID_BODY_SHAPE_ELLIPSOID; RIGID_BODY_SHAPE_CYLINDER_X; RIGID_BODY_SHAPE_CYLINDER_Y; RIGID_BODY_SHAPE_CYLINDER_Z; RIGID_BODY_SHAPE_CONVEX_HULL; RIGID_BODY_SHAPE_KINETIC_MESH; RIGID_BODY_SHAPE_STATIC_MESH; RIGID_BODY_SHAPE_REFERENCE; RIGID_BODY_SHAPE_NO_SHAPE;};} STATICTEXT {JOINENDSCALE;}