Here is the final version of my shader for simulating wind on trees and plants. There is some things left to do like collision bend but i will do this later when my project is an advanced stage.
My shader uses a uniform variable to control the direction of the wind (in degrees: 0 north, 90 west, 180 south, 270 east), the tree sways and also hangs in the direction of the wind, the branches sway in the direction of the wind but the branches parallel to the wind sway less and the perpendicular branches sway more. For the leaves they have two movements, they swing on the Y axis and I also added a random movement at the high frequency and lower intensity to simulate gusts of wind. I am researching how to add collision bending for grass and small plants. I made all the trees using TreeIt software by Evolved, its a very good program.
If wind direction is taken into account, that’s excellent. I have a much simpler version.
Tree It is a good program. However, unfortunately, it is only available on Steam. Not everyone wants to deal with a service that performs total surveillance and collection of user data.
Although now, there seems to be a version available on the developer’s website. But the tree collection is not there. I think trees are still available in Sketchfab, but you have to register there.
Theses trees now come with Tree It on steam.
It’s very disappointing that the author went down the wrong path.
Treeit is very cheap on Steam and you can run it without Steam after installation, the program dont use any steam api. There is a program that became completely free called PlantFactory but it not generates vertex colors.
I’ve just started tinkering with trees in Godot and the Tree It-to-Godot pipeline is pretty smooth (way smoother than Tree-It-to-Unity, in my experience), and the shader on the official Making trees rundown works well for the branches, but not so much with the trunk.
i will make an scene with some samples trees from TreeIt and post on Godot Shader site soon. I am working with small plants on TreeIt now and adjusting some parameters on the shader to work well. The problem is to make all the trees, plants and grass to have the same movement instensity when changing the wind force, i managed to make they scale from wind 1 to 10 (controlled by a global shader parameter). each Tree or plant need fine tunning on individual parameters to scale well with wind force. Soon i will post the complete project here.
There is a free version on author website of treeit, he updated the version to the same as Steam. I tested it and its the same version without any restrictions.
This is good news. I’ll have to check how the new version accepts tree files from the old gallery (when the tree library was still available on the site).
You can see that the files are different. The program is good, but the author is no longer trustworthy — at best it is negligence that the change is not specified. What exactly is the change?
I will use the old version for now and look for a replacement.
I tested plant factory and i think its not good for games, its more for cg and movies. There is some options for exporting to unreal and unity but the trees are high poly and dont have vertex colors, it can export the wind animations baked on the model but this makes the model bigger on size and heavy to process in realtime.
If it exports vertex colors with the model it will work. In my tests Godot works better with wavefront obj files than fbx, i recommend exporting as .obj from TreeIt. I am remaking the shader from scratch because i have some issues with the other, now i am using world coordinates and changed the way the trunk sways, i think its better now. I think i need to create a separate shader for using with small plants exported from treeit because using the same shader dont work as expected.
When I tested TreeIt, I tried all the formats it provides. And the best result was achieved with .fbx. Of course, it is not desirable to use it, because it is very cloudy. Perhaps it’s time to check it again.
When impoting .fbx from TreeIt in Godot 4.3(beta3), it is better to use FBX2glTF.
I’m redoing the shaders from the beginning because the other one was too messy. The new shader is getting much better and so I solve a bug with fbx files (I don’t know if it’s a bug in Godot or in the model exported by the TreeIt program. As soon as I’m done I’ll create a demo project and post it here on the forum.
Very keen. Been keeping an eye on your youtube posts. This really fills a huge void godot has with rendering vegetation and I think this is a very very big deal.
In terms of the Treeit discussion, because almusx is using vertex colours, any vegetation creation software is going to be fine. If they don’t do vertex colours it’s only slightly inconvenient, not a deal breaker. Just export them and paint the vertex colours in blender. This shader would be in no way tied to Treeit, or any software.