I was able to get the tree moving in the wind using PCG; however, it looks like the skeleton is not working properly.
You can see in this video that bigger trees are my custom trees, and smaller trees are from the PVE example; smaller trees behave a lot more naturally and react more to the wind.
Bigger trees also have rogue branches that behave strangely
Reading through the documentation on the plugin, it mentioned: ”It also includes a Universal Scene Description (USD) schema that you can apply to a Skeleton to provide this data, along with an example Python script to create a JSON file from the USD.”
Does anyone know where this example Python script is? I would like to try this method of generating a JSON file from the USD.
Furthermore, can anyone provide some insight on how to get speedtree work with Dynamic wind plugins? Thanks!
AFAIK speed tree does not include any skeletal meshes.
ALL of the tree movement is done via material shader - because let’s be 100% honest here, you have to. You can’t have more than around 10 skeletal meshes on screen and maintain any sort of performance in this sh*t engine. On others you can get away with maybe a few hundred.
Ergo, to make trees work - since they usually number in the thousands when dealing with a forest for instance - you need to make the operational cost of an animation make sense.
In comes the material shader, which has 0 overhead from the skeletal mesh and all the other BS.
Now what you Can do - and I do suggest you study up on - is to save out a custom animation of that you derive from the skeletal mesh into a material shader using Pivot Painter.
At that point, The animation you save out ships with the tree in the form of a texture. You can run it anywhere by coding up the shader for it (which speed-tree trees already use). It’s fairly cheap to run and it can be offset on each tree instance using instance random in the shader to prevent stuff looking identical (after-all it’s a looping animation, if you start them all at the same time it looks fake).
There is no such thing as “reaction” to wind. The engine doesn’t support wind, or has anything the like. Speedtree has also never done it afaik - and with reason (performance again).
What you normally do for wind - because it’s cheap - is you run a normal map across the leaf foliage that makes it seem like they shimmer - similar as you would with grass.
This isn’t directional.
If you want directional wind, you have to - again - modify your shaders and add a vector driven input to the WPO along with an intensity - you should do this mildly and before the animation from pivot painter so that you retain it.
How you mix the 2 together is up to you, it’s part of the “artistic direction” you want your project to have.
To put the wind in, use an MPC (material parameter collection) with Direction and Intensity. Then apply it some-way to the WPO.
The cost is not exactly cheap compared to panning a normal map - you have to make it, test, and decide if it’s viable at all (probably won’t be for most games).