Forums Gallery LOGIN |REGISTER

Community Archive is read-only - Here you can view content recorded up until February 2017. To join the latest discussions visit our new forums


How to create a train (rails and other)

Just getting started? Looking for some information on CE and/or CE projects? Ask here!


 

User avatar Alchemist221276
Just getting started
Just getting started
 
Posts: 6
Member since: 09.04.2013, 00:24
Location: Russia, Ekaterinburg
Likes: 0

How to create a train (rails and other)

Postby Alchemist221276 » 02.10.2014, 22:37

Hello All. Thanks for attention to this thread.

I am a new in CryEngine. And I want make on CryEngine a train simulator (like Auran Trainz Simulator). And at once I had some questions:

1. What is the best way to make a rails - by road tool, or some other method?
I think, that road tool is good for this, but I don't know - how to make a texture (or matherial) for railroad - is it possible, to make a road with 3D rails (with ties, embankment and other details), or I must make rails segment asset and place every rails segment manually?

2. Another questions about locomotive and wagon asset: How to make a locomotive or wagon asset with 2 or 3 bogies (with 2 or 3 wheels on each bogie) that can rotate relatively of locomotive hull? How to make a locomotive pantographs with rising and lowering animation?
In documentation about CryEngine I was find lessons only about 4 weels auto, that is not so much detailed, and uses as a base a complete auto asset. Where I can get deep detailed explanation about a different vehicle assets creation? (from the very beginning without use of already existing assets)

3. How to realize the train movement accurately on rails? (with possibility of a descent from rails at excess of speed)

4. How to realize a hitch of train wagons?

Thanks in advance for your answers.
User avatar cwright
Producer
Producer
 
Posts: 2465
Member since: 11.08.2004, 12:38
Likes: 98

Re: How to create a train (rails and other)

Postby cwright » 03.10.2014, 13:40

Hi Alchemist,
Over the last few years I've been developing a simulator for Cry Engine, and I'll be releasing the first version for the free SDK soon. As well as supporting drivable aircraft, ships and spacecraft it supports drivable trains. All vehicles can also operate automatically in AI mode.

To answer your questions:
1. The code automatically generates the tracks from a data file. You can use the simulator editor to create and edit the tracks. I've made tracks over 100 km long. The railtrack autogen code places tracks in-game within a specified distance, and removes them outside the range. This allows tracks of virtually any length to be created, without impacting frame rates.
The rail track autogen also automatically places objects along the tracks, including bridges and tunnels, see screen shots.

2. I recently added code support for train bogies.

3. Rail vehicles use the track data file (created with the editor), so they accurately follow the tracks. The code also supports track branches, so you can create complex rail networks. Currently the code does not support crashes caused by over-speed!

4. If you place a number of wagons/coaches and locomotives on a track, you can drive the locomotive to form a train. When two vehicles meet they are automatically coupled.

The simulator is created almost entirely with Lua code, with the addition of a custom DLL made by Tataru.

If you want to know more, feel free to ask. I'll be releasing a closed beta in a few more days.

Regards,
Chris
Attachments
ScreenShot1613.jpg
ScreenShot1606.jpg
ScreenShot1586.jpg
User avatar Alchemist221276
Just getting started
Just getting started
 
Posts: 6
Member since: 09.04.2013, 00:24
Location: Russia, Ekaterinburg
Likes: 0

Re: How to create a train (rails and other)

Postby Alchemist221276 » 11.10.2014, 22:35

Thank for your answer, cwright.
As I understood from your post, the simulator editor - it's your additional tool for editing the levels of your game, and for rails implementation Cryengine needs some additional modifications, or all of this can be realized on standart scripts of engine?
Can you explain me - how to realize autogen for railtracks? - I need create my own models of rails, because I want create (for begining) levels based on a real russian railroads with a various russian models of railtracks. Is that possible to realize this by road tool (without any additional data file)?
User avatar cwright
Producer
Producer
 
Posts: 2465
Member since: 11.08.2004, 12:38
Likes: 98

Re: How to create a train (rails and other)

Postby cwright » 12.10.2014, 12:31

Hi Alchemist,
Here's some more info.
First, my simulator does not use the game vehicle system. Everything is implemented with custom entities created with Lua code.

The editor is a Lua entity. In its Properties rollup you can set it to edit waypoints, objects, vehicle lights or rail tracks. In game mode the editor displays the available key commands, see screen shot. It lets you slew around the map. You can select a track and change its angle, and all following tracks are automatically updated. You can adjust the height of the selected track. When you've finished, press F9 to save the track data.

