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 (404)
games submitted by our members
Games in WIP (289)
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  
  Animations- how do you like yours?  (Read 1128 times)
0 Members and 1 Guest are viewing this topic.
Offline Breakfast

Senior Member




for great justice!


« Posted 2003-03-02 21:24:15 »

Just wondering how other people who are building stuff in j3d are animating things- are you using morphs or ordered transformgroups? Do you use behaviours to move stuff about or do everything frame by frame?

What techniques is everyone out there using and how are they working out?
Offline Conzar

Junior Member




There is nothing common about common sense


« Reply #1 - Posted 2003-03-04 18:05:47 »

Well, I am still new to Java3D (just started this summer) so this technique might not be the best but it does work.

For an animation, I use a TransformGroup for what ever object I am animating and set the Transform3D with the updated coordinates (rotation and x,y,z info).  So its frame by frame.  

Ubuntu
Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Reply #2 - Posted 2003-03-11 05:26:45 »

I wrote MD2 and MD3 loaders that support animations in Java 3D. For them the seperate frames are collected together inside a switch whose state is changed each frame. I could have used morphs, but for my purposes it was a bit performance heavy.

Generally it depends on the type of animation you are attempting. If you just want to run through a series of frames it might be easy just to generate a set of shape. If you've got skeletal information it'll be easier to use transform groups.

As to when you do the updates, you should really use behaviours, since modifiing the scene graph anywhere else will cause it to redraw.

Kev

http://www.newdawnsoftware.com/

Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline zero

Junior Member





« Reply #3 - Posted 2003-03-11 07:09:59 »

I used skeletal animations for the body and morph-targets for facial expressions. all done in java3d.
I had no problems with two multitextured character consisting of 8k triangles lit by 3 light sources on my notebook (PIII  M 1,1Ghz, GeForce 2 GO 32MB, Linux 2.4.19-4GB)

btw. I did not many optimations on the code, but 4 of these characters need better hardware (skin deformation done by vertex shaders would be nice speed-up)

is anyone doing fac..ial animations with textures?
yes? pleaser tell me about the performance
Offline Conzar

Junior Member




There is nothing common about common sense


« Reply #4 - Posted 2003-03-11 13:54:24 »

Quote
As to when you do the updates, you should really use behaviours, since modifiing the scene graph anywhere else will cause it to redraw


What do you mean by this?  Doesn't behaviours also couse a redraw too, or are you saying, that if I modify say 1 object's transform group in a scene, that this will cause the entire scene to redraw?  But if I use a behaviour, it will only redraw the object?  The latter doesn't really make sense to me because if the behaviour can only redraw the object, then there should be a way that a non-beaviour method can redraw just 1 object.

Could you explain this?
Thanks

Ubuntu
Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Reply #5 - Posted 2003-03-15 19:22:26 »

Sure, sorry for the late reply.

If you modify the scene graph (set a transform, update some geometry) outside of behaviours it causes the scene to be redrawn.

If you do your updates inside behaviours, you're actually in the rendering thread (since behaviours get processed as the scene is drawn) and so the scene doesn't get a forced redraw.

If you update outside of behaviours you're likely to get screen drag and strange 3d artifacts.

At least this is the way I understand it.

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!
 
Try the Free Demo of Revenge of the Titans

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 (32 views)
2013-05-17 21:29:12

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

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

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

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

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

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

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

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

UnluckyDevil (145 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.142 seconds with 21 queries.