PDA

View Full Version : Repeating animation help



The_McCheshire
08-05-2014, 03:04 PM
Hello!
I am thinking of creating a new track that is fairly heavy on animations. To start off however I need some assistance with the little problem I am having.
Here is a short video I made of a test I performed.

https://www.youtube.com/watch?v=ze1I4Wt7Q_Q&feature=youtu.be

As you can see in the video, I have made a very basic animation that is attempting to produce a continuous steam of objects passing by those two panels. I have it on looping so that it may return to its position so that the boxes may continue to rise. I want the gap between this loop seen in the video removed so this it is really smooth when incorporated in my track. I also have a feeling that the reason this gap happens is because the interval trigger, although containing very narrow ticks, still is slow enough to show this gap - Im not sure however.
If anybody can help me, I would be appreciated ;)

Magnus2552
08-05-2014, 03:44 PM
If you are within the radius of the Physics Bubble, you can use a Emitter instead to simplify the whole animation. (The Emitter can be found in the very first sub menu of the Editor's objects list.)
Place only one of the object that will be moving and move it to somewhere where it cannot be seen by the rider. Important: Go in the object's properties menu to Advanced Physics and turn off the World Gravity for this object.
Now place an emitter at the position, where the objects begin to move. Go to its properties menu and choose the recently placed object as the emitting object. Make sure the Checkbox „Emit Physics Object“ (the exact words may vary) is checked. Now adjust the Starting Velocity and the Emit-Interval in such a way, that it mostly resembles your OPE animation. You can also change the value of the maximum number of objects being emitted, before old ones are getting destroyed, if you like to. It may prevent some bugs, for instance maybe you will want to increase the number, because the player could see, when the objects were being destroyed again.
I hope this helps ;)

Edit: Oh, and set the spawn radius of the Emitter to 0, so that all objects will have the same starting position (otherwise they would randomly spawn within the spawn radius)

dasraizer
08-05-2014, 03:53 PM
@Magnus2552, The emitter has been modified so you don't need to have physics turned on, just uncheck emit with physics inside the emitter and it acts like the OPE outside the physics bubble :)

The_McCheshire
08-05-2014, 04:09 PM
If you are within the radius of the Physics Bubble, you can use a Emitter instead to simplify the whole animation. (The Emitter can be found in the very first sub menu of the Editor's objects list.)
Place only one of the object that will be moving and move it to somewhere where it cannot be seen by the rider. Important: Go in the object's properties menu to Advanced Physics and turn off the World Gravity for this object.
Now place an emitter at the position, where the objects begin to move. Go to its properties menu and choose the recently placed object as the emitting object. Make sure the Checkbox „Emit Physics Object“ (the exact words may vary) is checked. Now adjust the Starting Velocity and the Emit-Interval in such a way, that it mostly resembles your OPE animation. You can also change the value of the maximum number of objects being emitted, before old ones are getting destroyed, if you like to. It may prevent some bugs, for instance maybe you will want to increase the number, because the player could see, when the objects were being destroyed again.
I hope this helps ;)

Edit: Oh, and set the spawn radius of the Emitter to 0, so that all objects will have the same starting position (otherwise they would randomly spawn within the spawn radius)

isn't the emitted unpredictable though?
To give you some insight, I want the objects to follow some sort of rigid path like an elevator or conveyor belt does.
Wouldn't an emitter just hurl the object outwards in a unpredictable fashion?

dasraizer
08-05-2014, 04:20 PM
as mentioned by Magnus2552, there is an option to set the ejection spawn radius to 0, you also have velocity settings as well as timed interval and the number of objects you wish to emit at any one time before it starts recycling them. one thing to bare in mind, the current object being emitted is emitted at the selected objects current rotation, colour, visibility, etc states, handy if you want to have a rainbow effect of emitted objects.

edit: open a new level up and have some fun playing with it.

The_McCheshire
08-05-2014, 04:26 PM
as mentioned by Magnus2552, there is an option to set the ejection spawn radius to 0, you also have velocity settings as well as timed interval and the number of objects you wish to emit at any one time before it starts recycling them. one thing to bare in mind, the current object being emitted is emitted at the selected objects current rotation, colour, visibility, etc states, handy if you want to have a rainbow effect of emitted objects.

edit: open a new level up and have some fun playing with it.

Will do :) not at my xbox at the moment

SparkierJoNESZ
08-05-2014, 09:14 PM
the problem originates from ressetting all the positions at once even those onscreen
also if the object is exactly 0.3 high you will repeat the same value twice because first tick is 0 and last tick is 30 resetting then back to 0 wich already happend the previous tick

Magnus2552
08-06-2014, 02:58 PM
the problem originates from ressetting all the positions at once even those onscreen
also if the object is exactly 0.3 high you will repeat the same value twice because first tick is 0 and last tick is 30 resetting then back to 0 wich already happend the previous tick

Yeah, that is true.
If he still does want to use the OPE for this, instead of the Emitter, he could fix the problem by setting the distance (in this case the End value of the linear curve data source) to a integer-multiple of the distance between two of the boxes, such that: [End Value] mod [distance between two boxes] = 0.

So for example, if the distance between two boxes is 0.3, he can set it to any integer multiple: 0.6, 0.9 and so on...

I do not think, that then these two ticks, where the position values are the same (as described by you above) will have much impact on the animation.

Zorsselsson
08-06-2014, 08:36 PM
Solved your problem. Tested the exact same setup and it worked. Copy the moving group and those code blocks, put the copy block chain to the same position as the other one and then put exactly 50% of the duration to offset ticks.

When one chain disappears and resets, the other is visible and moving. That way it never flickers and moves smoothly.

The_McCheshire
08-06-2014, 09:44 PM
Solved your problem. Tested the exact same setup and it worked. Copy the moving group and those code blocks, put the copy block chain to the same position as the other one and then put exactly 50% of the duration to offset ticks.

When one chain disappears and resets, the other is visible and moving. That way it never flickers and moves smoothly.
Great news, Ill give it a whack :)
If I find any difficulty in this I will fall back on the emitter method.
This is good however, If people ever want to watch an endless stream of boxes fly upwards out of sight, They now can ;)

Additionally, I cannot make my intended track just yet, the rusted seed building has too many game crashing bugs attached to and so I lost hope temporarily.