Sat, Jan 11, 12:52 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 11 12:18 am)



Subject: Rigging a railroad train for animation?


  • 1
  • 2
muralist ( ) posted Wed, 07 November 2007 at 5:57 PM · edited Sat, 11 January 2025 at 12:52 PM

file_392838.jpg

I'm modeling a steam train and have built a half mile of curving track.  How do I animate the train cars to follow the track?

So far I plan to make the locomotive, tender, and each car a figure in order to be able to open and close the doors and windows and animate wheels.  Also this would allow the train to be reconfigured (cars could be added or removed).   

Is there a way to create a parent figure for the train cars, similar to smartprop attaching?  I want it to be very simple to set up the track and viaduct in the terrain, then load the train cars, and animate them travelling across the line.


muralist ( ) posted Wed, 07 November 2007 at 5:58 PM

file_392840.jpg

Here is a section of the track.


Gareee ( ) posted Wed, 07 November 2007 at 6:19 PM

The whole train could be one figure, and each car could be a main group, with child groups for doors and moving parts.

Add easypose tech to it with RDNA's Easypose Underground, and it should be fairly easy to do, though you'll probably have to do a lot of minor tweaking on the train cars on the track as you are animating it.

Way too many people take way too many things way too seriously.


svdl ( ) posted Wed, 07 November 2007 at 6:26 PM

Now THAT is tricky.

It MIGHT be possible to do this using PoserPhysics. If not, you'd have to animate by hand, which is a total pain.
It also might be possible to write a Python script that creates the animation, sort of a dedicated physics simulation script. Complicated and tedious work, but worth your wile if you're planning on doing more railroad tracks.

By the way, that is some beautiful modeling work! I love the environment and that bridge is way cool. The train itself is wonderful too.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


muralist ( ) posted Thu, 08 November 2007 at 9:41 AM

You can see another view at http://www.renderosity.com/mod/gallery/index.php?image_id=1556505

I want to do this without purchasing additional packages or software.  The idea here is to rig it as simply as possible, plus if I put it in the marketplace I don't want to require people to buy a lot of other stuff just to get it running.

Python might be the best native way, but I'm not expert in it.  How would you script that?


Gareee ( ) posted Thu, 08 November 2007 at 9:48 AM

Try the easypose method.. you can manually build in easypose, but easypose underground over at RDNA makes it SO much faster that I would never do it by hand any more.

Play with a figure that has a tail with easypose built in, and you'll notice the movement is very "train turn" like.

There really isn;t any easy way yo do this, but using erc built in to turn the wheels, and easypose build in for the full train car manipulation will make in more manageable.

Way too many people take way too many things way too seriously.


lesbentley ( ) posted Thu, 08 November 2007 at 5:36 PM

MyBookmark


muralist ( ) posted Sun, 25 May 2008 at 8:20 PM

I've begun rigging this, and want to know if anyone has had any breakthroughs recently that will make this simple.  I installed the Easypose Underground demo and so far can't see how it will cause the train to follow the tracks.  the track follows the terrain up and down, left and right, in irregular curves.


Gareee ( ) posted Sun, 25 May 2008 at 9:04 PM

It won't.. but you can make keyframes, and adding easypose will make posing the train much easier... plus you can add erc to make all the wheels turn at the same rate.

Way too many people take way too many things way too seriously.


Helgard ( ) posted Mon, 26 May 2008 at 2:14 AM

There is only one way to do this. Go to Possetteforever, and in their freestuff is a model train by the grand master of rigging, VK. I have looked and looked at it, but I have no idea how it works.


Your specialist military, sci-fi, historical and real world site.


Helgard ( ) posted Mon, 26 May 2008 at 2:16 AM

Attached Link: http://www.vanishingpoint.biz/productdetail.asp?productID=56

I thried to do it for this product, and I failed, so if you get it right, I would be very interested.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Mon, 26 May 2008 at 5:43 AM

Thanks guys. I read VK's tutorials last night -- I'll give this a shot.


nruddock ( ) posted Mon, 26 May 2008 at 5:47 AM

Attached Link: http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=1499769

The relevant thread.