The railtrack autogen is another Lua entity. In a text file you can set the objects which will be displayed and their various parameters. It places these object types in its entity slots: brushes, groups of brushes (e.g. a station), effects, lights, the rail tracks, bridges and tunnels. Objects are loaded for rail tracks which are within a set distance from the player. When a track falls behind, the slots are freed and re-used for new objects ahead. This method means that there is no effective limit on the length of rail tracks. Frame rates will be the same if the track is 1 km or 100 km long. One track in a demo map is 70 km long. The autogen uses the data file created by the editor.

The vehicles (locomotives, carriages etc) are also Lua entities. They also use the data file created by the editor. You can enter and drive them just like any other vehicle. You can walk inside the interiors irrespective of how fast the train is going. When you drive (slowly!) into other vehicles they are automatically coupled, so you can form up trains.

You can add any number of branch tracks. The Points entity controls branching. You could build up a complex rail network. Train vehicles can also work in AI mode, using waypoints, so AI trains could stop at stations etc

There will be a public release of the simulator before Christmas, and the beta should be ready in a few more days. My main job is to make a couple more demo maps. Currently I've just started a map with a more complex rail system, see screen shots.

The simulator comes with rail track models included. If you want to make your own, you just need to make track models with the correct lengths (30 meters) and bend angles, and they need to have the correct naming convention. In the railtrack autogen entity Properties, you can specify the folder that contains the track models so, once you've made the models, it's easy to use your own. So, in principle, you could certainly make Russian tracks that would work in the simulator. You could also make Russian locomotives and wagons etc, using my Aircraft Factory utility (all simulator vehicles are made with AF, which automatically creates the Lua code - you don't need to be a Lua programmer).

The simulator includes aircraft, trains, ships, submarines and spacecraft. I will be adding ground/wheeled vehicles, including a car racing system.
I've made temporary ground vehicles, using the game lorry and Abrams models (in effect they are aircraft without wings and taxiing on the ground). But already tank battles using the simulator AI system are quite impressive!

Regards,
Chris
Attachments
ScreenShot1704.jpg
ScreenShot1699.jpg
ScreenShot1707.jpg
User avatar TD_Trader
Just getting started
Just getting started
 
Posts: 7
Member since: 08.11.2014, 11:14
Likes: 0

Re: How to create a train (rails and other)

Postby TD_Trader » 04.12.2014, 06:29

Hi Chris/Alchemist,

I'm currently trying to do the same thing (create a train simulator) and I'm looking to create a train, rails, etc. for a train simulator and I just stumbled upon this post (while doing a search). I'm extremely interested in your Train simulator Chris, do you have a copy available for download? (with sample assets, etc.) I'd love to try out your beta and possibly make some additional maps for your simulator. Could you post a link to your Beta? Could you also include all of your demo maps/assets (so we can see how everything was made, and learn from them).

I would like to create a sample map of the Chicagoland area (including all of the BNSF, CTA and Metra rail lines) and try to build train maps of the local Chicagoland train rails/area.

Could you post it and make it available for download? I'd love to beta test your simulator! :) :) :)
User avatar TD_Trader
Just getting started
Just getting started
 
Posts: 7
Member since: 08.11.2014, 11:14
Likes: 0

Re: How to create a train (rails and other)

Postby TD_Trader » 04.12.2014, 06:47

cwright wrote:The vehicles (locomotives, carriages etc) are also Lua entities. They also use the data file created by the editor. You can enter and drive them just like any other vehicle. You can walk inside the interiors irrespective of how fast the train is going. When you drive (slowly!) into other vehicles they are automatically coupled, so you can form up trains.

You can add any number of branch tracks. The Points entity controls branching. You could build up a complex rail network. Train vehicles can also work in AI mode, using waypoints, so AI trains could stop at stations etc


Sounds great!!

cwright wrote:There will be a public release of the simulator before Christmas, and the beta should be ready in a few more days.


I've been watching this thread for a few days/weeks now, is the public release finished, or is there a beta available that we can download?

cwright wrote:My main job is to make a couple more demo maps. Currently I've just started a map with a more complex rail system, see screen shots.


I'd love to help out with making some demo maps. I am currently trying to do the Chicagoland area (the local rail yards, freight as well as passenger, ie. Metra, CTA, etc.) and would love to use your simulator and help make some additional maps for it.

cwright wrote: The simulator comes with rail track models included. If you want to make your own, you just need to make track models with the correct lengths (30 meters) and bend angles, and they need to have the correct naming convention. In the railtrack autogen entity Properties, you can specify the folder that contains the track models so, once you've made the models, it's easy to use your own.


I'm interested in just building extremely detailed American railroads (starting with the Chicagoland area). Trying to make photorealistic trains and photorealistic scenery.

cwright wrote: using my Aircraft Factory utility (all simulator vehicles are made with AF, which automatically creates the Lua code - you don't need to be a Lua programmer).

The simulator includes aircraft, trains, ships, submarines and spacecraft. I will be adding ground/wheeled vehicles, including a car racing system.
I've made temporary ground vehicles, using the game lorry and Abrams models (in effect they are aircraft without wings and taxiing on the ground). But already tank battles using the simulator AI system are quite impressive!


Chris it all sounds amazing, do you have anything available for download? Do you have a dropbox link, or a place where we can download it from? I'd love to help you with additional map creation.
User avatar cwright
Producer
Producer
 
Posts: 2465
Member since: 11.08.2004, 12:38
Likes: 98

Re: How to create a train (rails and other)

Postby cwright » 04.12.2014, 14:34

Hi TD,
As you may know already, you're an official beta tester. Check your PM.
I'm particularly interested in your ideas for a complex and realistic train system.
You can have any number of AI trains following waypoints (strictly speaking, it's the locomotive that follows the waypoints, the rest of the train carriages etc will follow as they're coupled). I've added a waypoint command for trains, the parameters set the stopping distance and time before it moves off, so you could quite easily have trains arriving/leaving from multiple platforms. The TrainsAndPlanes demo map has a demo of this.
Have fun!
Chris
User avatar DGrimProductions
Executive Producer
Executive Producer
 
Posts: 4542
Member since: 27.03.2013, 15:12
Location: The netherlands
Likes: 452

Re: How to create a train (rails and other)

Postby DGrimProductions » 04.12.2014, 17:13

If you want photorealistic, create 5 LODs for EVERYTHING.
Cause that will cost a lot of drawcalls. Specially with extended rails and detailed maps. I dont know if you just want to recreate or actually make it playable but i guess this apllies to both options
★★★★ General (seriously i talk to much)
ME ARE DADDY!! :)
User avatar Alchemist221276
Just getting started
Just getting started
 
Posts: 6
Member since: 09.04.2013, 00:24
Location: Russia, Ekaterinburg
Likes: 0

Re: How to create a train (rails and other)

Postby Alchemist221276 » 15.04.2015, 11:49

cwright, sorry for a so long pause.
Seems like you only, who tryed to do something for rail transport in CryEngine! )))
And this is not easy work! My respect for you, man!
How can I join for beta testing your work?
User avatar cwright
Producer
Producer
 
