Unreal Engine 5 Tutorial: Planet Atmosphere Creation Made Easy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
greetings space travelers and welcome to another tutorial on organian's puzzle box of our space creation scene in this particular one i'm going to show you how to easily create a sky atmosphere for your planets in unreal engine [Music] now this is quite useful when you already are using the sky atmosphere that unreal engine ships with and you want to have extra ones for your planets in the scene this does not provide you with the same effect of a sky atmosphere if you're on a on the ground level on a landscape this is purely for your planets in space so they have their own sort of rings of um emission uh that comes from an atmosphere so if you would want to add multiple planets you're seeing and you want to have sky atmospheres everywhere and you don't want to sink a lot of money into um you know um somewhere well a project from unreal engine marketplace that can allow you to do that then you can try this sort of trick that i'm going to show you uh to get a quick result again it's not perfect but it does have its advantages and it can definitely be improved further uh with some additional tweaking this is using niagara an aggro particle system and a material that's quite basic and quite simple to set up so i'm going to show you that um you know how you know i'm going to show you how to do it um if you want to get this um uh space scene you can go on my art station or on my gumroad page and you can actually uh you know buy them from there for the price of a cup of coffee you can get all everything that this project has to offer apart from my little spaceship and the flight module i'm actually still working on that but it will be in the future release for definite and i'm actually thinking of adding it to my existing projects as well in the future but i first need to get it ready and i need to have a proper ship in there you can also go and become a patreon um patreons do help me a lot because there are a constant um you know continuous sort of revenue for me and for my work and i keep updating patreon with a lot of this content you can get it from there um so you know with a very small price you can actually pretty much get the content that you want anyway so without any further delays let's begin the tutorial and you guys let me know in the comment sections below what we can do to improve this and and if you have any feedback for me uh if you like the content please leave a like a you know comment about it and subscribe to it but yeah let's begin we're starting off in the scene as per usual with a bit of a breakdown just to try and show show you guys what the scene is all about and what we're trying to achieve as you can see i'm currently flying towards the neutron star but i'm just going to go for this asteroid field and you can see the atmosphere one of the atmospheres over there that's actually the atmosphere that's around the neutron star right now that glow and then you can see that this planet in front of me and then further uh over there there is another atmosphere that is supposed to be um you know the the light is supposed to be to shine on it um from the sun but whatever it wouldn't shine so if it's opposing the light then there would be a shadow and i'm just flying through this scene a little bit just to give you an idea of the scope and what you can do in it um you can see those atmospheres over there again and you know this is this is me just just flying through um hopefully giving you a bit of dizziness as i do this oh i've just passed through a few asteroids i'm not really good at flying this uh this ship through here but uh yeah so this is i think this is quite nice we've got a torque power of 10 um i'm actually going at very high velocities in here and it's difficult to control the ship at this sort of um this sort of uh you know speed but you can see what um you know how how fast you can go through right okay let's just not wait anymore let's not waste any more time um so this is one of the atmospheres and there's these two as well the problem that i've got with this sort of cheap way of making an atmosphere for a planet um you it will it will because it's a niagara system depending on where your camera is the atmosphere will change its position so for example if i'm on this side the atmosphere has changed its position that way and i'll show you how you can make how you can lock its face so it's it's angle so it always faces in one direction but right now i just wanted to show you how the scene is composed this one is obviously in full light at every given point these are the two are masked and over here we have the normal atmosphere that unreal engine comes with and this is obviously a far more superior material and and the system but i have created as i said sort of a fake effect of the atmosphere that doesn't require any fancy plug-ins or anything like that it just works as a niagara system it's quite very it's very basic but it really does the job if you have some really precise and preset cameras that you're trying to achieve so the reason why you would want to have extra atmospheres is because you cannot have more than one of these in the scene um and there is a there is on you unreal engine marketplace there is a atmosphere um project that you can buy um that allows you to have multiple atmospheres but there even there there's some other tricks employed to allow for that to happen but as of now you can only have one of these from epic inside your scene um and as i said you can now create these extra ones with my help with the help of my tutorial um so okay let's begin let's have a look at how the material is made and how the niagara system is set up to allow for these to be created as per usual like i said before you can download this map from my our station marketplace or from gumroad if you want to have all of these things already uh done so this particular project comes with this neutron star in which you will have that atmosphere around it and and the rays coming through and it's there's also some fire um you know churning through the through the surface of the planet as well you can see it there each of these are niagara systems the planet itself has a very complicated shader that i've released a tutorial last week and with a two-part tutorial in which it shows you how you can make this uh this part but you're also getting this planet which you know it's got some shadows casted on it from these asteroids this is because the scale of the scene isn't as big as i usually use but you can disable those shadows by just disabling the shadows on the shadow cast on the asteroids themselves um and yeah let's um yeah let's begin the material and the niagara system okay i'm just going to create a new material i'm just going to say m tutorial atmos just just for the sake of it and i'm going to double click it and i'm going to bring it over here the panel over here and we're going to start adding some nodes now the first thing you want to do is you want to change your material to a trans uh sorry translucent surface and you want to click the two-sided option as well and also move it to unlit and that's the setup for this material and the next thing we want to do is bring in a particle color because again this is a niagara system so we'll need to we'll need the part to access the particle color and we can bring this over into our emissive color and we also need to use the alpha of this particle color so we can add a multiply node and we can put that into the first link we need to duplicate the node and then this one goes into a and i want to bring in a sphere mask this is going to help us to mask the material on whatever side we want to you know give that effect of the atmosphere that there's the planet is blocking some of the light that's hitting it this is why i'm saying that this can only be used from certain angles but before we actually commit to this i'm just going to connect the multiply over into this opacity because this multiplier will only work with the sphere mask so we're going to do that as a sort of a second step um but then over into this multiply i want to bring a power node and connect it to the b value and then we're going to use some gradient exponential node and this can connect into the base and i want to bring in a dynamic parameter um this dynamic parameter we've got parameter one and parameter c2 parameter one we can rename that to density and then parameter 2 we can rename that to power i can connect the power to the axp and the density to the density of the radial gradient and in the radial gradient uvs we want to bring a vector to radial value and this node we take its linear distance and we plug it into the uvs now the material doesn't really look like much over here we do have this button where you can switch to a cube projection so you can see how the material is looking like and you can see it's very very reminiscent of our um sort of atmosphere now if we click the dynamic parameter we can set some default values and i'm going to put that to 0.1 and leave the rest as 1 1 1 and that's you know they're fine that way now this is um you know the material was pretty much done in the sense of if you want to if this is this is this is what you want now you can see it's very faint over there i believe there's an option here to disable the same disabled lights i can't sorry i put the lights to black i can't remember what it was anyway it doesn't matter uh we've got the material which is going to apply and then i would um let me just take the material away in our content browser let's create a niagara system a new system from selected emitters and you can actually you know pretty much have this as an empty and then click finish and i'm going to call it ns tutorial atmos and that's the that's for the uh for the atmosphere and now we need to add our material the one we just created this one we need to add it into our niagara system we will now double click the niagara system and let's just make some modifications to it one thing actually that i want to do is i want to drag it within our scene you know just anywhere anywhere around here okay so we can see something uh once we start adding some some elements to it um okay so the first thing uh what we've got is we've got the there's nothing to add to the emitter spawn where you do have to add something to the emitter update so we've got an emitted state which you set the system now we want to set that to self and then move the loop behavior to once and leave that to fixed i'll put the loop duration to two although it's not really important um and then we want to add a spawn uh bursting state instant instantaneous anyway you you get what i mean it's just going to spawn a particle once so that's what it's going to be at this in the sprite render we want to bring our the material that we just created which is the m tutorial atmos i believe if i go into window and click the preview i should be able to see something although it's not showing up as of yet but then let's just have a look into our initialized particle uh this is where we can set the color mode to a direct set maybe put that to something like 50 so you can see it now it's really faint but it's there yeah um and then you want to set up the size which again you can set the size depending on how big your planet is so i don't know if you're going to make this very large or maybe maybe not so large maybe let's just put it somewhere around there or maybe that's too large okay right now if we look on into the scene we've actually added the particle i don't know how big it is though it's probably not big enough so let's just add two more zeros and then yeah okay so that's that's pretty big you know i think that should be that should be enough there for us to see it and you can see that it just disappears uh randomly from the scene and that's you know that could be uh something to do with our um emitter where is it now emitter updates in emitter properties so it's really depending on if you have it as a gpu computer or a cpu but you know actually let's just see if we can find the reason why our particle system is is disappearing it could just be because it's actually being killed off so one of the things you've got here is particle update where it says kill particles when lifetime is over so if you actually deactivate that this is no longer going to kill the particle and you can see that's now showing up in here and it as i said it won't disappear anymore and we're only spawning uh one particle anyway so that's not really a um it's not really a problem if we keep it that way you can see it's got this infinite sort of loop to it now as well um okay now one thing that you can also add is a solve forces and velocity and you can you only need to use that in case you want to set its facing value and i'll show you what that means in just a second and then also you want to add the dynamic material parameters and this will allow you to change some of the settings that you know um you could do in the material so for example we can put the density let's put the density to one and oh i think i just had a crash thank you unreal we're just gonna i'm just gonna redo everything until this point and then just see you guys in just a second don't you just love unreal engine preview honestly is so unstable i can't believe it and we're back so in the density over here we want to put maybe a 0.5 and the power of one if we have a look now that is going to be our material let me just try and get a bit closer to it and you can see how it looks like and if you do change this parameters over here um let me just try and make this panel a bit smaller so this these parameters will have an effect as you can see it you know it definitely has an effect if you want a fainter effect or you know for example the power if you decrease it you can see what's what's uh happening so i'll leave it at one in a density of 0.5 the other two parameters have nothing because they're not connected to anything um but that is basically the material uh well you you've got so let me just show you so in in the initialized particle over here um what you can see let me just make this panel smaller yeah so what you're seeing over here you've got an alpha so you can set that to again that will uh affect the faint of the of the particle itself then you've got colors so for example you can switch this to whatever color you want so let's make it something like that very purplish and you've got the size so you can set the size from here if for example you've got an angle as well if you want if you were masking it like i've done there you can actually set an angle so you've got this sprite reset rotation it's normally said to put one set but you can go to direct angle and then you just put whatever angle you want it doesn't matter if i put an angle right now because obviously it's fully you know round but if we have a look again in our material let me just bring that over uh we do have the sphere mask and we can actually use that what we would need is a textured coordinate node and put into the a value okay then with the number two on the keyboard being pressed press left click over here to add a node with two values for a color we can put that into our b value i want um a sorry the r and g to be 0.5 okay and then the radius and hardness is really up to you what you want but normally um you can play to let's just let's just yeah 2.5 and zero so zero hardness means that it's very smooth and then the radius will sort of mean how uh you know how much does the actual what's the radius of the actual sphere mask so if we plug that over into the opacity and press apply what you'll notice now is that the material will be masked or should have been let me just try a value of one and then apply and for some reason it's not masking it i'm not really oh sorry yeah i'm also i need to put the u tiling to five and leave the v tiling to one so let's press apply now again and yeah you can see that it's masked but it's masked a bit too much so let's try a 2.5 value over here you can obviously put parameters of these and now you can see uh well actually you know i'm just going to go and play a bit with the density in my dynamic parameters and put it at one so we can see it a lot better so you can see now that it's masked but the problem is as i've said to you if i move it will move with the camera right now there is a solution to some of the to this problem in the material um in the niagara system if you select sprite rendered you do have a facing um facing mode which is generally to one of these options but if you do put it as a custom facing vector and if you have this sprite facing an alignment on so added and actually on you can select which way does the alignment of this always so right now it's one minus one zero you could put that to you know for example nine minus one whatever you do it will just change the alignment and you've just got to play around with it but let's say you don't want to play around with these settings because they're not very you know you've put it in whatever sort of you want it on the x you want it on the z value for example right so well actually right now it's a minus one on the y value so that's fine okay but let's say you want this to turn all the way around well that's fine you can go into your initialized particle and then you can have a look at the sprite rotation and you've got an angle so if you put that to 90 degrees you can see that i've now moved it if i put 280 then it's facing the other way around so that's also very useful but as i said the problem is that if you do it this way um now let me just it's going to be difficult for me to bring a planet but let me just go very close sorry i'm trying to select a planet here [Music] and let me just get closer okay so you can see over here we have this atmosphere right and what i can do is i can double click this atmosphere which will obviously bring me the niagara system for it and if i let me just save so i don't lose the work but if i activate the sprites facing an alignment and then i also go into my initialize sorry my sprite render and make sure that this is set to custom phasing vector then you know that's where it's showing up right now let me just go into my initialized particle and maybe do a 180 degrees turn okay so now it's turned but you can see that is now sitting there that atmosphere is now sitting there as it's supposed to be so it's no longer moving with the camera but you can see that it's created this really harsh line because it's just a plane it's not a cube it's not a sphere or whatever it's just a plane so if you guys actually have a way of creating this as a sphere i know there is a way i've not been able to do it as of yet but if you guys find a way to make this as a sort of a sphere and then we sort of mask only one side of it and that would pretty much resolve the issue that we currently have uh but that's that's why this looks good at an angle if you're using it this way if you however disable the sprite facing an alignment then it will just go back to whatever default value i'm just going to put this to zero and now you no longer have this problem because it is now moving with your camera position as you go around it so it will always sort of look okay but then it also means that you're gonna have this where the shadow where the shadow is as well so that's a bit of a problem that's something that this normal atmosphere does not have this issue because it knows where the directional light comes from one of the ideas to fix this for me and i'll show you let me let's just go to our atmosphere our pink atmosphere over here and double clicking it bring back the niagara system and deactivate the sprite facing i don't know why i have this twice to be honest i'm just going to deactivate it uh without deactivated obviously it's no longer it's just moving with the camera now um one sort of one sort of idea that i had was to bring in a sky atmosphere light direction and a dot product and the idea was that i would link this over into my a value and the texture coordinates into this a value over here and then just press apply and if i do that um well for one you know i can i can control l and move the directional light around sorry but as you can see as i do that you know it's not actually accurate where the light is so right now the light is above and it just makes the this sphere really shiny um now it's the light is on the right and the actual atmosphere is on the left which is not right it should be on the right um so that's kind of the problem i mean i guess i could do an inverse and maybe that will sort of you know invert this this connection over here in the dot dot product but either way as i said if you guys have a solution for this this might be the the sort of the way to go so we're masking um we're masking the area that the light so we're masking the area uh that the light is not shining on because it's in shadow um and and that's that's how the directional swirl if the directional light is on the left that we needed to mask the right of the atmosphere so that's something that i'm trying to work out right now but in the meantime as i've said you can still use this with a normal sphere mask without um this the complication of a sky atmosphere light direction but you're you know you're still going to be able to set up scenes where you have a set camera that's looking at this stuff from you know a certain direction um but that's that concludes our tutorial for how to create a very cheap atmosphere in you know on top of a planet uh well around the planet in unreal engine five or four it doesn't matter it works in any of them but i do hope you guys found this tutorial useful and i would really like to thank uh my patreons for supporting me and helping me to make these videos and you know be able to to concentrate a lot more on this content because they you know they made that happen it's really nice to be able to to see something for the work that i put into this and and it's you know it's really it's really um it's really going somewhere right now uh all i could say is you can have access to pretty much all of this content by joining patreon if not you can go on the r station store or you can go on the gumroad store and you can get these projects for yourself i've got quite a few of them right now and there will be more being added stay tuned for upcoming tutorial on how to set up a spaceship in space obviously and how to control it and how to fly it around just like um you saw in the you see you're seeing in the video um but yeah uh i do hope you've enjoyed it and i do hope you've learned something i've definitely learned quite a lot putting all these things together and i think going forward i'm going to make even more interesting um um scenarios and and scenes and you know i'm actually looking at bringing in volumetrics and bringing in uh you know space lighting store lightning storms and nebulas with volumetrics and all sorts of things you know i'm just testing and and uh you know trying to push all these boundaries to create truly epic and immersive space scenes um but yeah uh you know um i hope you guys enjoyed it and i'll see you in my next video so you know keep traveling through space and learn new things and share them with us as well join the discord channel and let us know what you think let us know what you need help with i'll try and help you as best as i can you can ask everybody on this score that i've actually put quite a bit of time with everybody answering their questions and going through their own projects with them uh you know myself and trying to to work out their problems i'll see you in the next one
Info
Channel: Arghanion's Puzzlebox
Views: 6,958
Rating: undefined out of 5
Keywords: unreal engine 5, how to make a space scene, create a space scene in 3d, unreal engine space scene, unreal engine 4 space shooter, unreal engine tutorial, how to make a space scene in Unreal Engine, how to make a space scene in Unreal Engine 4.27, how to make a space scene in Unreal engine 5, how to create a space scene in Unreal engine, how to create a space scene in unreal engine 4.27, how to create a space scene in Unreal engine 5, UE5, unreal engine atmosphere, unreal engine
Id: GJBZFqAvZv4
Channel Id: undefined
Length: 26min 47sec (1607 seconds)
Published: Sun Mar 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.