Animation Issues

Discussion of rolling-stock creation & re-painting.

Animation Issues

Unread postby ricksan » Thu Mar 12, 2009 7:01 pm

Here's another look at the 700, this time operating in the sim itself.
Image
I recently applied the appropriate running gear animations and would like to offer a few observations.

1. The tender has two trucks oriented mirrorwise. in keeping with the prototype, so the brake cylinders face toward the center. Because of this I used two separate bogey blueprints. However, when the locomotive is selected in free roam, the rear truck reverses itself so its brake cylinders face rearward. Moreover, its wheels rotate the wrong way. Mention is made of mirrored trucks in the TechDocs, but frankly it's not very clear what one is supposed to do or not do. I've tried several variations to no avail. The trucks on the ES44AC are mirrored like this tender is supposed to be and they work properly whether selected or not. I give up! What's the trick?

2. The locomotive has three trucks (bogeys): pilot, drivers and trailing. At first the Bogey group of my locomotive blueprint had only the pilot and trailing trucks and they operated correctly in terms of both truck and wheel rotation. Then I animated everything. Unfortunately, since I added the drivers to the Bogey group, the pilot and trailing truck wheels have ceased to rotate and the trucks jitter about as if they are hunting for the track path ("hunting" in the control-engineering sense of the word). As far as I can tell, the sole purpose of the driver bogey object is to serve as a container for the wheel diameter. And in fact the drivers do appear to rotate at the proper rate in relation to the rails. The Bogey group in my template has the above mentioned three bogeys listed in front-to-back order. The driver bogey pivots are 0, 0. The bogey template lists the wheel radius and gauge, and the offset of each wheelset from the 0, 0 pivot. The IA reference is listed under the second wheel, which is the primary driver of the prototype, but it doesn't seem to matter which one you choose. Why don't my pilot and trailing trucks work?

3. The running gear animations operate smoothly in Max, but not in RS. In Max I manually keyframed the rotation of the four wheels at the prescribed 22.5 degree increments, but I rigged the other parts using IK solvers along with an assortment of look-at, position and expression constraints. Once everything was working, I collapsed the trajectory of each part, which creates a key for each of the 16 frames, and deleted all of the helper functions. The animations still performed as before, so I exported the IA file. I would expect to see a minor amount of bumpiness in certain parts, as some of them don't necessarily reach the full extents of their kinematic motion at exactly the 16 key points. But I've observed several other, possibly fundamental problems. For example, all four driver wheels jump up and down a few centimeters when their rotation reaches about 270 degrees, as if they were running over something on the track. The main rods also bounce at the same time. The connecting rods appear to follow a set of 16 straight paths instead of a circle. One of the three lubricator linkages is jerky even though they were all rigged the same way. It has been reported in another forum that what I'm seeing may be the result of a software defect. Since I'm not adept at deciphering hex code of the sort that is used in the IA files, I have no idea what's going on or how to fix it. Anybody?

Animations in MSTS behave reliably, and they are easy to create, debug and edit. Overall, Rail Simulator represents a significant improvement over its predecessor, but in the area of animation I fear it may have lost some ground. I hope it's just me! !**conf**!
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA

Re: Animation Issues

Unread postby Sly » Thu Mar 12, 2009 8:07 pm

Hi Rick

A quick breakdown of my method of getting smooth anim and operation.

The loco and tender are two completely seperate models
The centre ( origin or pivot)of all non animated parts except bogies is 0,0,0 this is rail height.

For the loco
I would place the crank drive axle at 0,0 in the x and y ( as an alternative to placing the midpoint of the model )
so its pivot would be 0,0, drivng wheel radius
for all wheels the pivot is the exact centre of its axle... use affect pivot only/centre to object/ align to world tools
for all bogies the pivot is at rail level and central to the model ie offset from your crank axle, 0,0
All objects need their pivots aligning to the world (for simplicity)
Bo01 and bo01wh01 format for the wheels and bogies should be used
The driving wheels do not need there own bogie object they can reside in the main level of your hierarchy.. numbered... wh01,wh02 wh03 etc front to back
Bo01wh01 and Bo01wh02 are linked to Bo01... similarly with Bo02 Bo02wh01 and Bo02wh02 again wheels nimmbered front to back.

