Custom Terrain and foliage, no Unity Terrain, how to get tree bending?

So, as I understand it, if you’re not using the Unity terrain system, you cannot use the tree bending. So, what approach would be best, using some joints in the custom made trees, with some programmed animation? Would this be a big performance hit over the UV blending stuff that is done to bend trees in the engine?

I’m sure creating a custom tree bender is doable, but seems daunting.

To answer “why don’t you want to use Unity Terrain?Unity Trees?” -
My terrain is created in modeling program and optimized as such. Same for trees, when created in modeling software, there is more possibility, and more control over quality and optimization.

I am so disappointed there is no built in support for custom stuff, but I’m making due. If worst comes to worst, I’ll use Unity Terrain and Unity Trees, unhappily. It’s a great set of features for most needs/casual game devs, but not for me.

bump

bump

There is no inter app standard for tree bending.

As such you can fill in the vertex colors of your tree Mesh and use the Unity Tree shaders that will apply bending for you. Or you can figure out any other way to make your tree move. Adding a skeleton to one tree is no problem, but if you add a whole forest you’ll feel the pain because skinned meshes are never batched. So each tree will automatically become at least 1 draw call.

That is the one thing I don’t understand how to proceed. What exactly do I need to do with those vertex colors? I have a vertex painting app I purchased from asset store. Am I supposed to be painting channels a certain way? Creating the textures a certain way?.. And is this different from the tree leaves?.. :face_with_spiral_eyes:

If you have to avoid the Unity terrain system try using armature and the tree system in Blender:

There’s quite a few tutorials on the web for sapling:

http://www.youtube.com/watch?v=aWSLEcPhFJ0

I’ve not a clue what performance effect it will have as I only had 20 tree’s in CryEngine and that’s capable of pushing a million + polys…

You might have to find an option to merge vertices and remove any degenerative faces.

Im a maya guy, but vertex colors can be painted in that too. Byt a way to paint is not what I dont know, but how to paint them? Like which colors should I be using where? Use a gradient? Wish I knew how Unity was set up to treat vertex colors, and how vhe colors are generated or whatever for tree creator.

Been years since I used maya, but don’t you use paint fx? In the attribute editor, go to Tubes / behaviour and turbulence then set the type of turbulence and modify the interpolation.

It’s not the tool(s) or its abilities I’m trying to understand, but how the models themselves should be adjusted as far as painting the UVs. So you could say as a metaphor, I am a paid artist, who understands how to use his tools to paint, but does not know what his client(Unity) wants that painting to look like, in order to be a happy customer(work correctly).

As I said, you’d have to use an animation / rigged armature system for the trees. Reason being in Unity you create a windzone which adds bends, I’ve made trees before that split textures / meshes in half when using wind zones / bending (something to watch out for). But it’s the only other way I’d know how to do it, there’s several issues with this as it stands… A) You are going to have to modify the armature if it’s not what the client needs, B) the amount of tris / poly’s will have to be as small as possible. The Unity terrain system adds Billboarding and level distance features, all sorts of things to optimize the amount of trees you can use in a scene. Low poly and detailed tree’s generally don’t fit hand in hand, I’ve got it down to around 800 - 1000 poly’s for large trees and that’s about the best strike of quality / performance.

I’m unsure as to how well Unity would take a mass of animated meshes.

As UnLogick was saying it would be at least 1 drawcall per tree having them rigged and animated that way. So I want to stay away from that. Wish the painting process was documented. The tree creator must be automatically painting these tree UVs, but It’s unknown in what manner it is doing it. :frowning:

Hoping UT will chime in on how to go about the vertex painting.