M.leafcardbillboard

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
[[m.leafcardbillboard]] is a variation on the [[m.pbrmetalmasked]] material. Introduced with the new foliage system "[[Treez]]", it is used when creating transparent camera facing leaf cards on trees and plants.  
+
[[m.leafcardbillboard]] is a camera-facing variation of the [[m.leafcard]] material, introduced as part of the "[[Treez]]" foliage system. It is used when creating leaves and minor branches for trees and plants, and is tuned to provide visual outcomes which are suitable for this usage. This may result in subtle rendering differences when compared to the standard materials such as [[m.pbrmetal]]. The exact nature of these differences may change in the future. These differences make [[m.leafcardbillboard]] unsuitable as a general-purpose billboard material.
 +
 
  
  
Line 5: Line 6:
  
  
This page describes content format v5.6 and assumes that the FBX file format is used as a data source for any meshes.
+
This page describes [["Trainz-build" number|Content Format v5.6]] and requires that the [[FBX file format]] is used as a data source for any meshes.
 +
 
 +
We recommend using the free PlantFactory software to create trees with this material type. Detailed tutorials are available on the [[Treez]] page.
  
  
Line 12: Line 15:
 
[[Image:m_leaf_card_billboard_cam_face_1.gif|500px]]
 
[[Image:m_leaf_card_billboard_cam_face_1.gif|500px]]
  
If using PlantFactory you will want to get the example files on the [[Treez]] page. You will also want to watch the PlantFactory video information on [[Treez]] page so you can 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 a standard 3D modelling program to create your trees and wish to use camera facing leaf cards then you must point your leaf cards in the positive X direction. Each leaf card must be configured as a separate mesh within the FBX file so they can rotate separately.
 
+
If you are using another 3D modelling program to create your trees and wish to use camera facing leaf cards then you must point your leaf cards in one single direction. The default is the positive X direction. Also each leaf card must be an individual mesh so they can rotate individual.
+
  
  
 
[[Image:leaf_card_blender.jpg|400px]] [[Image:leaf_card_blender_2.jpg|384px]] [[Image:leaf_card_blender_3.jpg|350px]]
 
[[Image:leaf_card_blender.jpg|400px]] [[Image:leaf_card_blender_2.jpg|384px]] [[Image:leaf_card_blender_3.jpg|350px]]
 
 
If you do not point your leaf cards in the default positive X direction, you can rotate the leaf cards around X, Y or Z using the following tag in the metadata file.
 
 
camera-facing-rotate-normals      0,180,0
 
 
0,180,0 is just an example. Use the values you require to get your leaf cards facing in the correct direction when importing into Trainz. Find out more information on the Trainz [[Mesh_metadata_file]] wiki page.
 
  
  
Line 33: Line 27:
 
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.
 
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.
  
A: The alpha channel provides a "black and white" [[masked alpha]] channel. Black indicates full transparency, meaning that the [[fragment]] is discarded. White indicates full opacity, meaning that rendering proceeds as per [[m.pbrmetal]]. If the alpha channel is omitted, this material acts exactly as [[m.pbrmetal]] except with lower performance. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.
+
A: The alpha channel provides an opacity channel. Black indicates full transparency, meaning that the [[fragment]] is discarded. White indicates full opacity. Shades of gray are supported, which represent partial transparency. The alpha channel may be heavily quantised.
 
+
You may need to include an alpha-hint tag in your albedo texture.txt file.  See [[.texture.txt_Files]].  If creating a double sided material using metadata you should also consider using a blend-mode tag.  See [[Mesh_metadata_file]].
+
  
  

Latest revision as of 15:23, 10 June 2024

m.leafcardbillboard is a camera-facing variation of the m.leafcard material, introduced as part of the "Treez" foliage system. It is used when creating leaves and minor branches for trees and plants, and is tuned to provide visual outcomes which are suitable for this usage. This may result in subtle rendering differences when compared to the standard materials such as m.pbrmetal. The exact nature of these differences may change in the future. These differences make m.leafcardbillboard unsuitable as a general-purpose billboard material.


M leaf card billboard tree 1.jpg


This page describes Content Format v5.6 and requires that the FBX file format is used as a data source for any meshes.

We recommend using the free PlantFactory software to create trees with this material type. Detailed tutorials are available on the Treez page.


Contents

[edit] Camera Facing Leaf Cards

M leaf card billboard cam face 1.gif

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


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


[edit] Texture Slots

The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.

[edit] Albedo

RGB: The albedo map defines the base color of each texel. The sRGB color space is used.

A: The alpha channel provides an opacity channel. Black indicates full transparency, meaning that the fragment is discarded. White indicates full opacity. Shades of gray are supported, which represent partial transparency. The alpha channel may be heavily quantised.


Albedo Texture Example

M leafcard billboard 1.png

Color Channel Separated

M leafcard billboard 2.jpg

Alpha Channel Separated

M leafcard billboard 2b.jpg


[edit] Normal

RGB: Surface normal map. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a texture atlas is acceptable. Per-pixel manipulation or use of filters on the "RGB" channels is not acceptable.

Normal Texture Example with no Alpha Channel (Parallax)

M leafcard billboard 3.jpg


[edit] Parameter

This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.

M leafcard billboard 4.jpg


R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.

Parameters (Emissive - Red Channel) Texture Example

M leafcard 5.jpg


G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the PBR metal workflow for details.

Parameters (Roughness - Green Channel) Texture Example

M leafcard billboard 6.jpg


B: The blue channel of 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.

Parameters (Directional Lighting Strength - Blue Channel) Texture Example

M leafcard billboard 7.jpg


A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the PBR metal workflow for details.

Parameters (Metallic - Alpha Channel) Texture Example

M leafcard 8.jpg

[edit] Examples

Personal tools