SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
Praxeos1 4 18 Mar, 2020 @ 8:42pm
Decreasing Draw Calls for Vegetation with Wind Effects
If each branch on a tree is a separate model or mesh, there is a separate draw call for each. However, wind textures appear to be influenced not only by the gradient wind mask, but by the origin point of the object. If each branch is a separate object, I can attach them to the tree trunk at their individual origin points. They naturally blow in the breeze, with greater effects toward the end of the branch. If I merge them all together instead, they share a single origin point and behave in very unnatural ways. They twist around the tree and stretch like taffy. Should I be setting my trees up some completely different way?
< >
Showing 1-6 of 6 comments
Rectus 13 19 Mar, 2020 @ 1:36am 
I've had success ajusting the wind mask of the branch so it has the same wind strength as the trunk where it attaches to it (or 0 if the trunk doesn't move). Note that the wind mask is UV mapped the same way as the textures, so using one may lead to glitches if the texture is tiled.

Another thing is that the tools have issues recompiling materials with wind enabled, so it might not have updated it properly. Setting assetsystem_quiet_inputs_before_recompile to 0 from the console before recompiling them should help with that.
Last edited by Rectus; 19 Mar, 2020 @ 1:37am
Praxeos1 4 19 Mar, 2020 @ 6:34am 
Here are screen captures of the UVs and the wind mask, in case you see some obvious issue. My mask starts completely black at the base of the branch (the tree doesn't move) and is a simple gradient going to white toward the end of the branch. I did notice that some of my vertices go right to the edge of the UV map. I might try moving those in a little and see if it helps.

https://imgur.com/a/gCaxrC8
Praxeos1 4 19 Mar, 2020 @ 6:35am 
As for the console suggestion, would I just type assetsystem_quiet_inputs_before_recompile=0 in the command field?
Rectus 13 19 Mar, 2020 @ 8:44am 
Originally posted by Praxeos1:
Here are screen captures of the UVs and the wind mask, in case you see some obvious issue. My mask starts completely black at the base of the branch (the tree doesn't move) and is a simple gradient going to white toward the end of the branch. I did notice that some of my vertices go right to the edge of the UV map. I might try moving those in a little and see if it helps.

https://imgur.com/a/gCaxrC8

I'm not certain, but those wind values look pretty high. I'm guessing the a larger model will amplify the effect more, leading to that behavior. If you have the map running, the wind should be visible in Hammer, and update in real-time when you chagne the settings.

Originally posted by Praxeos1:
As for the console suggestion, would I just type assetsystem_quiet_inputs_before_recompile=0 in the command field?
Yes, but with a space instead of the =.
Praxeos1 4 19 Mar, 2020 @ 10:10am 
Thanks! I'll give your suggestions a try and let you know how it goes. I suspect that merging the meshes may just require me to drastically reduce the wind settings, as you suggested. Believe it or not, the settings in my screen capture are very gentle and subtle when applied to individual branches.
Praxeos1 4 19 Mar, 2020 @ 5:13pm 
Thanks for your help, Rectus. Turning the settings significantly down made the difference after merging the meshes. I'll still need to tweak them to get the effect I want, but the branches are no longer behaving in a bizarre manner.
< >
Showing 1-6 of 6 comments
Per page: 1530 50