Changes

Jump to navigation Jump to search
63 bytes added ,  00:25, 7 October 2018
Line 25: Line 25:     
=== Meshes and materials ===
 
=== Meshes and materials ===
Meshes will be loaded from the Models tag. The Models  tag should contain children tags that define meshes. Each mesh tag should have a File tag, with the relative path to an obj file, a Position, Rotation and Scale. Optionally, the mesh tag can have a Parent tag, to make it a child transform of the ith mesh loaded (Zero index), a ComponentName tag to name the mesh for later reference and a Material tag to give it a material.
+
Meshes will be loaded from the Models tag. The Models  tag should contain children tags that define meshes. Each mesh tag should have a File tag, with the relative path to an obj file, a Position, Rotation and Scale. Optionally, the mesh tag can have a Parent attribute, to make it a child transform of an object with the specified name, a ComponentName tag to name the mesh for later reference(e.g. to make it a parent for another mesh or transform) and a Material tag to give it a material.
    
Materials can either be any material you want or the default material, which is much better performance wise and allows the player to colorize the furniture. If you don't specify a material, the default material will be used and the meshes should be UV mapped according to the texture shown below. You can also supply your own texture to be used by the default material, in which the red color channel will be mapped to color 1, green is color 2 and blue is color 3. Grayscale pixels will not be color mapped. The alpha channel controls smoothness/specularity where 99% transparent means full specularity. 100% transparency is specifically used for glow in the dark materials, but note that Photoshop destroys RGB channels for transparent pixels when you save as PNG, unless you keep the alpha mask on your layers before you save and you need to have a color defined for the glow.
 
Materials can either be any material you want or the default material, which is much better performance wise and allows the player to colorize the furniture. If you don't specify a material, the default material will be used and the meshes should be UV mapped according to the texture shown below. You can also supply your own texture to be used by the default material, in which the red color channel will be mapped to color 1, green is color 2 and blue is color 3. Grayscale pixels will not be color mapped. The alpha channel controls smoothness/specularity where 99% transparent means full specularity. 100% transparency is specifically used for glow in the dark materials, but note that Photoshop destroys RGB channels for transparent pixels when you save as PNG, unless you keep the alpha mask on your layers before you save and you need to have a color defined for the glow.

Navigation menu