Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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] Transformgroups vs Odejava  (Read 1038 times)
0 Members and 1 Guest are viewing this topic.
Offline NewbTon

Junior Member




Odejava games rock!


« Posted 2005-01-10 08:27:43 »

I have small program in Java3d that simulates the human body, with each bodypart/joint represented as transformgroups in a child/parent manner.

I would like to use odejava on this   to simulate physics when bodyparts coolide. Problem is, Ode uses global coordinates (to my knowledge) and each joint im my program has it's own local coordinate system.
So there is a conversion problem at least, if not alot more.
Is there anyway that ODE can handle this ?
I would like to use odejava without breaking the existing structure too much.
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #1 - Posted 2005-01-10 16:14:44 »

I ran into the same problem.  My solution was to "flatten" the scenegraph.  This way, each TransformGroup representing a joint was attached directly to the root of the scenegraph.  The other option (which I haven't tried) is to keep the scenegraph intact and transform the rotations and orientations coming in from Ode into the TransformGroup's local coordinate system by multiplying them by the inverse of the TransformGroup's localToVWorld matrix.  Hope this helps  Smiley
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #2 - Posted 2005-01-10 18:07:42 »

Quote
I ran into the same problem.  My solution was to "flatten" the scenegraph.  This way, each TransformGroup representing a joint was attached directly to the root of the scenegraph.  The other option (which I haven't tried) is to keep the scenegraph intact and transform the rotations and orientations coming in from Ode into the TransformGroup's local coordinate system by multiplying them by the inverse of the TransformGroup's localToVWorld matrix.  Hope this helps  Smiley

Yes thanks Smiley still think it's too complitated though. Isnt there a way so these calculations are done automatically ?. I dont know if I'm right, but if you apply force to the shoulder transformgroup(rotation for example), you will automatically move all it's children since they are in this transformgroup, thereby applying artificial, non ODE controlled  movement to it's children.. At least ODE wouldnt  be aware of this since it doesnt know anything about transformgroups. Maybe the final simulation would not look right this way ?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2005-01-10 21:04:46 »

I assume you currently have something like this:  http://xith.org/tutes/GettingStarted/html/transformgroup_trees_with_t.html
That is a tree of transform groups.

When you use ODE, you basically turn control of this over to ODE.  Build your structure in ODE with bodies, joints, geoms and geomtransforms.  If you turn a joint, all geometry (and therefore any 3D representations) attached to the body which is turning will move like you expect.  In other words - use ODE to define the relationships of your geometry (e.g. arms and legs), then simply attach (bind) the 3D "skin" to this.

To achieve this, I personally use XODE to discribe the ODE bodies and geometry in a heirarchial manner, and the ASE 3D geometry format to describe the 3D shapes.  In 3D Max, I have my objects grouped in "Transform groups" like what you are talking about.  This allows me, using the ASE loader to import the geometry relitive to the various pivot points specified in 3D Max.  I then bind the 3D geometry to the ODE objects created when parsing the XODE file and let Odejava handle the simulation.

Will.

Offline NewbTon

Junior Member




Odejava games rock!


« Reply #4 - Posted 2005-01-11 07:36:25 »

Thanks for the advice. So you really do have to flatten your scenegraph and build your hierachy using ODE.
That really cleared up some things, thanks everybody Wink
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.

pw (37 views)
2014-07-24 01:59:36

Riven (38 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

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

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

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

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

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

Riven (57 views)
2014-07-14 18:02:53
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!