Escalator animation fine in 3ds but artifacts in SDK/game

Started by kinggambit, May 19, 2016, 07:47:59 AM

Previous topic - Next topic

kinggambit

I'm pretty sure what's happening is that instead of teleporting an escalator step from the end of the path to the start, the step will move really quickly across resulting in those quick flashes of the steps. Tried testing out the various "Sequence" options but havent gotten it to fix the issue.

Here's a video clip of the animation issue for an escalator:
https://www.youtube.com/watch?v=lIhkXKTFqSM

Not sure what's causing it but it seems perfectly fine when in 3ds max. Here's the max scene if interested:
https://drive.google.com/file/d/0B-vAs10wX5pRV1VTVkVmVGdQSnc/view?usp=sharing

Joris Ceoen

The steps should probably go to a bone that is in a rectangle form under the escalator instead of going directly to the bottom bone of the escalator steps.

func_Mathias

I think you are right with it not teloporting in an instant, seems to be interpolating and some times visible for a frame.
What you should probably do is to have an extra frame for them to move only down to the same level as the bottom of the escalator, then horizontal to the place they appear from.
Think of it as a triangle shape where what you have animated already is the slope.

Joris Ceoen

Quote from: func_Mathias on May 19, 2016, 12:44:31 PM
I think you are right with it not teloporting in an instant, seems to be interpolating and some times visible for a frame.
What you should probably do is to have an extra frame for them to move only down to the same level as the bottom of the escalator, then horizontal to the place they appear from.
Think of it as a triangle shape where what you have animated already is the slope.
Exactly. The pods in the citadel of Half-Life 2 are animated exactly this way. If you look at the ones that are always teleporting from point A to B endlessly in the model viewer, you can see them teleporting behind immediatly.

kinggambit

ah I see. So there's no real way of preventing that interpolation?

I know this is probably the wrong place to ask this but I'm oblivious on animating. I used a maxscript online to equally place the steps along a path that updates live to any changes to the spline.

Is there a way to "squish" the new downard path line so that it only takes 1 frame to travel for all the steps? Seems like it'd save a lot of extra steps from being made as well.

edit: actually, I'll do some research on curve editor before and get back to you guys. Animation has been something I've been meaning to actually grasp.  ;)


func_Mathias

Pretty much what you have in the picture yeah.
Doesn't need to be a single frame speciafically tho, but fast enough so that you don't need any extra escalator steps to fill the holes that would appear if they take too long to return.
Sadly can't think of any quick and easy way to do it, probably gonna have to be manual work on each step.

Tho if you figure out how you could make the animation for only one step, copy it to another step and offset the animation to give them the right position.
If you do that remember that you probably need to paste the animation twice to get a continuous loop.

Think that's all I got tho, you can experiment of course!

wallworm

Here are just some ideas to get you to think of a way to accomplish this that may teach you some new animation concepts.

From the side view, create a spline that represents the path of travel from start to the big loop finish (making sure to close the spline). You probably want to make sure all knot points are corners (so do not drag the mouse-down which creates Bezier curves). Now select one Step Object and choose Animation > Position Controllers > Path Constraint and select the spline. Now when you scrub the timeline, you'll see it follow.

Open Graph editors > Track View Curve Editor and find the Object > Transform > Path Constraint > Percent value and add keys for it at the top of the ramp, bottom and back at the start. Now you can just drag these keys to the time that makes it travel the distance you want.

Once done, you can copy this constraint tracks, paste to another step and simply offset its keys so that it starts at a different percentage one the path. You'll probably need to add one extra step that isn't in view to make the process seamless. You could also script the offsets and make it so that changing the step-count automatically shuffles the offsets and timing.... but that is a topic for another day :)

This setup is convenient because it means you can re-use it in another scenario by simply changing the spline you are targeting.

kinggambit

Quote from: wallworm on May 19, 2016, 09:17:56 PM
Once done, you can copy this constraint tracks, paste to another step and simply offset its keys so that it starts at a different percentage one the path.

I got up to this point but had to assign the percentage curve a "bezier float" controller to be able to add keys into it. The first step was successfully animating as I wanted it to.

For the duplicates though, I'm using this maxscript right now but it doesnt seem to move the percentage curve's actual keys (only position of duplicates along the path constraint):

previous=$
new=instance prev
select new
paramwire.connect previous.pos.controller.Path_Constraint.controller[#Percent] new.pos.controller.Path_Constraint.controller[#Percent] "Percent+0.018"


Not sure how to get the actual percentage curve to offset though other than manually (and even then, copying the curve over would cause my duplicate steps to reposition to the start of the path)

Anyone know why that last line in the max script isn't moving the percentage of the path constraint?

SMF spam blocked by CleanTalk