- Home /
Custom tree terrain painting problem.
I'm trying make my own tree models and use the terrain painting tools to place them multiples times, however there's a problem stopping me.
My tree model is made up of 2 meshes: 1 for the trunk and branches and another for the foliage. The problem is that the tree painting tool only accepts single meshes which means I can only paint either foliage or trunk/branches not the whole tree.
I checked the unity documentation on this here
and it says the tree must be made of a single mesh with 2 materials (presumably for the leaves and bark) but I can't see any way of assigning more than one material per mesh.
Any help would be great :)
Answer by Mike 3 · Dec 06, 2010 at 07:18 PM
In the renderer component, you can expand the Materials bit and near the top it'll have a textbox where you can set the number of materials. You then drag the second material into the second slot
Hmm, still a problem. The bark and leaf materials are both applied to all areas of the mesh rather than to their respective places, so I've got both bark and leaves on my trunk and on my foliage :(
Does the mesh have two uv sets at the right points for each material?
Ah, I don't know about UV sets so I probably don't have it set up right. How would I go about doing this?
Not something I can really help with sorry - $$anonymous$$odeling packages are beyond my expertise. I'd check for uv tutorials for whatever tool you're using
Answer by MohdGasim · Feb 09, 2011 at 09:01 PM
HI OD...depending on the 3d application you are using, in my answer im refering to 3d max. pick the first mesh, convert to edit poly (if not already done) then scroll down and select attach, then select the second mesh. this will make the tree into one mesh. For the materials, goto the poly in the modify panel, select element. Assign a material ID to the trunk and a second to the leaves. Next...goto material editor and select Multi/sub material...number of materials 2...assign the number 1 to the trunk material and the number 2 to the leave material...this way you get a single mesh with 2 textures. export to FBX format and your done...a single mesh tree....
Hope this helped.
Answer by ItsaMeTuni · Nov 19, 2015 at 12:28 PM
Did you do the trees with blender? If you have two objects in blender (leaves and trunk), in object mode select the leaves then the trunk (I don't know if the order makes difference) and press Ctrl + J.