======Mesh Generator====== {{:mesh_gen.jpg?100 |}} The Mesh generator makes mesh assets part of the model. It’s often used to import photogrammetry models as either a trunk to build off or a branch structure to use in procedural generation. ===== Generation ===== Refer to [[generation_properties|Generation properties]]. ===== Random Seeds ===== Refer to [[random-seeds-properties|Random seeds properties]]. ===== Mesh ===== The properties in this group control which material/mesh asset combinations are used by the generator and at what size they appear. ==== Material ==== Select a material/mesh combination for the mesh. Meshes must be assigned to the material on the [[toolmaterialsassetsbar|Material Bar]] to be used on the Mesh Generator. Materials are chosen based on their weights and [[kcseasons|season]] settings. === Material === Specify a named material from the [[toolmaterialsassetsbar|Material Bar]]. If **None** is selected or the chosen material has no assigned mesh, there will be no geometry generated. === Mesh === Select which assigned mesh is used. === Weight === Set the probability that a node will receive this material (this weight divided by the sum of all weights). ==== Render Material ==== Select a material/mesh combination for the mesh to use during rendering and exporting. If no render material is selected, the mesh uses the regular material assignment. Meshes must be assigned to the material on the [[toolmaterialsassetsbar|Material Bar]] to be used on the Mesh generator. Materials are chosen based on their weights and [[kcseasons|season]] settings. The normal course of action for using a render material is as follows: - Assign a material mesh combo as the basis for the mesh - Add as many bake stitches as necessary to extend/replace parts of the mesh - Use "Bake Stitch Tools:Create and assign new material" to create a new material that has the stitch data baked in - Assign the new material as the render material for use in the Tree Window and in exports === Material === Specify a named material from the [[toolmaterialsassetsbar|Material Bar]]. If **None** is selected or the chosen material has no assigned mesh, there will be no geometry generated. === Mesh === Select which assigned mesh is used. === Weight === Set the probability that a node receives this material (this weight divided by the sum of all weights). ==== Use actual size ==== When enabled, the mesh will be the same size as it was in its original file. Otherwise, the size of the mesh will be unitized (i.e., fit in a unit box). ==== Scale ==== Scale the size of the mesh. ==== + % of parent ==== This value is multiplied by the size of the parent node and added to the size of the mesh. Use this value when combining meshes procedurally to ensure that meshes further down the hierarchy gradually decrease in size. ==== Adjust size for group ==== When enabled, all meshes assigned to a given material are given proportional sizes. Use this option to ensure multiple meshes assigned to the same material are sized appropriately relative to each other. ==== Group size scale ==== Edit this curve to adjust the scale value used when **Adjust size for group** is enabled. A Linear growth curve is the default and represents accurate size corrections. Adjust this curve upward to scale some objects more. Adjust it downwards to scale them less. ====Resolution==== The properties in this group influence the resolution of the mesh. ===Mesh LOD=== This curve sets which mesh version (High, Medium, or Low detail on the mesh asset) is used based on the active resolution. ===Mesh LOD offset=== When set to a value other than 0, the mesh currently assigned will go up or down in mesh resolution (High, Medium, or Low detail on the mesh asset). Use this property (especially in conjunction with its parent curve) to adjust mesh resolution throughout the model. **Note:** **Mesh LOD** and **Mesh LOD offset** both require meshes assigned in at least two of the three mesh asset LOD slots. ===== Orientation ===== Use these properties to rotate the mesh after it has been oriented relative to its parent. ==== Rotate ==== Rotations happen in the order they are listed here. If a mesh is added directly to the Tree generator, you can switch into node editing mode and use the transform gizmo to move/orient the mesh. **Note:** In generator mode, select the mesh and press W or E to enter translate or rotate mode, respectively. === X === Rotate around the x-axis (1.0 equals a complete rotation). === Y === Rotate around the y-axis (1.0 equals a complete rotation). === Z === Rotate around the z-axis (1.0 equals a complete rotation). ===== Deformation ===== If a Mesh generator is added as a child of a Branch generator, the Branch generator will deform the mesh. Use the properties in this group to control how far along the branch the mesh is placed. **Note:** Meshes must point along the y-axis in order to be deformed. ====Lock to parent==== When enabled, meshes will make themselves exactly as long as the branch they are placed on. When disabled, the size properties in the mesh group control the size of the mesh. ====Start==== Use these properties to specify the anchor point along the parent spine. ===Absolute=== The mesh will be anchored this fixed distance along its parent's spine. ===+ % of parent=== This percentage of its parent's size is added to the distance along the spine where the mesh begins. ==== Radial scale ==== This property scales the x and z coordinates of the mesh to narrow its apparent radius. This operation deforms the mesh but can help make a mesh match the intended look. ===== Weld ===== The properties in this group only apply to meshes that are deformed by a spine that is attached to a Mesh or Branch generator. Welded meshes are modified to blend smoothly into their parent mesh. Enable hints to see a visual indicator of some of the weld data while you work. ==== Enabled ==== When checked, the mesh will attempt to weld to the first ancestor where welding is possible (usually another Mesh or a Branch generator). ==== Keep ==== When checked, failed welds will not result in the mesh being removed (or modified at all). ==== Start ==== Control how far along the mesh the start point of the weld is located. ==== Distance ==== Set the distance of the weld region. Lower values result in more deformation in the weld region. It’s not necessary for this distance to reach all the way to the parent. ==== Clearance ==== Set a radial distance sufficient to cover the radius of the weld region. Only sections of the model that fall between the start location and the distance of the region that are also within the clearance radius will be eligible for welding. ==== Geometry ==== The properties in this group control the geometrical detail and makeup of the weld region. === Segments === Set the number of slices in the weld region. Each slice adds shape detail at the expense of more polygons. === Spread === Control how much the geometry spreads out as it attaches to the parent. ===== Dynamic LOD ===== The properties in this group control how the mesh reacts to level-of-detail computations. ==== Treat as ==== Select the type of geometry that the mesh will be grouped with for LOD computations from the following options: ^**Property**^**Description**^ |**Meshes**|The mesh will be present in all LODs but it can reduce in polygon count based on the assigned LOD meshes and the **Mesh index** property.| |**Branches**|The mesh will be grouped with branches and may be dropped at any LOD.| |**Leaves**|The mesh will be grouped with leaves and may be dropped at any LOD.| |**Fronds**|The mesh will be grouped with fronds and may be dropped at any LOD.| |**Decorators**|The mesh will be grouped with decorators and may be dropped at any LOD.| ==== Weight ==== Increase or decrease the likelihood that meshes in this generator will survive the LOD process (vs. whatever it's grouped with in other generators). Use the parent curve to target specific areas of the model. **Note:** Weight has no effect when **Treat as** is set to **Mesh**, as all meshes will survive the LOD process. ==== Mesh index ==== This curve controls which mesh LOD (if present) is used for each LOD state. The left side of the curve corresponds to the highest LOD. The right side corresponds to the lowest LOD. =====Bake Stitch Tools===== Use these tools as a final step when working with bake stitches on a mesh. ====Resolution==== Set the resolution of the updated texture maps relative to the original file sizes. Use smaller resolutions for faster previews. ====Create and assign new material==== Export updated texture maps, create a new material, and assign the new material to the mesh. ====Export maps only==== Export updated texture maps. =====Wind===== Choose if wind interacts with the mesh. ^**Property**^**Description**^ |**Auto**|Apply wind if stitches or deformation are present.| |**Yes**|Apply wind.| |**No**|Don’t apply wind.| ===== Lightmap ===== The property in this group affects the influence meshes in this generator have on the [[kcgameslightmap|lightmap]]. **Note:** Not all versions of the Modeler support lightmap UV computation. ====Weight==== Use this property to increase or decrease the importance of this generator's meshes in the lightmap -- in relation to the lightmap weight of all other objects -- before lightmap packing is determined. Note that your **Weight** value may not be honored exactly or may get so large as to exhibit unexpected results. Use **Tools** > **Reset lightmap scalars** to go back to default values for the whole model.