As I understand it, it's about creating extra centres of rotation by adding and/or rigging ERC to manipulate the normal origin.


muralist ( ) posted Mon, 26 May 2008 at 5:56 AM · edited Mon, 26 May 2008 at 6:07 AM

That's one of them.  On first reading I didn't think that would work for this set as the track doesn't follow simple arcs, it curves around the terrain following the path the real one takes.  I've just downlaoded VK's toy train and I'll have a look at its setup.


Rance01 ( ) posted Mon, 26 May 2008 at 6:23 AM

Attached Link: http://market.renderosity.com/mod/forumpro/showthread.php?message_id=1920453&page1

Point At might help as a start point.  I'm sure more keyframing would also be needed.  Take a look at this thread if you haven't invested too much in your project yet.

http://market.renderosity.com/mod/forumpro/showthread.php?message_id=1920453&page1

Best Wishes,
Rªnce


Helgard ( ) posted Mon, 26 May 2008 at 9:51 AM

Muralist,

I have been thinking about it, and I may have a way.

I will summarize it quickly.

The entire model must be one figure, the train and the terrain.

The train must have Easypose applied to it, so that it can curve with one dial.

If, for example, the x-translate  is the forward motion of the train, the slave your x-translate to the easypose dial.

Then, you need to learn delayed ERC programming, I have a tutorial I will send you.

You then program this that say at x-translate = 5 the value of the Easypose curve dial is 1, at value = 10 the value of the Easypose curve dial is -1, etc. These easypose dial values you have to find by trail and error.

I am going to be honest with you here, and say that this is a very hard way of doing this, I did some small tests and I think this method will work, but you are looking at hundreds of hours of trial and error to get the exact deltaAddDelta values for the delayed ERC, because I cannot find a way to calculate the value, it has to be found by trial and error.

If the track was a perfect curve, I have an easier way, that can be done without any programming or calculation. This easy way will only allow the train to turn one way, either left or right, and only on a perfect curve and to travel on a straight section of track


Your specialist military, sci-fi, historical and real world site.


nruddock ( ) posted Mon, 26 May 2008 at 10:00 AM

Quote - That's one of them.  On first reading I didn't think that would work for this set as the track doesn't follow simple arcs, it curves around the terrain following the path the real one takes.

One solution is to cheat a little on the curve shape so that it's a mathematically simpler form, or you'll need to work with splines some how.

