Clickable/controllable scenery animation?

Tips and discussion about scenery creation for RailWorks.

Clickable/controllable scenery animation?

Unread postby Ryan93 » Mon Aug 01, 2016 9:15 pm

I am unable to find any information on this. II would like to know if it is possible to create a scenery object that the player can click during a scenario to play an animation (just like switching a junction but as a scenery item.)

Here's the reason:
I want to create a derail in blender (I have experience creating and exporting scenery items.) because it won't be an actual junction, my idea is to create the derail & animation and export it as a scenery object. I am thinking that I could then manually place the derails in their desired locations and as I'm switching cars in a scenario I'd click it once to disengage the Derail.

I don't think I would be able to make it actually derail a train or cause a scenario to fail but I figure it would be an added touch of realism to industry leads and certain sidings. I have no experience when it comes to .lua scripting and such so if there isn't a simple method I don't think I'd be able to make it work. I hope that makes sense as I am writing this from my smartphone in a limited window of time. Thanks in advance!
Ryan93
 
Posts: 55
Joined: Sat Mar 21, 2015 12:25 pm
Location: U.S. East Coast

Re: Clickable/controllable scenery animation?

Unread postby Bananarama » Mon Aug 01, 2016 9:34 pm

An interactive must be part of the track system. The only way to do what you're after is to create the object and add it to the TrackRules.bin.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Clickable/controllable scenery animation?

Unread postby Ryan93 » Mon Aug 01, 2016 9:48 pm

Thats what I was afraid of. If I were able to get that far how would I be able to place it in the world editor? Would it have to be thoughtfully crafted from a fully rendered junction buried underground?
Ryan93
 
Posts: 55
Joined: Sat Mar 21, 2015 12:25 pm
Location: U.S. East Coast

Re: Clickable/controllable scenery animation?

Unread postby Bananarama » Tue Aug 02, 2016 1:25 am

It would need to be a normal track object such as a junction switch lever. I'm not sure how you would implement it game, however.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Clickable/controllable scenery animation?

Unread postby Ryan93 » Tue Aug 02, 2016 8:11 am

Thank you very much for your help hack! Does anyone else happen to know if I would be able to get it working in the sim?
Ryan93
 
Posts: 55
Joined: Sat Mar 21, 2015 12:25 pm
Location: U.S. East Coast

Re: Clickable/controllable scenery animation?

Unread postby GreatNortherner » Sat Aug 06, 2016 8:32 am

Hi,

Rick and I had been toying with the idea of a functioning derail some time ago and we came up with one possible solution to make it work.

What you need is three things: the animated derail sign/handle, set up as a switchstand and attached to a Trackrule as such. Next, you'll need a set of fully invisible (all alpha texture?) track lofts. Finally, you need a copy of your actual (visible) track loft but set up as a standard loft object (like a fence).

In the route editor, use the invisible track with the "derail-switchstand" to build a switch where ever you want the derail to be. Position the derail object at the root of the invisible switch, and then use the offset tool with zero (0.01) offset to run the loft section copy of your track along the through path of the invisible switch. Now it'll look like it's just a normal piece of track with a derail model, but it will actually work... sort of. If you set the invisible switch to lead off the track, the train will drive off the track and derail... end of scenario.

While that works fine in theory, there is one big issue. The train "running over" the derail is of course just taking a turnout, so the movement of the cars/loco is totally smooth until it hits the end of the track. We found no way to implement the bump and immediate derailment you would expect in the real world when the wheels go over the derail. It looks pretty weird, like the cars are being magically pulled off the tracks in a gliding motion.

Cheers
Michael
User avatar
GreatNortherner
 
Posts: 1584
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 1 guest