Unreal Engine 5 - Sand Storm

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone so today we are going to work on the sandstorm you can see this atmosphere is clear and the sandstorm is getting closer now we start hearing the sound and the atmosphere becomes dusty you can see the surrounding also as the stomach washes and once we are the stomachs the you can see there is uh the surrounding of the is a bit darkened and you can see some post process effects are in play as well including vignette and film grain and as the storm pass away this atmosphere will become again clear so yeah this is what i'm going to work on today let me show the demonstration again [Music] so and there goes the stone so yeah let's see how to implement this today [Music] right so this is uh and the usual [Music] starter map is the open world map in rl engine 5 so here i'll assign pp third person game mode and put a starter location in the middle [Music] so when i start playing the game [Music] this is what i get okay so uh [Music] at this start player is facing that direction right so now the next thing is uh here i'm going to reuse this missed particle effect i have already implemented so the missed particle system is available i'll put the link in the description below actually uh it's not that complicated so you can reuse the same materials so i'm going to use this mixed particle as the starting point for the dust stone so let me duplicate this sand [Music] [Music] if i put it here you instantly get those missed particles so you may notice some stuttering in my editor but that's because of i'm running in a laptop and my when i turn on recording it kind of flags but performance wise this is okay i cannot show that right so yeah this is what we get from the initially by using this missed particle here we don't need this point attraction force oh we don't need this well that's it so this is a good starting point all right let me save the map right now the next part is so so the way i'm planning to have this effect is initially start uh the sandstorm should start somewhere further away and then it should reach the player so that's the way i am planning it to have so sort of like a dynamic sandstorm initially we don't have the sandstorm then we have it it walk across this landscape okay so i'll place this this a bit further away maybe 15 000 [Music] now it can go further than that but yeah 15 000 let's try 20 000 [Music] okay and so it should be much larger so it should cover this entire area across this cnbc so here shape location this is where the location is defined where the particle is initialized i'll set x to maybe 2000 and y 200. ah that's not the direction [Music] x 200 y to 2 000 [Music] okay that's the direction we need great and uh also they should be much larger than this so in the initialization 300 to 600 let's see and here we have scale sprite size so it becomes smaller at the end that's not really the way we need to be so let's use uh shape like this and here let's say four right is that scale good enough also there is a part of this dome underneath so maybe we should have some offset um something like this let's try uh no it can be larger than that so how about six right i wish we should move them down a bit awesome seems all right and also the sand should be moving up in time so let's add we have a drag some acceleration force upward maybe 50 i don't know so the sand is moving upwards into the sky okay and also let's increase the spawn rate a bit maybe 800. [Music] right also so i am actually going to move this forward so i can see the area the dust cloud is spawned let's add some speed in the forward direction for these particles so that we always feels like this dust is coming towards us so going in some direction not necessarily toward us going in some directions so here at velocity [Music] not in the direction and maybe x direction how about 200 let's see i don't really see any moment thousand two hundred not really nothing noticeable is it because of this drag do we need the track right so it should okay it's going that way so sandstorm let's rotate it so if it is coming towards us we will see the dust clouds coming in this direction so if i play it let's see well it doesn't look good enough maybe we should move them down a bit this location 600 let's try maybe upward speed is too much let's try 20. right this seems okay uh also one more thing we should change the color to a more dusty color seems okay you can find you want to have whatever the color you want so if we go closer i i'm not sure about this gear yeah maybe this should be much bigger [Music] yeah that seems better okay now actually we can lift it up a bit [Music] okay so now let's have them start here let's move it more this further backwards maybe 30 000 [Music] okay so we do have some distance great now it looks great for me so the next step is uh adding the movement and other things to improve the effect right now uh let's create a blueprint sans store [Music] here uh now i'm gonna remove this ns sandstorm from this lever and let's add now your particle system component ns sandstone as a component here right okay and now let's put this blueprint here in the same position as before thirty thousand and let's ready to adjust [Music] was it thousand 000 i don't remember okay all right now let's make it more towards us for that here let's get player controller sorry not the controller character get player character and we can get [Music] the location press q to land and get that location of this sector then uh from this actor to the player character we can find the distance so if the distance is let's say if the distance is larger than let's say 5000 we should move the sandstorm towards the player once it reaches closer to the player it does not have to move [Music] right [Music] so if this is true we need to move it towards the players for that we can get direction get unit direction vector from the sandstorm to the player like this and we can multiply this by a float value convert to plot let's promote this to a variable stop speed let's make this public visible so we can edit it if we want in the details panel so for now i'll add something like 40. and then we already have the actor location okay tap the location okay and add these two together then set back to location to move towards the player right now it should be moving towards the player let's see [Music] see it is getting closer okay same it's working [Music] right uh now when we are in the close range i don't really feel the intensity of the stone so maybe [Music] let me duplicate this uh let's rename it cross range [Music] here i reduce this bond rate to maybe 300 and shape location we don't need this offset so i set it to 0 or maybe 50 and sprite size this should be smaller 300 to 400 maybe [Music] and shape location this can be much smaller maybe just 10 is enough right now let's see we should see a set of small particles in the close range right okay that's more thicker than i expected so maybe we can further reduce it the spawn rate let's make it hundred let me disable this so that i can only check it let's see how we feel that it's good but i need to see individual clouds maybe uh [Music] all right that seems good so if i enable the bigger cloud also okay they both seems good maybe we should make the smaller one faster how about 2100 [Music] no that doesn't seems good [Music] let's enable drag oh with the drag it doesn't come at all [Music] so [Music] okay right now this seems actually good enough right now let's play from the beginning to see how it looks when it get closer okay firstly i hit and the second layer all right seems okay and another thing i can do is maybe to push this effect further we can try adding some power process effects too [Music] how well so here you see in the atmosphere it's completely blue doesn't really feel like we are going to have a storm so let's add the post process volume into the scene i'll make this and finite extent so it will be applied all over the world uh wait oh sorry i forgot about the atmospheric uh [Music] folk and the hydro let me move this there to the lighting folder so we have everything in one place so here we already have exponential height fork so and also we have a color as well as the density okay if i make it one this is how it looks with the fog and if where can i change the color oh no okay let's set this in scattering color cube map we have a cube map but it has some red areas and [Music] some patches okay let's try something else how work part this one okay right this color seems to work of density if i make it one okay see now this can be something we can use right we can change the atmosphere to get this dome field here let me put sun also in this direction we can't really see okay there we have sun so in point one we can see the sound like this what was the initial value okay like this now we had something like four [Music] all right so let's make it like this as the storm get closer let's increase the fog density to maybe like point five it should be called point five not six so how should we do that [Music] here let's create a variable [Music] height [Music] exponential height fork object reference let's make this visible and here if we have a valid hide fork set we can use this without this part if we have a very tight fork we can what's the work density set for 10 city based on the distance to the stock so let's say here the minimum distance is going to be 5 000 we can get this value [Music] and divide it by at 5000 we should have the value of 0.5 so let's divide it by 10 000 and distance and clamp it in between the minimum value we need to have here which is 0.06 [Music] 0.06 right yeah and maximum value 0.5 [Music] uh 40 000 what's the value we are going to get 40 000 divided by 10 000. oh wait this is wrong when we have a higher value we should get a lower when we have higher distance we should get a lower fork value oh sorry so the so what we should be doing is this break we should divide a value from the distance so at distance 5000 we should get 0.5 that means if i divide 2500 by five thousand we will get that value so if we divide two thousand five hundred by ten thousand it would be zero point zero two five and forty thousand it would be yeah a lower value so this should work let's give it a try oh make sure that you set the variable here otherwise it won't work let's see [Music] now you should notice the fog level increases see as it's the storm gets closer the flow globally increases so that's why it the sky becomes a bit darker all right let's see again notice this guy [Music] great what's next uh how about samples process effect like [Music] like awaken it uh to see that let's play the game first and make wait till the storm comes to us then let's try it [Music] okay now let's enable ignite maybe not one but if we have something like yeah one also seems fine [Music] right and also what else [Music] let's wrap it gray [Music] yes that's also at some fail to the atmosphere so how can we change this in the run time film grain and vignette so for that [Music] let's add another variable vp volume make it public [Music] and yeah get the reference [Music] to a validated git [Music] set oh sorry first process volume [Music] create first process volume object reference [Music] set settings right here we are only interested in changing the image effect net [Music] they are not exposed make first process settings where is image effect [Music] [Music] okay that and [Music] film gray intensity right so these also should be based on the distance from the character to the [Music] stop so at 5000 we should have maximum so here divide five thousand by five thousand oh hold on so when the distance is further away weakness should be lower so that means this is not the way we should do the operation we should [Music] divide the distance oh no actually i was wrong this should happen in the same way at 5000 we should get one whenever it goes further we should get smaller values so yeah this should be it and the film grain intensity i think that could also in the same way right let's write okay okay we are getting the vignette and the film gray great so it worked as expected all right uh now the only thing we have to add is some sound effect but i have to find one well i already have that sound effect i used for snow sound but maybe this will work maybe maybe not but this is the sound i got so [Music] let's try that here i need to define an attenuation otherwise we would hear the sound in a uniform way no matter where i displayed so let's drag and drop the sound effect here override determination okay we can override it here in our radius let's make it [Music] 10 thousand [Music] fall of distance let's make it huge uh fifty thousand [Music] right let's see now [Music] uh [Music] okay maybe we should not hear it in the beginning so let's try twenty thousand asked atomization radius so we don't hear it now now we start here in it [Music] [Music] this sound effect is not suitable for sound system we don't we need to find a better one [Music] but yeah this is so it's done okay i found a video clip this one make sure looping enabled and let's use that sound sensor let's test [Music] okay so with that should we implement passing of this and this term as well yeah maybe that's a good idea for the for that what we can do ah let's change this logic a bit we can find the direction [Music] in the begin play and save it like this gives us the direction let's promote the store variable direction so it's always moving towards the player initially and then here instead of using this logic we can directly use direction and then let's let's create a custom event temporarily disabled tick so here let's add to one's note and add a delay let's say 40 seconds so we can promote this as storm duration oh before we start in the delay let's set tick enabled to false and then again set take enabled to draw here we can call tim for really disabled tick here and call it [Music] so now what should happen is uh when the storm reaches it should stay 40 seconds with us then it should leave us like past pass the player location let's see if that works as intended we should have put something less than 40 seconds now it passed us and the atmosphere is cleared again and you may not and it becomes a bit too dark and that happened because we haven't clapped these values [Music] so let's clap in between zero and one so we should be able to avoid that issue right uh storm duration but here let's set it to only five seconds for ease of testing [Music] oh wait wait wait we already have some value here exponential height for 0.2 so minimum is 0.2 that's for exponential light fork for the film grain we don't really need one so it can be in between 0 and 0.1 [Music] right let's test now [Music] okay oh atmos sphere is clear ticket [Music] so thanks for watching and as always project files will be available for the download in the patreon page link would be in the description below and if you like to support my work you can get the membership of the patron club see you in another episode goodbye
Info
Channel: CodeLikeMe
Views: 15,017
Rating: undefined out of 5
Keywords: unreal engine 5 sand storm, unreal engine 5 sand, unreal engine 5 desert storm, unreal engine 5 sand storm in desert, unreal engine 5 dynamic sand storm, unreal engine 5 sand storm particle, unreal engine 5 sand storm effect, unreal engine 5 niagara sand storm, unreal engine 5 sand storm particle effect, unreal engine 5 sand storm vfx, ue5 sand storm, ue5 sand, ue5 desert storm, ue5 sand storm in desert, ue5 dynamic sand storm, ue5 sand storm particle, ue5 sand storm effect
Id: EKT1guXbKAQ
Channel Id: undefined
Length: 49min 53sec (2993 seconds)
Published: Mon Aug 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.