odejava and xith objects

Hi

I want to have an easy way of creating xith3d and odejava objects that fit together and maybe with the odejava objects being a bit simplified. For now I’ve created an exporter for 3dsmax which exports a xith3d representation and another one which creates the odejava rep. To link both representations, so the xith model does what the odejava does, I used a simple hand edited file. This worked pretty fine, becuase I could create the Odejava bounds above the xith3d model. But it has some serious disadvantages:

  1. I can’t use it in linux (I’ve switched to linux - so this is pretty serious)
  2. It’s 3dsmax dependent.
  3. I’m using a homebrewed bugging fileformat.

How do you guys do this?

Arne

PS: I’m want to use blender3d now and any ideas of how to port maxscript to blender would also be nice. (I dont know any phyton)

Gamma has a simple solution for that.
Imagine you load a static model, for example a rock, and you want to have a corresponding tri-mesh, you just do that :


// Load the model
Graphic3D rock = Model3DLoader.load("data/ARockModel.obj");
// Create a tri mesh
TriMeshGeom tmg = new TriMeshGeom(universe);
// Synchronize the model with its physic representation
rock.linkPosAndRot(tmg);
// Adjust the shape of the tri mesh to fit the model
tmg.adjustShape(rock);

This provide a high level of abstraction : you don’t mind if it’s a OBJ, MD2, MD3, 3DS, Cal3D model.
If you have a moving animated object ( for example, a character ) that you want to represent physically with a box, you’ll do that :


// Load the character
Graphic3D character = Model3DLoader.load(universe, "data/MyCharacter.md2");
// Create a box geom
BoxGeom bg = new BoxGeom(universe);
// Synchronize the model with its physic representation
character.linkPosAndRot(bg);
// Link dynamically ( update each step ) the shape of the box geom to fit the model
bg.linkShape(rock);
// Create a physical behavior ( equivalent of an ODEJava body )
PhysicalBehavior pB = new PhysicalBehavior(universe, bg);

( However, I don’t know if you had another project outside Gamma… )

No it’s actually for my other project :wink:
Is your solution ok when you want to link inner stuff? e.g. TransformGroups or Frames?

Mmh… maybe the way I’m doing this is ok and I’ll simply add some loaders for other fileformats - so it’s exactly like in gamma ;D