Important
when you animate your rods and export the animation have the bogies and their wheels hidden.. this is the reason they are no longer animated.

To animate rods and drivers
have only the components you intend to animate visible
set 16 keyframes ... max adds a start frame giving 17 total
set the autokey to record /interpolate ratation keys and activate.
rotating a driving wheel 90 degrees each time set keys at keys 0, 4, 8 12 and 16
repeat for each driver and test
link a side rod to your crank axle again using the above keys adjust the rotation to keep the rods level
link a connecting rod to your crank axle and again set the main keys ( you will prolly have to do all 16 keys for these unless you get it to look at a slide bar )
link the piston to the connecting rod, union link to piston, combining lever to union link etc etc to " build" your motion.

You can do this for one side of the loco and mirror to the other side , but you will need to reset Xref
With only the animated parts visible export the IA file.

For the tender
You have mirrored the bogie
Reset x ref's
Using affect pivot/ align to world/ centre to object tools, adjust the bogie pivot points cso they are central to the bogie and at rail level
The tenders components pivots and the centre of the tender model sit at 0,0,0
The tenders bogies sit in the top level of Hierarchy
The wheelset centres are the exact cetre of the axle in all axes
The wheels are linked to their respective bogie.
The wheel / bogie numbering front to back is
Bo01wh01
Bo01wh02
Bo01wh03
Bo02wh01
Bo02wh02
Bo02wh03

repeating that bogie and wheel centres are "ALIGNED to the WORLD"

when creating the blueprints and asked to Insert first....... eg axle Insert the rearmost first then work your way forward
This means that when reading your blueprint axle 1 appears at the head of the list

Take accurate notes of the positions of bogie and wheel pivots........... by selecting a suitable vertx and reading the coords in Max
Similarly take notes of the extremities ( for collision length ) and coupler positions

Sorry if some of this is basic and if you have it covered .. it is just easier to give a summary of the method I have been using

good luck with the import it is a fine looking model and greatly needed fo you guys over there..

Cheers

Sly
Sly
 
Posts: 35
Joined: Tue Feb 17, 2009 7:32 pm

Re: Animation Issues

Unread postby ricksan » Thu Mar 12, 2009 11:05 pm

Thanks, Sly. That's a great checklist. We can all benefit from it.

Most of the things you listed I've already done, but obviously not all of them. I'll give the models another go-around and report the results. It'll be great to get past this, as there are just a few more days worth of work to be done before the locomotive is ready for testing!
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA

Re: Animation Issues

Unread postby rgarber » Fri Mar 13, 2009 12:11 am

So that's the Northern in RS? Sweet! I hope Sly's suggestions get your project going. I've seen some of Sly's pictures over at uktrainsim and they all looked pretty sweet. Appreciate it Sly!

Rich Garber
rgarber
 

Re: Animation Issues

Unread postby Sly » Fri Mar 13, 2009 3:32 am

Hi Guys

Just noticed I didn't cover the anim jumping issues.. that is all solvable

I will have to post it up tonight at work at the moment.

Laters

Sly
Sly
 
Posts: 35
Joined: Tue Feb 17, 2009 7:32 pm

Re: Animation Issues

Unread postby decapod » Fri Mar 13, 2009 4:35 am

I have studied the IA format in detail, there is nothing basically wrong with it. Though the fact the MAX export expands everything to 300 keyframes is a bit of an indication that the person who developed the animation code for Rail sim didn't really know what he was doing.

There are also definite bugs in the animation code. 3D canvas users have been hit where animated child groups of other animated groups jump badly at 180 degrees. The Max export flips the quaternions at + or - 120 degrees so this jump doesn't occur (when both animations are 180)
decapod
 

