Treez

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
 
(53 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a step by step tutorial that will teach you how to create a 3D TREE model for use in Trainz. This method uses PlantFactory (free software) to create the 3D tree model but you could use Blender or any other 3D modelling software in it's place. The principles are the same.
+
[[Image:treez.png|250px|link=https://info.trainzsimulator.com/trainz-plus/#treez]]  [[Image:trainz_trees_join_the_beta.jpg|250px|link=https://forms.gle/cQTjZxixZeCT3DHS7]]  [[Image:discord_community_trees_foliage.jpg|250px|link=https://discord.gg/WgQ5VbUdar]]
  
== Software Requirements ==
+
 
 +
=Software Requirements=
 +
 
 +
This is a step by step tutorial that will teach you how to create a 3D TREE model for use in Trainz. This method uses PlantFactory (free software) to create the 3D tree model but you could use Blender or any other 3D modelling software in its place. The principles are the same.
  
 
Before you start you will need:
 
Before you start you will need:
  
* A copy of Trainz that has a build number that is [insert number] or higher. This can be purchased on the [https://store.trainzportal.com Trainz Store], STEAM or Mac Store.
+
* A copy of [["Trainz-build" number|Trainz version 5.6]] or newer. Currently this is in development so in order to test this new foliage system you must be part of the BETA - [https://forms.gle/cQTjZxixZeCT3DHS7 JOIN].
  
 
* A copy of [https://www.bentley.com/software/e-on-software-free-downloads/ PlantFactory 2024]. Click the Download button on that page, agree to the EULA and the next page the software should show for download.
 
* A copy of [https://www.bentley.com/software/e-on-software-free-downloads/ PlantFactory 2024]. Click the Download button on that page, agree to the EULA and the next page the software should show for download.
  
* You need a set of textures (Bark and Leaves at a minimum) for your trees. These can be created from scratch using the likes of [https://www.adobe.com/au/products/photoshop.html Photoshop] (paid) or [https://www.gimp.org GIMP] (free). You can look to source them from many different websites including [https://substance3d.adobe.com/assets/allassets?q=leaf%20fir%20branch&sort=-searchScore Adobe Substance Library] or other stock places. There are many other places you can purchase tree stock as a base or to get ideas to build from including [https://www.cgtrader.com/search?keywords=tree CGTrader], [https://www.turbosquid.com/Search/Index.cfm?keyword=tree&media_typeid=2 TurboSquid] and more.
+
* You need a set of textures (Bark and Leaves at a minimum) for your trees. These can be created from scratch using the likes of [https://www.adobe.com/au/products/photoshop.html Photoshop] (paid) or [https://www.gimp.org GIMP] (free). You can look to source them from many different websites including [https://substance3d.adobe.com/assets/allassets?q=leaf%20fir%20branch&sort=-searchScore Adobe Substance Library] or other stock places. There are many other places you can purchase tree stock as a base or to get ideas to build from including [https://www.cgtrader.com/search?keywords=tree CGTrader] and [https://www.turbosquid.com/Search/Index.cfm?keyword=tree&media_typeid=2 TurboSquid].
 
   
 
   
== PlantFactory ==
 
  
===Examples===
+
=PlantFactory Examples & Files =
  
 
A good place to start is with one of our PlantFactory templates. This can speed up your development a lot, especially if you are new to PlantFactory.
 
A good place to start is with one of our PlantFactory templates. This can speed up your development a lot, especially if you are new to PlantFactory.
  
[insert template 1]
+
[https://images.n3vgames.com/uploads/content_creation/trainz_pf_basic_tree_example_files.zip Download Youtube Video 1 Example Files]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/trainz_pf_tree_1_example_files.zip Download Youtube Video 2 Example Files]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/tree_1_textures.zip Download Texture Package 1]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/tree_2_textures.zip Download Texture Package 2]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/tree_3_textures.zip Download Texture Package 3]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/tree_4_textures.zip Download Texture Package 4]
 +
 
 +
[https://images.n3vgames.com/uploads/content_creation/tree_5_textures.zip Download Texture Package 5]
 +
 
 +
 
 +
=Tree Asset Creation Overview=
 +
 
 +
Trees are created as standard [[KIND Scenery|scenery]] assets.
 +
 
 +
They use the [[FBX file format]] for their mesh files.
 +
 
 +
.PNG or .TGA is recommended for the [[Texture file|textures]].
 +
 
 +
Trees may use standard materials, but benefit heavily from the new foliage-specific materials are outlined below.
 +
 
 +
The texture setup is outlined below.
 +
 
 +
You should try and keep the highest LOD under 5000 polygons. Each additional LOD level should drop down by at least 25%. Your lowest LOD should be under 1000 polygons, ideally under 500 polygons. There is no need to create bottom-LOD billboards as Trainz will create this for you using a new [[Imposter system]] that will release alongside [[Treez]].
 +
 
 +
If using PlantFactory you will want to get the example files above and look at the [[Mesh metadata file]]s to determine what additional tags are being used. You will also want to watch the PlantFactory video information below to understand how to use the program and also how to export from PlantFactory, setup your Trainz Asset and import into Trainz.
 +
 
 +
If you are using another 3D modelling program to create your trees and want to use [[m.leafcardbillboard|camera facing leaf cards]] then you must point your leaf card geometry in the positive X direction. Each leaf card must be a separate mesh within the FBX so they can rotate separately.
 +
 
 +
 
 +
[[Image:leaf_card_blender.jpg|400px]] [[Image:leaf_card_blender_2.jpg|384px]] [[Image:leaf_card_blender_3.jpg|350px]]
 +
 
 +
 
 +
=Materials=
 +
 
 +
There are two new materials to use for trees.
 +
 
 +
'''[[m.leafcard]]''' - Use this material for your transparent leaf cards that are not camera facing. This material structure is identical to [[m.pbrmetal]]. The only difference in setup is the name of your material.
 +
 
 +
'''[[m.leafcardbillboard]]''' - Use this material for your transparent leaf cards that are to be camera facing. This material structure is identical to [[m.pbrmetalmasked]]. The only difference in setup is the name of your material.
 +
 
 +
 
 +
=Textures=
 +
 
 +
The makeup of both [[m.leafcard]] and [[m.leafcardbillboard]] is similar to [[m.pbrmetalmasked]].
 +
 
 +
The one exception is that the blue channel in the parameters texture is used to modulate the strength of the directional lighting. This is intended to give the feel of individual leaves being deeper inside the tree and shadowed from all directions, even though the leaf card as a whole is not shadowed. (Note that this is the same channel used for Ambient Occlusion on m.pbrmetal; the leaf card materials do not support ambient occlusion.)
 +
 
 +
Full brightness (100% blue channel) gives a standard lighting response, while darker values give a weaker response to directional lighting.
 +
 
 +
Here is an example of what the blue (AO) channel could look like in the parameters texture for both [[m.leafcard]] and [[m.leafcardbillboard]].
 +
 
 +
[[Image:directional_light_Scattering.jpg|400px]]
 +
 
 +
 
 +
=PlantFactory Tutorial=
 +
 
 +
Once the software starts up and you've either loaded one of the templates above or you've started a new tree from scratch, if you are new to PlantFactory, you will want to read the "PlantFactory — Reference Manual" (specifically 'Section 5 - Modifying Plants: Using Parameters') which can be accessed by clicking on the Main Menu -> Help -> Reference Manual. This manual explains everything you need to know about the software. It is definitely worth the read.
 +
 
 +
For those that want to come back to the manual later, here is a video breakdown on a very raw PlantFactory / Trainz explanation you can get started with.
 +
 
 +
[[Image:plantfactory_trainz_1.jpg|750px|link=https://www.youtube.com/watch?v=pNY0kHEqsTQ]]
 +
 
 +
[[Image:plantfactory_trainz_2.jpg|750px|link=https://www.youtube.com/watch?v=c-LA4VkZrvs]]
 +
 
 +
===Work-in-Progress Test Trees===
 +
 
 +
There isn't one way to create trees in PlantFactory but these trees were created using the procedural node method.
  
[insert template 2]
+
[[Image:plantfactory_trainz_0_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_0_g.jpg|300px]]
  
[insert template 3]
+
[[Image:plantfactory_trainz_2_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_2_g.jpg|300px]]
  
[insert template 4]
+
[[Image:plantfactory_trainz_3_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_3_g.jpg|300px]]
  
[insert template 5]
+
[[Image:plantfactory_trainz_4a_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_4b_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_4_g.jpg|300px]]
  
===PlantFactory Tutorial===
+
[[Image:plantfactory_trainz_5a_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_5b_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_5_g.jpg|300px]]
  
Once the software starts up and you've either loaded one of the templates above or you've started a new tree from scratch, if you are new to PlantFactory, you will want to read the "PlantFactory — Reference Manual" that can be accessed by clicking on the Main Menu -> Help -> Reference Manual. This manual explains everything you need to know about the software. It is definitely worth the read.
+
[[Image:plantfactory_trainz_6_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_6_g.jpg|300px]]
  
For those that want to come back to the manual later, here is a video breakdown on the core essentials.
+
[[Image:plantfactory_trainz_7_i.jpg|300px]]
 +
[[Image:plantfactory_trainz_7_g.jpg|300px]]

Latest revision as of 12:42, 17 June 2024

Treez.png Trainz trees join the beta.jpg Discord community trees foliage.jpg


Contents

[edit] Software Requirements

This is a step by step tutorial that will teach you how to create a 3D TREE model for use in Trainz. This method uses PlantFactory (free software) to create the 3D tree model but you could use Blender or any other 3D modelling software in its place. The principles are the same.

Before you start you will need:

  • A copy of Trainz version 5.6 or newer. Currently this is in development so in order to test this new foliage system you must be part of the BETA - JOIN.
  • A copy of PlantFactory 2024. Click the Download button on that page, agree to the EULA and the next page the software should show for download.
  • You need a set of textures (Bark and Leaves at a minimum) for your trees. These can be created from scratch using the likes of Photoshop (paid) or GIMP (free). You can look to source them from many different websites including Adobe Substance Library or other stock places. There are many other places you can purchase tree stock as a base or to get ideas to build from including CGTrader and TurboSquid.


[edit] PlantFactory Examples & Files

A good place to start is with one of our PlantFactory templates. This can speed up your development a lot, especially if you are new to PlantFactory.

Download Youtube Video 1 Example Files

Download Youtube Video 2 Example Files

Download Texture Package 1

Download Texture Package 2

Download Texture Package 3

Download Texture Package 4

Download Texture Package 5


[edit] Tree Asset Creation Overview

Trees are created as standard scenery assets.

They use the FBX file format for their mesh files.

.PNG or .TGA is recommended for the textures.

Trees may use standard materials, but benefit heavily from the new foliage-specific materials are outlined below.

The texture setup is outlined below.

You should try and keep the highest LOD under 5000 polygons. Each additional LOD level should drop down by at least 25%. Your lowest LOD should be under 1000 polygons, ideally under 500 polygons. There is no need to create bottom-LOD billboards as Trainz will create this for you using a new Imposter system that will release alongside Treez.

If using PlantFactory you will want to get the example files above and look at the Mesh metadata files to determine what additional tags are being used. You will also want to watch the PlantFactory video information below to understand how to use the program and also how to export from PlantFactory, setup your Trainz Asset and import into Trainz.

If you are using another 3D modelling program to create your trees and want to use camera facing leaf cards then you must point your leaf card geometry in the positive X direction. Each leaf card must be a separate mesh within the FBX so they can rotate separately.


Leaf card blender.jpg Leaf card blender 2.jpg Leaf card blender 3.jpg


[edit] Materials

There are two new materials to use for trees.

m.leafcard - Use this material for your transparent leaf cards that are not camera facing. This material structure is identical to m.pbrmetal. The only difference in setup is the name of your material.

m.leafcardbillboard - Use this material for your transparent leaf cards that are to be camera facing. This material structure is identical to m.pbrmetalmasked. The only difference in setup is the name of your material.


[edit] Textures

The makeup of both m.leafcard and m.leafcardbillboard is similar to m.pbrmetalmasked.

The one exception is that the blue channel in the parameters texture is used to modulate the strength of the directional lighting. This is intended to give the feel of individual leaves being deeper inside the tree and shadowed from all directions, even though the leaf card as a whole is not shadowed. (Note that this is the same channel used for Ambient Occlusion on m.pbrmetal; the leaf card materials do not support ambient occlusion.)

Full brightness (100% blue channel) gives a standard lighting response, while darker values give a weaker response to directional lighting.

Here is an example of what the blue (AO) channel could look like in the parameters texture for both m.leafcard and m.leafcardbillboard.

Directional light Scattering.jpg


[edit] PlantFactory Tutorial

Once the software starts up and you've either loaded one of the templates above or you've started a new tree from scratch, if you are new to PlantFactory, you will want to read the "PlantFactory — Reference Manual" (specifically 'Section 5 - Modifying Plants: Using Parameters') which can be accessed by clicking on the Main Menu -> Help -> Reference Manual. This manual explains everything you need to know about the software. It is definitely worth the read.

For those that want to come back to the manual later, here is a video breakdown on a very raw PlantFactory / Trainz explanation you can get started with.

Plantfactory trainz 1.jpg

Plantfactory trainz 2.jpg

[edit] Work-in-Progress Test Trees

There isn't one way to create trees in PlantFactory but these trees were created using the procedural node method.

Plantfactory trainz 0 i.jpg Plantfactory trainz 0 g.jpg

Plantfactory trainz 2 i.jpg Plantfactory trainz 2 g.jpg

Plantfactory trainz 3 i.jpg Plantfactory trainz 3 g.jpg

Plantfactory trainz 4a i.jpg Plantfactory trainz 4b i.jpg Plantfactory trainz 4 g.jpg

Plantfactory trainz 5a i.jpg Plantfactory trainz 5b i.jpg Plantfactory trainz 5 g.jpg

Plantfactory trainz 6 i.jpg Plantfactory trainz 6 g.jpg

Plantfactory trainz 7 i.jpg Plantfactory trainz 7 g.jpg

Personal tools