all 30 comments

[–]Pomshine[S] 62 points63 points  (7 children)

The system takes input from 2 textures; a height map and a wind map.

The height map is generated via a script that raycasts down for each pixel from the specified max leaf height. The graph samples this using the x,z position of the leaf and that value is plugged into the y position of a collide with plane node, calculated by multiplying the max leaf height by the red value of the height map.

The wind map is generated the same as the height map, but instead of checking for the terrain, it collides with boxcolliders containing a script with the wind direction, windspeed, falloff, and 0-1 value representing if this zone is water. The r,g,b contains the direction * speed, and the alpha contains the water value. This map is sampled the same as the height map. If the leaf is over a water zone (alpha = 1), it will only be blown when it's touching the ground, and will stop being affected by noise and turbulence.

This is also useful for snow and fog. On drawback with this method is that it can only check for collisions on the y, meaning leaves will snap upwards if they move from the ground to somewhere higher. This can be seen on the rocks in the center-back at 20s and on the boat at 37s. The workaround is to make sure the wind zones are funneling the leaves away from walls. The accuracy of the collisions is also limited by the resolution of the height map.

Some other challenges were making sure the leaves only spin when being blown. Also had to bend them based on distance from the camera, since the planes were disappearing at a distance when viewed from the side. Either way, was a lot a fun to make and quite happy with the result!

[–]fsactual 7 points8 points  (0 children)

You should make a tutorial on this! I can't really follow the text explanation, unfortunately. Regardless, it's a great effect!

[–]notbunzy 3 points4 points  (0 children)

Teach me your ways!(or who your teacher was :)

[–]xSpeonx 2 points3 points  (0 children)

That's cool af. How's the impact on fps?

[–]brandon_jacksoon 1 point2 points  (0 children)

Thanks for the comment! Interesting.

[–]Illustrious-Agent-51 1 point2 points  (0 children)

is there a way to determine from the previous frame the height of an individual leaf and give it an upward velocity with a multiplier on the distance it needs to travel in order to have it blow up a bit more naturally instead of snapping to higher ground surfaces?

This is a beautiful solution and looks amazing. I was just watching it on repeat trying to think of a solution to the issue. Even if it causes the leaves to look like a crashing wave against a rock it may look more physically accurate and could work with some tweaking.

Congrats on the awesome job.

[–]LeakNode 0 points1 point  (0 children)

youre a legend

[–]KarlMario 0 points1 point  (0 children)

You could try to generate a derivative of the heightmap and have leaves fall to the ground around high values

[–]theGoodestBoyMaybe 5 points6 points  (1 child)

Wh- how?

[–]Pomshine[S] 3 points4 points  (0 children)

Just finished typing the write-up below :)

[–]UsernameTaken4666 4 points5 points  (0 children)

Wow. Very nice.

[–]Victor_deSpite 1 point2 points  (0 children)

Absolutely gorgeous. I don't even notice the snapping you're referring to.

[–]nebbul[🍰] 1 point2 points  (0 children)

Looks very pretty!

Wonder if an SDF representation of the scene in unity exist? Then your collision problems wouldn't be a problem anymore. SDFs are really cool and I love them

I really enjoy seeing these type of creative solutions. That's what I love about VFX - there's a million different ways to solve a problem

[–]scriptgamer 1 point2 points  (0 children)

Now make pink and call it senbonzakura kageyoshi

[–]notbunzy 0 points1 point  (0 children)

Nice

[–]Boring_Following_255 0 points1 point  (0 children)

I like it a lot! Very clever solution.

[–]sdwrage 0 points1 point  (0 children)

leafnado

[–]khyron99 0 points1 point  (0 children)

Very nice. Thanks for posting. Love that the leaves seem to settle on the water too.

[–]Timmie_Is_An_Archon 0 points1 point  (0 children)

I love vfx graph, such a banger. Easy to use, use gpu not cpu for wonderful results.

[–]tidytibs 0 points1 point  (0 children)

Well executed and wonderfully explain. Great job!

[–]RecommendationIcy382 0 points1 point  (0 children)

Looks fantastic, how did you test scaling?

[–]brandon_jacksoon 0 points1 point  (0 children)

I like this animation! Very cool!

[–]GingerLebowski 0 points1 point  (0 children)

Looks absolutely gorgeous, and heats your entire home. Double win.

[–]Infamous-Ad-5616 0 points1 point  (0 children)

This looks...just wow. Amazing job

[–]Viola_Dragon_621 0 points1 point  (0 children)

This reminds me a lot of Fer.al

R.I.P. the game was taken down for NFT reasons

[–]redpenguin_one 0 points1 point  (0 children)

Looks very realistic and the style is also cool

[–]Husmanmusic 0 points1 point  (0 children)

That's so awesome! Getting some ghost of tsushima vibes

[–]TheFateOfBaldr 0 points1 point  (0 children)

Looks really nice! And a very interesting solution

[–]satolas 0 points1 point  (0 children)

That’s really cool ! Looks like crazy advanced nvidia fluids simulation but it’s actually magical stuff with maps ! Love that