Hi everyone! I would like to know what is the best way to simulate how a variety of Gust of Wind affects and WITHOUT moving the stems of the herbs, I just want to move the leaves, not the stems, thanks in advance!
Hi there, if your leaves and stems have separate faces (thus vertex edges separating them) you can either use a texture or vertex colors to paint the leaves white and the stems black and use that as a mask for your WPO values, where White allows vert movement and black does not.
Hi hippowombat! First of all thanks for your quick reply! No, my leaves and stems don’t have separate faces, are both in the same texture, do you know other way to can try to simulate the wind just on the upper part of the texture (leaves)? Thanks in advance!
Hey there J_OTE, you might be able to use some UV trickery to make the leaves look like they’re warping/waving, but it’s only going to look convincing if you’re looking at the texture head-on, and even then the amount of math needed to make it look convincing may push your instructions too high, resulting in performance loss. Ultimately the most practical way to achieve what you’re wanting is to have your leaves on separate faces from your stems. Depending on how your texture looks, you could still keep the leaves and stems on the same plane, just with an edge between where the leaf meets the stem on your texture, allowing you to limit vertex offsetting to the leaf area only. I’m at work, so forgive the crude Paint image, but here’s an example of what I mean:
The black lines are the boundaries of the plane, and the colored dots are your vertices. Using either a gradient texture or vertex painting, you can apply a black (0 displacement) or white (seen as light grey here, representing full displacement) value to your vertices. So on the left, you have a plane card with no division in the plane, so while the bottom vertices are set to 0 displacement, there’s no divisor between them and the top vertices, so displacement scales up along the whole plane, affecting the leaf as well. If you add a division where the leaf is, you can assign a black (0) value to the divisor vertices as well, allowing the mask gradient to only affect the leaf, and thus keeping the stem from blowing.
This solution of course only works if you only have one leaf per card. If each card is a texture filled with branches and stems and leaves, there’s not really a reliable way to have only the leaves blow around, as the typical approach to foliage wind, which is vertex displacement, can only be applied per vertex and not per pixel.
I hope this explanation helps, please let me know if you have any other questions.
Hi hippowombat! Thanks for your explanation! I’ve been doing some tests, as you can see the shape of the leaves of these herbs are practically the same as the stem, I kept the leaves and stems on the same plane with an edge between the leaf and the stem, but I don’t know how I can use a gradient texture in order to can apply a black (0 displacement) or white (representing full displacement) value to my vertices. Can you show me a screen capture of the node graph? Thanks anyway!
My simple solution to this problem (via UV trickery)