Speedtree duplicates materials and elements
I tried importing a sample speedtree into UE 4 and I noticed that the imported tree has four elements opposed to just having two (back, fronds/branches). Wouldn't this result in twice the amount of draw calls than what is necessary? In the speedtree modeler there are three materials. One for the bark and one for the branches and fronds and finally one for the branch caps. In the speedtree compiler the branch material and branch caps are merged into one texture atlas, so that there are only two different materials.
Yet in the editor there are four elements in the mesh. The materials are also duplicated, they have exact same layout, same nodes and same properties: http://imgur.com/a/6QA1U
Is this a bug in the importer or am I just doing the trees wrong?
asked Mar 08 '15 at 01:40 PM in Bug Reports
What you are seeing is correct for that tree. Even without branch seam smoothing (see below), that tree would have 3 draw calls on the highest LOD, and 2 after that (caps are usually dropped with the first LOD).
Any material that gets atlassed can be batched together when the geometry has the same wind shader. So caps and fronds can be batched together. Leaves are batched together.
The only weird thing you are seeing is branch seam smoothing. Branches with the same material are batched together. But when branch seam smoothing is enabled on the material, a small piece of geometry at the base of the branch is broken out to be rendered separately with two texture lookups to do the blending. When you imported the tree, though, you didn't select the branch seam smoothing option in the import dialog, so basically those materials ended up the same. If you don't want branch seam smoothing, then disable it on the material in the modeler and that little ring of geometry on each branch won't be broken out.
EDIT: branch seam smoothing is also usually dropped with the first LOD
Follow this question
Once you sign in you will be able to subscribe for any updates here