Re: Animation Issues

Unread postby ricksan » Sat Mar 14, 2009 8:56 pm

I can report some progress. Items 1 and 2 have been fixed, but the driver animations are still not to my liking. Sly's comments from his post are in blue.

Rear Tender Truck Reversal:
For the tender: You have mirrored the bogie. Reset x ref's.
You mean reset the transforms. The model doesn't use XREFs. I unlinked the rear truck and wheels, reset them, collapsed the stacks and re-linked. I must have not done that before. Now they work fine. Sheesh -- rookie mistake! *!embar*!

Locomotive Trucks Don't Operate:
when you animate your rods and export the animation have the bogies and their wheels hidden.
As you guessed, I hadn't done this. Once I did, the pilot and trailing trucks and their wheels behaved properly. Who knew?

Driver Animations Bumpy:
Link a side rod to your crank axle again using the above keys adjust the rotation to keep the rods level
That's the way I always did it in MSTS. I had done it that way with the current model as well, but the rods bumped slightly at a certain point in the rotation (I forget where). So I attached a couple of helpers to the wheel and constrained the rod so it would always be half way between them. No more bump, but the animation interpreter in the sim apparently doesn't realize that a circular path is intended and treats the motion as a 16-sided polygon. It's only noticeable if you're looking for it and I can live with it if that's what it takes to eliminate the bump.

You can do this for one side of the loco and mirror to the other side

The drivers are quartered. All rods are separate. No mirroring.

The driving wheels do not need their own bogie object they can reside in the main level of your hierarchy.. numbered... wh01,wh02 wh03 etc front to back

The driving wheel hierarchy and naming were as you recommended. What I was referring to was the Bogey group in the locomotive's blueprint. RSDL specifies that the driving wheels should be treated as a unique bogey object (DevDoc 2.06, 3.1.25). Again, that object exists only in the blueprint. It doesn't mean the physical model is set up that way. As far as I can tell, all this bogey group does is to tell the sim what animation file to use and what the driver diameter is. (Incidentally, the bogey blueprint has fields for entering the wheel radius. In the case of the drivers, which are animated by the developer, not the sim, the diameter should be entered.)

The DevDocs also call for Linear rotation. I didn't realize it, but Max defaults to Bezier Float motion unless you tell it otherwise. (Although I know what the terms "linear" and "Bezier" mean, I don't know what the difference is in this context.) I changed the wheels and main rods to Linear Float, but it had no effect. With regard to the up-and-down wheel bump I had referred to in my original post, I took another look. The first and third wheels bump up-and-down, the second wheel bumps down-and-up, and the fourth wheel doesn't bump at all! Go figure. **!!bang!!**
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA

Re: Animation Issues

Unread postby Sly » Sat Mar 14, 2009 10:36 pm

Hi Rick

glad you seem to be getting there, as regard to jumps in animation ...
I found that the original animation I programmed worked fine ( the left side of the loco ) however Like you,
I quarter the wheels and animate the right side sepereatly.. this is where my jump always occurs... maybe Paul can clarify but it seems that the jump occurs because the right side animation ( In my case starts at -270 degrees and then passes through zero degrees)

A work around for this is to map all the animations on the right side in both position and rotatation without them being linked to the wheelset ( eliminating the the change in rotation from negative rotation degrees to positive rotation degrees )

| hope you are all sorted, PM or outline any probs and I am sure it can be sorted :D

Looking forward to a test drive

catcha

Sly
Sly
 
Posts: 35
Joined: Tue Feb 17, 2009 7:32 pm

Re: Animation Issues

Unread postby Captain_Bazza » Tue Jul 14, 2009 8:13 pm

Note to moderator: Would you please 'sticky' this thread, it's of critical interest.

Thanks
Cheers
Bazza
Captain_Bazza
 

Re: Animation Issues

Unread postby ricksan » Wed Jul 15, 2009 1:08 am