One way would be to insert marker objects (that can be made invisible), that are named in sequence and then use a script to generate keyframes for position and rotation based on spline evaluated at the item positions.
Another possibility is to see if you can use a Walk Path for at least some of the work (see some of lesbentley's posts (e.g. -> http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=2318233)

And a question, is this Glenfinnan your recreating (or a particular scene based on one of the HP movies) ?


muralist ( ) posted Mon, 26 May 2008 at 12:35 PM

Thanks for the help guys, keep the ideas flowing.  At the moment I'm rigging the pistons to drive the wheels.

Quote - And a question, is this Glenfinnan your recreating (or a particular scene based on one of the HP movies) ?

Yes it is the Glenfinnan Viaduct and the Olton Hall 4-6-0.


markschum ( ) posted Mon, 26 May 2008 at 3:07 PM · edited Mon, 26 May 2008 at 3:08 PM

I believe the fast way to animate this , especially in poser 7 would be for each car to be a seperate figure , then

  • animate the first car paying close attention to starting position ,
  • copy the keyframes from it to each of the other cars offsetting them the right number of frames  (might need a little experimenting .) the animation layers can help keep it neat

it wont take as long to animate as it would to set up complex erc code .

nice train set !

ockhams follower script might work for this .  I think it was in vanishingpoint freestuff . or ockhams bungalow .


muralist ( ) posted Mon, 26 May 2008 at 3:44 PM

file_406950.jpg

Here's my setup for the pistons and drive wheels.  Is this the best way?


Helgard ( ) posted Mon, 26 May 2008 at 6:06 PM

Attached Link: youtube

Muralist,

That will work, but that is not the real way that a train wheel set-up behaves. Piston A should be parented to the wheel as well.

If you want the locomotive I rigged to see the set-up, just let me know.

Helgard


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Mon, 26 May 2008 at 6:29 PM

Quote - Muralist,

That will work, but that is not the real way that a train wheel set-up behaves. Piston A should be parented to the wheel as well.

If you want the locomotive I rigged to see the set-up, just let me know.

Helgard

Thanks, Helgard, I bought it at www.VanishingPoint.biz a while ago.  I've been digging into it all day.

I've now parented Piston A to the LocoPivotMid (which is in turn parented to LocoWheelMid) and after fixing the joint params its looking good!  All that remains is to get Piston to move now.  I'm rendering a test now; I'll post it in a bit.


muralist ( ) posted Mon, 26 May 2008 at 6:39 PM

file_406958.mov

Test anim


muralist ( ) posted Mon, 26 May 2008 at 7:27 PM

Anyone have any suggestions for getting the Piston to travel in a straight line between its rails, while attached to the PistonA?


Helgard ( ) posted Tue, 27 May 2008 at 2:22 AM · edited Tue, 27 May 2008 at 2:23 AM

file_406983.jpg

Muralist,

The piston on my train did not move perfectly forward and back, it had some rotation, but this is how you get it's basic movement.


Your specialist military, sci-fi, historical and real world site.


Helgard ( ) posted Tue, 27 May 2008 at 2:24 AM · edited Tue, 27 May 2008 at 2:25 AM

The white dot on the left is the point at object. The further forward, to the left, you put it, the better the piston will behave.

This is some really cool rigging you have going on here.


Your specialist military, sci-fi, historical and real world site.


Helgard ( ) posted Tue, 27 May 2008 at 5:07 AM

I am not sure, but I think that you also have to create a new point at object for Piston A, which you put where Piston C was at the original position. This object you can make invisible.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Tue, 27 May 2008 at 12:58 PM

Two more questions:

When the wheels rotate to exactly 180 degrees on the X axis, PistonB (and its children) rotates -10 degrees on the Z axis.  Every other position is perfect.  How do I fix that?

When I open the Joint Editor, only some groups show both start and end points; others show only origin while the EndPoint boxes are greyed out.  Why?


Helgard ( ) posted Tue, 27 May 2008 at 3:12 PM

The things that you don't want to have happen, like rotations, etc, you can lock. Set the minimum and maximum values to zero, and enable the use limits. Then parts cannot move in directions you do not want them to move.


Your specialist military, sci-fi, historical and real world site.


nyguy ( ) posted Tue, 27 May 2008 at 3:23 PM

Quote - There is only one way to do this. Go to Possetteforever, and in their freestuff is a model train by the grand master of rigging, VK. I have looked and looked at it, but I have no idea how it works.

No offence to Posy but I had a hard time navigating the site and I could not the train.

As for the issue at hand with the rigging. I have been trying to figure this out for a while. I have a rollercoaster model with tracks that I could not rig to follow the tracks. I was hoping with this thread I could finally finish it. I will be watching this thread intensely

Poserverse The New Home for NYGUY's Freebies


muralist ( ) posted Tue, 27 May 2008 at 3:33 PM

Thanks Helgard; I'll lock those up now.  I added targets to the piston and set it up as you described yesterday; Its still a bit wobbly but getting closer.  Is there a way to lock the piston so it can only travel in the Z axis?  Its parented to PistonA which is parented to PistonB.  If I can lock it so it only stays on those rails...

nyguy:  Any ideas on how we can make this stick to the tracks and run across the Viaduct?

Here are the files:

toytrain
http://www.posetteforever.com/dload.php?action=file&file_id=223

rollercoaster
http://www.posetteforever.com/dload.php?action=file&file_id=113

Quote - As for the issue at hand with the rigging. I have been trying to figure this out for a while. I have a rollercoaster model with tracks that I could not rig to follow the tracks. I was hoping with this thread I could finally finish it. I will be watching this thread intensely


Helgard ( ) posted Tue, 27 May 2008 at 3:47 PM

Muralist, very hard to say, I would have to look at the model itself, and experiment to see what else can be done. My advice would be to first lock every movement you can. In Poser, only the rotation dials show, so to lock the translate dials, you have to open the CR2, and lock it manually, or else invest in something like Easypose or a CR2 editor to make this step easier. I personally recommend Easypose, I use it for all my CR2 editing.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Wed, 28 May 2008 at 7:31 AM

Which channels can I delete from the cr2?

Each of the wheels is attached to a truck, and each wheel will only ever need to move around its own X axis.  What channels can I safely delete to lighten the cr2?  Last night I cut out everything except the xRot, but that caused the wheels to rotate around the centerpoint of the entire figure. 

Wheels:  only move around their own x axis
Trucks:  Rotate around x y and z axis


Helgard ( ) posted Wed, 28 May 2008 at 7:57 AM

NOOOOOO!!!!! You cannot delete those channels, lol.

In an inorganic object, one in which you have set all the parts to "Bend off", you can delete the twist channels, but you can only lock the 'rot' and 'trans' channels.

To lock a channel, open the CR2, and look for this line: forceLimits. You can then set it to 1 or 4 to force the limits, 0 means it is not forced. You need to do this for every 'rot' and 'trans' dial that may make the parts move wrongly.

rotateY yrot

{

name yrot

initValue 0

hidden 1

forceLimits 1

min 0

max 0

trackingScale 1

keys

{

static 0

k 0 0

}

interpStyleLocked 0

}


Your specialist military, sci-fi, historical and real world site.


Helgard ( ) posted Wed, 28 May 2008 at 7:59 AM

I think, if you have set all your parts to polygon smoothing off, you can also delete the smoothscale channel, but I have not tested this.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Wed, 28 May 2008 at 8:08 AM

I've been cutting channels out of the LocoWheelALead channel:  so far I've got it chopped to xRot, scale and offsets; it still works fine.  Are you saying that the translate channels should be left in and locked otherwise they will allow movement?


nyguy ( ) posted Wed, 28 May 2008 at 9:28 AM

Quote - Thanks Helgard; I'll lock those up now.  I added targets to the piston and set it up as you described yesterday; Its still a bit wobbly but getting closer.  Is there a way to lock the piston so it can only travel in the Z axis?  Its parented to PistonA which is parented to PistonB.  If I can lock it so it only stays on those rails...

nyguy:  Any ideas on how we can make this stick to the tracks and run across the Viaduct?

Here are the files:

toytrain
http://www.posetteforever.com/dload.php?action=file&file_id=223

rollercoaster
http://www.posetteforever.com/dload.php?action=file&file_id=113

Quote - As for the issue at hand with the rigging. I have been trying to figure this out for a while. I have a rollercoaster model with tracks that I could not rig to follow the tracks. I was hoping with this thread I could finally finish it. I will be watching this thread intensely

Thanks I will look at this some and maybe I will finally be able to finish my coaster.

Poserverse The New Home for NYGUY's Freebies


Helgard ( ) posted Wed, 28 May 2008 at 10:59 AM

Muralist,

The smoothing and bending are turned off at places other than the channel themselves. If you delete a rotate or translate channel, it has not been turned off at another place, so I don't think it will work, but, that said, I have never tried it. Do a few experiments and see, maybe you have stumbled on something here, just deleting an entire channel instead of locking it.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Wed, 28 May 2008 at 11:09 AM · edited Wed, 28 May 2008 at 11:17 AM

Quote - Muralist,

The smoothing and bending are turned off at places other than the channel themselves. If you delete a rotate or translate channel, it has not been turned off at another place, so I don't think it will work, but, that said, I have never tried it. Do a few experiments and see, maybe you have stumbled on something here, just deleting an entire channel instead of locking it.

It seemed to work by just deleting them, but I've rewritten the .cr2 and only deleted the smoothing, joint, and taper channels, locking the others and setting them to 0.  I'm just now running a test anim and I'll post it in a few minutes.

By the way do you have that cr2 for Vincent Parker for me?


Helgard ( ) posted Wed, 28 May 2008 at 11:22 AM

Which CR2 for Vincent?


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Wed, 28 May 2008 at 11:50 AM

Quote - Which CR2 for Vincent?

PM inbound.


muralist ( ) posted Wed, 28 May 2008 at 12:39 PM · edited Wed, 28 May 2008 at 12:50 PM

file_407089.mov

Here's the current state of rigging:

Anyone know how to fix the problem at frame 16?  When the wheels rotate to exactly 180 degrees the PistonB moves off its rocker.

Also, why doesn't setting Forcelimits on x and y translation of the Piston keep it from wobbling?  It ought to move in a straight line along its rails; limits are on, but it is more influenced by the PistonB (its parent).  How do I keep it in line?


Helgard ( ) posted Wed, 28 May 2008 at 1:01 PM

"Also, why doesn't setting Forcelimits on x and y translation of the Piston keep it from wobbling?"

Because it is being constrained on it's x and y translations, but those translations are relative to the centre of origin, and the centre of origin is moving, because it is attached to a moving part. The only thing to do here is to increase the scale, your point at objects must be farther, the farther they are, the less you will notice this.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Wed, 28 May 2008 at 1:14 PM

Quote - "Also, why doesn't setting Forcelimits on x and y translation of the Piston keep it from wobbling?"

Because it is being constrained on it's x and y translations, but those translations are relative to the centre of origin, and the centre of origin is moving, because it is attached to a moving part. The only thing to do here is to increase the scale, your point at objects must be farther, the farther they are, the less you will notice this.

Ok.  I added Piston Target A and B; I'll move those forward.  Too bad there isnt a way to constrain it though.


Posy ( ) posted Wed, 28 May 2008 at 5:38 PM

Quote -

No offence to Posy but I had a hard time navigating the site and I could not the train.

Free Stuff page -> search -> train

Because it's a toy, it has not been categorized as a vehicle, but maybe it should...

There is also a discussion turned into a tutorial with some good hints by VK, Whazizname and other PF members about cars here:

http://www.posetteforever.com/discussion2672.html

Maybe it could be useful.

You may also ask there, as far as we know VK and others had no problems to unveil some of their techniques.

( You should better copy & paste the links to PF instead of clicking them, lol )
Good luck.

Posy


nyguy ( ) posted Thu, 29 May 2008 at 7:04 AM

Posy, I did finally find it last night (after searching for 20 minutes - some reason I could not get results of the search - issue with system at home) and have not had a chance to look at it due to trying to work out some issues with model I am working on.

Poserverse The New Home for NYGUY's Freebies


muralist ( ) posted Fri, 30 May 2008 at 8:07 PM

Anyone made progress yet in getting a cart to run along a non-perfect arc track simply?


muralist ( ) posted Sat, 31 May 2008 at 12:16 PM · edited Sat, 31 May 2008 at 12:26 PM

Attached Link: http://www.veoh.com/videos/v14074350C8c6rE2n

Test anim, 260 frames.

The PistonB problem seems to only occur at 180 degrees x rotation; in this longer anim it doesn't seem to hit that point.


muralist ( ) posted Fri, 06 June 2008 at 7:50 PM

Check sitemail.


Helgard ( ) posted Fri, 06 June 2008 at 8:41 PM

Two quick things, just started on the testing.

  1. Is this supposed to be rendered with polygon smoothing on or off? With smoothing off the model looks a bit blocky, with smoothing on I am getting some ballooning.

  2. I am not getting the splitting problem you talked about in the other thread, the body renders just fine.

I will start testing all the rigging, and will send you a mail on anything I find.


Your specialist military, sci-fi, historical and real world site.


muralist ( ) posted Fri, 06 June 2008 at 8:49 PM · edited Fri, 06 June 2008 at 8:49 PM

Smoothing off.  I've tried to avoid having to split verts on all those little detail parts in 72 groups, though at the same time keeping it low-poly enough for fast animation.  It's looking like I might have to smooth it though (lots of extra work, but a better result.)

Are you rendering with displacvement ON in render settings and the bumpmap node connected to displacement in the shader?  If so I wonder if maybe I've changed something in my P7 installation that would cause it.

I've sent it to a few others too so if we can all post findings here int his thread it can help everyone.


  • 1
  • 2

Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.