Posts: 2465
Member since: 11.08.2004, 12:38
Likes: 98

Re: How to create a train (rails and other)

Postby cwright » 15.04.2015, 13:38

Hi Alchemist,
Nice to hear from you.
You'll be welcome to test the beta, providng you agree to a few simple conditions.
I'll send you a PM shortly.
Note that it's for the fee SDK 3.58. You can download it here, click on the downloads button at the top.
Regards,
Chris
User avatar Alchemist221276
Just getting started
Just getting started
 
Posts: 6
Member since: 09.04.2013, 00:24
Location: Russia, Ekaterinburg
Likes: 0

Re: How to create a train (rails and other)

Postby Alchemist221276 » 18.04.2015, 22:48

Hi, Chris.
I send you the answer to your PM, in which I told you that I accept your conditions, and allready install the free SDK 3.58.
User avatar cwright
Producer
Producer
 
Posts: 2465
Member since: 11.08.2004, 12:38
Likes: 98

Re: How to create a train (rails and other)

Postby cwright » 19.04.2015, 13:49

Hi Alchemist,
Strange, I don't have your PM.
Anyway, I'll PM you shortly with the links.
Best regards,
Chris
User avatar Alchemist221276
Just getting started
Just getting started
 
Posts: 6
Member since: 09.04.2013, 00:24
Location: Russia, Ekaterinburg
Likes: 0

Re: How to create a train (rails and other)

Postby Alchemist221276 » 19.04.2015, 15:34

Hi, Chris.
My suspicions, that there were some troubles with delivering of the previous message, were confirmed.
I sent another PM to you )))