Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  odejava and xith objects  (Read 1106 times)
0 Members and 1 Guest are viewing this topic.
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Posted 2005-07-12 14:16:27 »

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)

:: JOODE :: Xith3d :: OdeJava ::
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2005-07-13 11:16:34 »

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 :
1  
2  
3  
4  
5  
6  
7  
8  
// 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 :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
// 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... )

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #2 - Posted 2005-07-13 11:57:51 »

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 Grin

:: JOODE :: Xith3d :: OdeJava ::
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (36 views)
2014-07-18 06:55:21

Zero Volt (34 views)
2014-07-17 23:47:54

danieldean (27 views)
2014-07-17 23:41:23

MustardPeter (30 views)
2014-07-16 23:30:00

Cero (44 views)
2014-07-16 00:42:17

Riven (46 views)
2014-07-14 18:02:53

OpenGLShaders (35 views)
2014-07-14 16:23:47

Riven (35 views)
2014-07-14 11:51:35

quew8 (31 views)
2014-07-13 13:57:52

SHC (67 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!