- Home /
How do I use custom tree geometry in Unity?
I have a large Speedtree library of multiple varieties of trees I would like to be able to import into Unity and use in tandem with their tree system (wind, shading, etc). Does anyone know of a good process?
I can export fbx or obj right out of Speedtree, but importing isn't as straight forward as I hoped. Other than applying the "nature/ tree soft occlusion" shaders to my textures, and putting the tree object in an 'ambient occlusion' projects folder, I'm unaware of what to do.
Also, do the soft occlusion nature shaders allow normal/ spec mapping? Keep in mind I have leaf textures with alpha channel transparency and I would like to use accompanying normal and spec textures. Would I be better off importing trunks, branches, and leaves separately and combining into a single prefab? Could I apply wind to these tree prefabs?
If anyone has any answers, ideas, or useful resources, they would be much appreciated. Thank you.
I UNFOR$$anonymous$$ATTED your post.. when you indent a line by four (or more) spaces, it will be interpreted as code, so don't do that except for code snippets!
Answer by ArealPerson · Nov 14, 2012 at 01:27 AM
You must pay for that level of support.
Nobody going to help you.
I wasn't asking how to implement full speedtree functionality into Unity. I was merely asking how to incorporate standard .fbx models, exported from speedtee, into unity's terrain/ foliage system. It may be too complicated for you, but I'm sure someone has a decent handle on it and may be willing to help.
I wouldnt answere to a comment like that Rick. Here are some really experienced devs that always like to help. Since I will also soon need alot of trees and implement it in unity, Im also intrested in it (any many more im sure)
Unfortunately I cant help you, just wanted to mention it...
Answer by larsbertram1 · May 12, 2013 at 10:52 PM
hi there, using the "nature/ tree soft occlusion" shaders on imported tree models is the easiest way to make those trees work correctly within unity's terrain engine – however they do not support realtime shadows or bump mapping. look for the advanced terrain shaders on the asset store to at least add bump mapping and real time shadows to the trunk and branches. for more advanced lighting (using the tree creator shaders) you would need to setup bending on your models which is a quite complex process involving vertex painting and uv editing.
lars
Thanks. Unfortunately the process isn't that simple. Using the soft occlusion shaders lets me place the trees using the terrain system, and it lights O$$anonymous$$, but the wind properties are terrible. The trees animate very stiff and in unison. No variation between leaf geometry or individual trunks/ branches. We are looking into the advanced foliage shaders, but good materials aren't going to help me if the wind behavior remains so bad.
hi, yes, as i have written above: in order to use the tree creator shders you have to prepare all your trees carefully adjusting vertex colors and setting up a second uv. i don’t know how speedtree setups their models but maybe all needed information is right there and you just have to swap some channels…
lars