This is still an open issue and I am still conducting experiments. I use 3ds Max and all of the siderods are rigged using animation helpers that are supplied with Max*. Only the driver wheels themselves are manually animated. At export time one can either "bake" the animations (i.e., let Max keyframe every movement) or simply hide and thereby ignore all the rigging helpers. It doesn't seem to make a difference.

As I've said elsewhere, the main siderod, the one that connects the piston to the main driver wheel, has a noticeable bump to it. This particular siderod is a tough one. Its pivot point, which is attached to the main driver wheel, is constantly moving as the wheel rotates, but we want the other end of it to follow a smooth, linear, reciprocating path. It’s pure speculation on my part, but I suspect the exporter plug-in or the game engine itself is inserting “tweeners” and inaccurately interpolating the required rotation angle of the rod, resulting in the offset or "bump." This is understandable in that it wouldn't take much of an angular error to miss the correct end point. Unfortunately I’m unable to decipher the IA files to verify what's happening, let alone hack them and make corrections manually. I’ll eventually be in touch with Derek about this and hopefully we can resolve the problem.

* For the technically inclined: Position constraints (connecting rods), look-at constraints (main rods), expression controllers (piston rods and valve rods), and IK chains (everything else).
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA

Re: Animation Issues

Unread postby savv_nz » Wed Jul 15, 2009 1:28 am

ricksan wrote:As I've said elsewhere, the main siderod, the one that connects the piston to the main driver wheel, has a noticeable bump to it. This particular siderod is a tough one. Its pivot point, which is attached to the main driver wheel, is constantly moving as the wheel rotates, but we want the other end of it to follow a smooth, linear, reciprocating path. It’s pure speculation on my part, but I suspect the exporter plug-in or the game engine itself is inserting “tweeners” and inaccurately interpolating the required rotation angle of the rod, resulting in the offset or "bump." This is understandable in that it wouldn't take much of an angular error to miss the correct end point. Unfortunately I’m unable to decipher the IA files to verify what's happening, let alone hack them and make corrections manually. I’ll eventually be in touch with Derek about this and hopefully we can resolve the problem.


Hi Rick, if you look at the default steamers they also suffer from this affliction - so its not just something you're not doing *!!wink!!*
MSTS Models occasionally would suffer from this same animation glitch, but you could smooth it out by increasing the number of frames used in the animation. Don't think that works for RS though, as the docs say to use strictly 16 frames or whatever it is. Go above that and you have to start adjusting your wheel radius to control the animation speed.
Cheers,

Stefan van Vliet

TSNZ Webmaster http://www.tsnz.co.nz
NZTS Workshops Co-Founder
TSNZ Discord https://discord.gg/RD6MsgM
savv_nz
 
Posts: 64
Joined: Sun Feb 22, 2009 7:52 am

Re: Animation Issues

Unread postby Captain_Bazza » Sat Aug 01, 2009 2:44 am

As I've said elsewhere, the main siderod, the one that connects the piston to the main driver wheel, has a noticeable bump to it. This particular siderod is a tough one.


I'm afraid this particular problem is as old as MSTS. Try animating each frame, not by interpolation, that's the method I used in MSTS, but even it wasn't always perfect. RW isn't as flexible in some respects as the older MSTS, unfortunately. And as a last resort you could always edit the .S directly.

Cheers Bazza
Captain_Bazza
 

Re: Animation Issues

Unread postby Captain_Bazza » Sat Aug 01, 2009 2:49 am

Don't think that works for RS though, as the docs say to use strictly 16 frames....


Yes, but they said that (more or less) for MSTS, but it was possible to use more and adjust the playback speed in the shape file (.S). They have not given us a processing step where the equivalent of the old shape file is able to be edited in a text editor. I guess they didn't think that was necessary, but like a lot of things in theory....it does not work in practice. See, a lot could have been learned from the lessons of MSTS1 methodology....we had enough years to perfect it.

Cheers Bazza
Captain_Bazza
 


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest