Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
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 1273 times)
0 Members and 1 Guest are viewing this topic.
Offline ArchangelMorph

Senior Newbie

Java games rock!

« Posted 2005-03-03 12: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 Devvie

for great justice!

« Reply #1 - Posted 2005-03-05 14: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 15: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!
Legends of Yore - The Casual Retro Roguelike
Offline rdcarvallo

Senior Devvie

Projects: 5
Exp: 15 years

2D Java games forever!

« Reply #3 - Posted 2005-03-15 17: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.


Offline ArchangelMorph

Senior Newbie

Java games rock!

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

Its ok thanx i managed to fix it!!

- ArchangelMorph -
Offline NewbTon

Junior Devvie

Odejava games rock!

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

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 05: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.

BurntPizza (3 views)
2015-10-07 02:11:23

KaiHH (12 views)
2015-10-06 20:22:20

KaiHH (11 views)
2015-10-06 19:41:59

BurntPizza (23 views)
2015-10-06 19:04:48

basil_ (44 views)
2015-09-30 17:04:40

shadowstryker (22 views)
2015-09-29 15:55:06

TheSpaceHedgehog (28 views)
2015-09-29 01:58:48

GamerC4 (54 views)
2015-09-24 21:10:38

GamerC4 (71 views)
2015-09-24 21:09:48

htuy (28 views)
2015-09-24 04:57:24
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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‑
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!