Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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  
  Object Hierarchies in Java 3D  (Read 728 times)
0 Members and 1 Guest are viewing this topic.
Offline ArchangelMorph

Senior Newbie




Java games rock!


« Posted 2005-03-03 13:56:11 »

Ok.. Here's the problem..

I'm VERY new to Java3D and I need to build a 3D model out of primitives but in a hierarchical structure.. This because I need to animate it..

Can anyone help me find out how its done?

- ArchangelMorph -
Offline Breakfast

Senior Member




for great justice!


« Reply #1 - Posted 2005-03-05 15:15:21 »

When people talk about object hierarchy I tend to assume they mean what object is a parent of another and I think you're talking about scenegraph hierarchy which is a little different. Object heirarchy is relevant though because the things you're going to want to be changing about your scene are all descended from Nodes which means they can have any number of other Node-based objects as children.

This means that you will probably want to create a main TransformGroup and add your central geometry primitives to it and then add child transformgroups with their own geometry and so on.

If you have three TransformGroups A, B and C where B is a child of A and C is a child of B then C can be moved alone, when B is moved C will also be moved to retain it's relative position and when A is moved both B and C will be moved accordingly.

I'm sure I've seen a tutorial on this somewhere but I don't recall where.
Offline ArchangelMorph

Senior Newbie




Java games rock!


« Reply #2 - Posted 2005-03-15 16:06:59 »

Thanx for the reply breakfast,

Ok the problem is that i've managed to setup the hierarchy of objects now in the same way you stated: using transformgroup's to hold geometry at each level..

The problem now is that I have a single node with multiple children ('centre' node with body, arms and neck as children to it..) and some very undesirable behaviour occuring..

The arms seem to be fine at the moment, I created them as a hierachy of nodes with the geometry attached and the root node is attached to the shoulder which would then attach to the centre node..

The problem is with the body,
I attached the body to the centre node and I've tried everything to change to rotation to get it to stretch downwards instead of upwards (engulfing the head and neck) but its just not working..

Is there something wrong wid me setup or is it that i'm missing something?

Please help!!

- ArchangelMorph -
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline rdcarvallo

Senior Member


Projects: 5


2D Java games forever!


« Reply #3 - Posted 2005-03-15 18:27:17 »

Can you post part of your code to look what are you trying to do.

The hierarchy code

The transformation code that doesn't work.

Rafael.-

Offline ArchangelMorph

Senior Newbie




Java games rock!


« Reply #4 - Posted 2005-03-18 10:56:20 »

Its ok thanx i managed to fix it!!

- ArchangelMorph -
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #5 - Posted 2005-03-29 06:47:11 »

Quote
Its ok thanx i managed to fix it!!


I had the same problem. I fixed it by altering my hierecachy. Head must not be the super-parent. Make the super parent around the center of the guy (pelvis) What did you do ?
Offline ArchangelMorph

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-03-29 07:31:13 »

Well it was my transformation code that was dodgy so after I revised that it worked fine..

I also decided to do the same, I.e. I made a new node to represent the centre of gravity which sat at the top of the chest and that was were all the other objects extended from..

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

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (70 views)
2013-05-17 21:29:12

alaslipknot (80 views)
2013-05-16 21:24:48

gouessej (111 views)
2013-05-16 00:53:38

gouessej (106 views)
2013-05-16 00:17:58

theagentd (117 views)
2013-05-15 15:01:13

theagentd (106 views)
2013-05-15 15:00:54

StreetDoggy (150 views)
2013-05-14 15:56:26

kutucuk (174 views)
2013-05-12 17:10:36

kutucuk (171 views)
2013-05-12 15:36:09

UnluckyDevil (180 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.091 seconds with 22 queries.