Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
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 868 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!
Legends of Yore - The Casual Retro Roguelike
Offline rdcarvallo

Senior Member


Projects: 5
Exp: 15 years


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.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (43 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!