====== Custom Mesh Trunk ====== This an how-to page for creating a custom trunk mesh in an external program and then importing it into SpeedTree in order to grow branches and foliage from the trunk. {{ :bristlecone.jpg?nolink&400 |}} \\ Once the mesh for the trunk is created in an external program, you need to then export it as an ‘OBJ’. ---- ==== Things to be aware of when making trunk mesh ==== 1. It is important to map the UV texture in the external program because once the mesh is imported and defined as a ‘__Mesh Frond__’, the material assigned to the mesh will not have a capability for UV texture editing, only ‘__Displacement__’ property controls will be applicable. 2. Also, making sure that the mesh is centered at origin, so that when it is imported into SpeedTree, the mesh will have the origin and pivot point at 0. In SpeedTree, open a new file and in the ‘__Generation editor__’ create a ‘__Mesh Frond__’ node. \\ \\ ==== Once the ‘Mesh Frond’ generator node is created, you can import and place the trunk mesh by... ==== {{:custommeshes.jpg?nolink&350 |}} \\ **1.** Under the ‘__Meshes__’ tab, there is an icon with a plus sign. Click the icon and browse and select the ‘OBJ’ file. Depending on the orientation of the program you used, you may have to change the ‘__Orientation__’ property in this tab window, so that the mesh trunk is ‘Z’ up. (‘Z’ up is SpeedTree’s orientation unless you set it up to match 3D Max or Maya) ^ For example, ‘Y’ up in Maya will have the ‘__Orientation__’ setting of ‘Z’ up right-hand or left-hand.^|| \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ {{:cuustommaterial.jpg?nolink&350 |}} **2.** Do the same for the material bark texture in the ‘__Materials__’ tab. Also, make sure to assign a color set for the bark material. \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ **3.** Then click the ‘__Mesh Frond__’ generator, go to the property bar on the left hand side, and under the ‘__Materials__’ group, click the plus icon in the ‘Frond’ group. This will allow you to indicate the ‘Geometry’ (the mesh trunk) and the ‘__Material__’ (the bark texture for the trunk) you wish to use. \\ {{ :custtrunkmaterialsettings.jpg?nolink |}} \\ \\ ---- {{ :customtrunk.jpg?nolink&280|}} ===== Tips: ===== * If the mesh trunk is not placed in the center, go into the ‘__Mesh Fond__’ property bar and, under generation, make sure the ‘__Start__’ and ‘__End__’ values are 0. * **Sizing**: To proportionately make the mesh trunk larger or smaller, then increase the ‘__Length__’ value, which is found in the ‘__Property Bar__’ editor under the ‘__Spine__’ group. * **Branches:** Now that there’s a trunk, adding branches will work just like it would when using a trunk template. The only difference is that the first set of branches will protrude from the center of the mesh trunk and branch intersection blending will not work, so at the junctions of the branches will not have seamless texture blending. All the other properties and controls will work normally. To get a desirable angle for these branches, I would use the ‘__Start Angle__’ property. \\ Any generators and leaf meshes from then on will function normally.