UE5 Procedural Grass Using Bezier Curves pt. 5: Wind
Вставка
- Опубліковано 27 вер 2024
- Here I demonstrate an example of a wind system that leverages the strengths of the bezier curve to create animated grass using a customizable, multi-layered approach.
Again, I never thank you and all the others who break this stuff down, enough. Always appreciated. Knowledge-givers are heroes.
Thanks for the support!
@@TechArtAlex And I saw you did take a nod to preserving-length of the blade. Thank you!
@@Stygmire Definitely! I'm glad my idea worked and turned out reasonably simple to implement. I think the formula would need to change for higher order (ie cubic) curves but I was really happy with the results here.
Since a lot of what I'm doing is just adapting great work that was already done by Sucker Punch, it's nice to be able to make a meaningful original contribution.
Thank you for such great content. As a new tech artist, your stuff are really helpful!
Thank you! Glad to hear it's been helpful.
Thanks for these video series. Can't wait for another one. Looks wonderful.
Thanks!
This looks great. Really liking the series and looking forward to the optimization
Thanks!
Looking great
Thanks!
Man you are the absolute best! Like for real!
Finally some Ghost Of Tsushima stuff man
Been trying for ages to get it like yours
Like I thought we do need to use the compute shaders, so I went on learning the rendering pipeline of unreal just for that! only if I gave it a 2nd thought
Thank you so much for the videos
Yeah, I wish Unreal made compute shaders easier to integrate. Niagara has kind of become a hacky alternative to compute shaders.
But I think PCG will be able to deliver most of the functionality they were able to with their computer shaded. Not sure which will perform better, but at this point I'm already rendering 6x as many blades of grass as the original release, even without optimization so I think it's safe to say this can work well enough.
This is insane.
EDIT: ha my dumbass should've just watched the vid first. Nice stuff here!
nice ! but maybe controlling the blade curvature based on the intensity of the wind could create a better result?
That is effectively what this is doing. The sine wave is moving the tip and midpoint up and down, which will increase and decrease the curvature of the blade depending on how intense of a wind swell it is hit by. This is most noticeable when I set the tip wind strength to 0, so only the curvature of the blade is changing and not the overall tilt. Naturally you can tweak the specifics of the implementation, but the core methodology is that the wind should be animated by shifting the control points, which is what defines the curvature at the end of the day.
ok cool ^^ good job, you are. great inspiration ! :)
@@SpaceShrimp Thanks! Glad you're enjoying the videos
Thank you so much for this series. I have been trying to implement the wind system shown in this video to my grass meshes (from videos before) and it just disappears and I think I may be missing something. Any ideas? Or maybe a screenshot of the wind shader that I could check mine against?
A disappearing mesh may have something to do with the mesh bounds, or just displacing the mesh far away accidentally. Make sure you're only applying the wind to p1 and p2 and not p0.
@@TechArtAlex Ah, Thank you so much for the quick reply. It turns out because of my messy code I was applying wind to P0 not p1. Once again thank you for this brilliant series.
Does this approach play well with Nanite + VSM? With it being an opaque shader, I feel as it should work nicely.
As of now I find it works a bit better with nanite disabled. VSMs would be invalidated every frame, which isn't ideal. One advantage of non-nanite geometry is that you can control shadow casting per LoD. This means you can set VSM up on just the close grass, but use contact shadows on the distant grass for much better performance with very little quality loss. Meanwhile nanite draws into VSM regardless of distance, and both the main nanite and VSM nanite passes will have lots of overdraw with so many small meshes.
Being opaque, it does perform significantly better than a masked version would.
@@TechArtAlex It's probably slower due to overdraw or WPO.
Contact shadows should be good enough regardless. Thanks!
You are awesome!
Your videos are really well made in terms of proper explanation and this technique of creating grass is so much better and it even look better than the masked ones which can appear blurry and shimmery sometimes.
I am really looking forward to this series!
Thanks! Still lots of stuff to go over.
Thanks for making these videos. The performance gain by making grass in the manner makes it viable for use in VR archviz.
Thanks for watching! Yeah, often works a lot better than alpha masked grass these days.
looks great
Thanks!