Unity HDRP Tutorial: Simple Weather Effects

  Рет қаралды 3,536

Iain McManus

2 жыл бұрын

In this tutorial we're going to create some simple weather effects (rain, hail, snow and fog) which we can vary in intensity. We'll be using the VFX graph for the rain/hail/snow and the HDRP volume system for the fog.
🎞️ Chapters
00:00 Introduction and General Setup
02:50 Creating a Rain Effect in Visual Effect Graph
09:45 Setting the Rain Texture
15:00 Collision using the Depth Buffer
17:00 Collision with a Ground Plan
19:40 Controlling the Rain Intensity
23:00 Creating a Snow Effect in Visual Effect Graph
26:25 Creating a Hail Effect in Visual Effect Graph
31:57 Fog using Fog Volumes
36:40 Adjusting Fog Volume in code
46:50 Closeout
📂 Grab the full project ➠ github.com/GameDevEducation/HDRPTutorial_SimpleWeatherEffects/tree/Part-1-Create-Effects
If you've got questions add a comment below or send them in for the next Q&A video
🤔 Send in your questions ➠ forms.gle/ToyvqPaBFvpFLtNbA
📁 The searchable video archive is at ➠ www.iainmcmanus.dev/gamedev-education/
Looking for other ways to get involved?
🟠 Support the channel on Patreon ➠ www.patreon.com/IainTheIndie
🟡 Get the code for all the projects on GitHub ➠ github.com/orgs/GameDevEducation
🟢 Check out my games on itch.io ➠ iaintheindie.itch.io/
🟣 Follow me on Twitter ➠ IainTheIndie
🎉 Thankyou to all of the Patrons 🎉
➔ Manuel Baptista
➔ Paul Berry
➔ Grant Coble-Neal
➔ Kasper Enwall
➔ Adam Ercanbrack
➔ Maxamillian Marsh
➔ Kalvin Pearce
➔ Bradley Seymour
➔ SiliconOrchid
➔ Callan Syratt
➔ Daniel Williams
➔ Beau W.
#Unity #Tutorial #GameDev

Пікірлер: 24
@vrfxrealtime
@vrfxrealtime 10 ай бұрын
thanks for sharing!
@fast07hzmc401
@fast07hzmc401 2 жыл бұрын
wow thanks for this cool tutorial.
@IainTheIndie
@IainTheIndie 2 жыл бұрын
Happy to help! :)
@Okotherapy
@Okotherapy Жыл бұрын
Very interesting and helpful video. Thank you! Hope that you will be getting more views on videos)
@IainTheIndie
@IainTheIndie Жыл бұрын
Thankyou! I'm glad it was helpful :)
@allumeas5219
@allumeas5219 2 жыл бұрын
This is awesome, it would be great to add wind to the weather manager as well. I could imagine using the evaluation of an animation curve to control the x and z gravity force to create a wild blizzard for example. This is an awesome starting point for a potentially extremely dynamic weather system. It's awesome to see all of these small projects and features you've been working on and how you have made them work so well in isolation. I can imagine that your collection of features that you can easily pull from and use in any project is really starting to grow. I could see people buying a collection of your work from the asset store for sure! You mentioned that performance could be an issue from too many particles so with that in mind, how would you go about adding this weather in a larger open world experience for example? My first guess would be to section off parts of the map and use an object pool to bring in multiple instances of the effect as players get close to the edge of a section - kind of like an endless tiling background. But then if the player moved to the corner of four sections then you would need just as many instances causing a lag spike.
@allumeas5219
@allumeas5219 2 жыл бұрын
And as I post this I read in your description that you're just giving this stuff away for free, truly incredible Iain!
@IainTheIndie
@IainTheIndie 2 жыл бұрын
Wind would be a great one to add, I think it should fit in reasonably easily with the existing wind systems in Unity. And could tie it into the intensity and add in gusts etc would be really cool. I want to keep expanding the weather side of things so I'll add in a reminder for myself to look into adding wind :) It definitely helps having the pool of code and resources to draw on. Plenty of times now when working on a project I'll refer back to a tutorial I've done. And it goes the other way as well with things from projects at times coming over into a tutorial (usually in a more polished form). I'm currently having to wrangle with the performance a bit for the train game. The approach I'm using is very similar to what you outlined. That world is divided into grids and I know what cell the player is in so the weather effects only play in the current and adjacent cells. That keeps the particle levels a bit more manageable and with some fogging in the distance it doesn't look too obvious. And because it has the adjacent ones present there might be a brief lag crossing a zone boundary (but not noticeable) and the player doesn't see the effects pop in.
@IainTheIndie
@IainTheIndie 2 жыл бұрын
Yup :) I really enjoy making the tutorials and if they can help folks out then that's awesome.
@scruff-duff
@scruff-duff 2 жыл бұрын
Would love to see how you create a day and night cycle!
@IainTheIndie
@IainTheIndie 2 жыл бұрын
I've got a bit on that here kzfaq.info/get/bejne/p9icqNif2pPSZX0.html and I'm planning to do a tutorial on integrating it with the weather system.
@falloutsearies
@falloutsearies 2 жыл бұрын
thank you for making these you always come out with these videos right when I need them. I noticed for me that when the camera is at a certain rotation the particles stop appearing on the screen even with face camera plane on any ideas.
@IainTheIndie
@IainTheIndie 2 жыл бұрын
Happy to help :) Does it happen when the bounds of the particle system would be near the edge of the screen? Most cases I've run into with particles disappearing it's due to the system thinking it's out of view so it immediately culls it.
@falloutsearies
@falloutsearies 2 жыл бұрын
@@IainTheIndie not necessarily it disappears when the camera both in game and in editor viewing is not looking to the west of the scene (sorry for the late reply other things came up). the automatic bounds settings you used in the video didn't appear for me so that might be part of the problem
@IainTheIndie
@IainTheIndie 2 жыл бұрын
Without the automatic bounds I could definitely see off behaviour like that happening. Which Unity version are you using? I’ll download it and try and recreate the issue to see if I can find a solution.
@falloutsearies
@falloutsearies 2 жыл бұрын
@@IainTheIndie I'm still on 2020.3 so that might be the issue thank you I'll update and see if that fixed the problem.
@IainTheIndie
@IainTheIndie 2 жыл бұрын
I know they did make quite a few changes to the VFX graph and the pipelines in 2021 so that could definitely be causing it.
@Faeyeful
@Faeyeful Жыл бұрын
Is there a way to make it collide with terrain?
@IainTheIndie
@IainTheIndie Жыл бұрын
Not easily/well that I’ve seen. The terrain colliders are typically more expensive. There might be some tricks that could be done with the depth buffer collision option but I think it’s likely to be fairly expensive.
@realotoko
@realotoko 26 күн бұрын
another tutorial with dozens of thousands of particles... Dude. In real life you might want to use as little particles as possible. You teach people wrong.
@IainTheIndie
@IainTheIndie 26 күн бұрын
It’s always going to be a balance and will depend on what folks are trying to do in the game. I’ve used similar amounts before with good frame rates.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 15 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 79 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 12 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 15 МЛН