Attaching a mesh to Speedtree with wind


I have a Speedtree exported in my UE4 project with speedtree wind applied.

Now I am trying to attach a mesh to a certain vertex location, for example a nest, a bird or just an apple.

I need this mesh to move in sync with the vertex that it is attached to, having in mind the treewind offset.

The only way I can think of, is to put that mesh in the tree in the Speedtree, and then hide it with alfa or something in UE4 … It might work for a nest or a fruit… but I can’t make a bird landing spot that way…

Any help is apreciated

Yeah, curious about this myself too. With the professional edition of speedtree, one could import the tree into Maya, and make a skeleton around the parts that you need to control for gameplay, but for UE4 subscription that cant be done… I have done just so, that I design the tree so that there is a nonmovable part, like lower part of the tree etc, big branch that is not effected by wind, but the subbranches of the tree are, animate the object just a little bit to make it non-static even if its not in sync, etc.

If there actually is a way to move object in sync with speedtree material wind, well, I am most curious to hear about it too. I wont have my hopes high, and the hack solutions I use are still OK for my quality anyway. Sounds complicated to get information from material source to properly sync it with gameplay elements which require correct world coordinates etc.

The thing about the wind, from Speedtree, is that it’s done through shaders. The other problem with Speedtree is that even if you exported it to another package, ST uses a bunch of extra custom channels for special vertex weights and such. You’d lose all of that information on export.

For this reason, just setting the collision to work with wind just doesnt work either. As the branches only move visually via material setting, you can clip through the parts even if you set up the collision perfectly. Just better to adjust your design around the limitations, instead of trying impossible, I assume. -Unless some genious tells a way how to connect material offset information to specific world coordinates which can then be picked up by gameplay actors…

Hello again

As far as I have investigated so far, every Speedtree imported in UE4 has 7 map channels, and I strongly believe the 3rd (2nd if zero based) is the one, or at least the main, that contains the info for the speedtree wind. Once in UE4, you can export the mesh to FBX, which doesn’t scrap the map channels, they still exist and are correct. Alas, once you import the mesh back to UE4, you can no longer apply speedtree wind to it, though it appears it has everything needed for it. I think there is a hidden “switch” to allow you to use the speedtree wind only with speedtree imports. If so I find it very constraining.

If you link Speedtree node to VertexInterpolator node, and then plug it to the base color of your material, you will visualize the offset of the vertexes in RGB, or at least that is how it appears to me. If so, I should be able to pick that offset from a certain vertex of the speedtree mesh, and apply it to the material of whatever I want to attach there, if I ever manage to run Speedtree wind on non speedtree mesh.

But way easier it sounds to me to find the exact location of the vertex, after it has been offseted, and just move the attach there.
Is it even possible? And if so, is it appliable, performance wise, since it should be done every tick, even if its just for a vertex.

Any ideas?

I would also like to know this to, if it can be done. I want to add custom meshes to my speed trees also its much more easy for me to not need to do it in speedtree.