2 questions about Spatial animations (i.e. not bones, or “pre-baked” mesh animations)…
For simple Spatial animations (e.g. user presses a button & a rock rolls away from the entrance to a cave) should I be using Cinematics with separate controls for Position and Rotation tracks (for the rock and the button in/out), or is that overkill and there’s a simpler way?
Is it possible to use easing functions with Position & Rotation tracks (or for that matter, Motion Tracks) or will I need to subclass or copy/edit the track classes to achieve this?
2 questions about Spatial animations (i.e. not bones, or "pre-baked" mesh animations)...
1. For simple Spatial animations (e.g. user presses a button & a rock rolls away from the entrance to a cave) should I be using Cinematics with separate controls for Position and Rotation tracks (for the rock and the button in/out), or is that overkill and there's a simpler way?
2. Is it possible to use easing functions with Position & Rotation tracks (or for that matter, Motion Tracks) or will I need to subclass or copy/edit the track classes to achieve this?
1) Umh, IMO, Cinematic here, not so good! You know, for now, our Cinematic system is less "interact-able" than other things like physics, of a custom control (position manage control)...
So, you need to answer the quick question: how much interactive you want in that situation, behavior of the rock, the setup of the scene... I think some reasons below that you should just put a physic force in it:
- if that rock has physical interactive ( sure)
- even you cave scene setup can be change in the future (sure)
- Cinematic system should take place where there are so much of actions (which can't be handle by code) , then pre-make and bake them into a Cinematic with Events and Translation,... so on
2) javadoc is your solution,
http://hub.jmonkeyengine.org/javadoc/com/jme3/animation/SpatialTrack.html
anyway, Pos & Rot tracks are
http://hub.jmonkeyengine.org/javadoc/com/jme3/cinematic/events/PositionTrack.html
Deprecated. use spatial animation instead.
@atomix said:
1) Umh, IMO, Cinematic here, not so good! You know, for now, our Cinematic system is less "interact-able" than other things like physics, of a custom control (position manage control)...
Physics, to make a button go in/out or a rock move to the right? Ugh... I think that sounds like overkill, especially since I want to predefine EXACTLY how they move.
2) anyway, Pos & Rot tracks are Deprecated. use spatial animation instead.
Haha yes I knew that! Sorry... brain malfunction after reading too many docs :)
Still, SpatialAnimation doesn't have easing either, apparently... I'd have to work out every location/rotation keyframe manually and supply a whole array of data!!
I think I'd prefer to say simply "move Spatial by vector(20,0,0) over 10 seconds, easing out with a factor of x", or whatever.
Righto... I think I'll just write my own class in that case.
@jonmonkey, you can use cinematics yeah but that’s kinda overkill. It’s more designed to make cutscenes, and you’ll have to use spatial animation anyway.
I’m planning to add easein/out functions to the AnimationFactory, but right now it’s just pure linear interpolation.
An alternate solution would be a simple control that handle the animation and that you enable when the anim should start. I thinks that’s easy and simple enough for small animations like this.