Create a Space Scene in Unreal Engine 5: The Tutorial You Need to See!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody and welcome to organian's puzzle box i have now released a tutorial on how to create a space scene in which you will have a planet asteroids rotating around it a star system uh the sun pretty much uh volume metrics that help build up the scene even further [Music] quite a few people have requested that i would do a tutorial on this and how i set it up together it's not very complicated i'm going to show you quite a few steps of how to put it together uh based on knowledge that i've acquired in the past few weeks on putting my own scene together i have also found a way to create asteroids that do have self shadowing and also cast shadows within the scene as well as previously i was using niagara and that proved to be quite challenging but yeah i'm using an asteroid field that's using nanite meshes so in the respect of actually um using the scene itself is very it's very performant um at runtime it runs a bit slow because i'm using a um well an insane amount of asteroids within the scene because i am creating this for a science fiction uh movie that i'm working on uh this is gonna be part of my opening scene now for about 10 minutes of this video i will be discussing about how the scene is put together what are all the elements of it and how it functions and then after that we're going to go through the details of how to create certain parts of it this is going to be part one of the video in which we set up the planet we set up an atmos atmosphere and a star system around it but then we are going to move into part 2 where we're going to be looking at doing more complicated things such as the asteroid fields and clouds and cloud shadows on the planet itself so yeah i know it's a bit of a long video but it does go into a quite a bit of depth on as to how to create everything from scratch and by the by the end of this tutorial you will be able to create this entire uh system this star this this planet system within in less than two hours tops so i hope you guys enjoyed please leave a like comment and subscribe to my channel if you have any suggestions to make please go forward with them i am really looking at improving my scene even further as you've seen in these renders so there's much room for improvement but without any more delays let's begin so the way i would like to start doing this work is basically deconstructing the scene that i've created so far and this will help us to understand how i've made this entire setup now i do have a sequence in here that basically can play out and we can see some of the elements you know how the cameras move around and then how the sort of effects that you see on the screen the volumetric effects which i know they seem a bit jittery on the screen right now as the camera moves but when you do actually create a render out of this that problem is mitigated because every frame is sampled correctly when you do a render and this is done via adding a volumetric particle into what you can see here i've got these cameras which are blueprints and basically each of these cameras act um as a blueprint it contains the volumetric within the blueprint plus the camera so they're attached to each other so wherever the camera goes also the volumetric will follow now you'll notice that the asteroids themselves are not moving at all while this sequence plays and that is because i have not pressed the play button on the on the screen on a real engine but if i would press the play button basically what would happen the asteroids would start moving so as you can see when i move out of the camera positions that i've got set up so that's you know one camera um two cameras and three cameras when i move out of those areas it is no longer this volumetric light because that as i said is attached to the camera and not to the viewport camera now if i press play um over here on the screen now you can see the asteroids are starting to move and the performance starts to drag down quite a bit because uh although all of these asteroids are nanite um this calculation of movement of all of these asteroids is really taking a toll on the performance of the scene so when i stop the animation you know stop playing the level uh basically the performance is now back to normal but what you have to understand is i am using a large quantity of these asteroids so as you can see this is the first one it's massive and this is um you know generated by a blueprint and then i've got a second one and then a third one fourth and fifth one so this is just to add a lot more chunkiness to the whole scene there are a lot of asteroids in here and i'm sure with depending on how you want to set up your cameras or what you want to use it for you can definitely use a lot less meshes now as i've said these are all nanites so if we switch over them to triangles you can see that all of them are actually calculated as nanite the performance drop doesn't come from the actual meshes themselves but it comes from the movement that's being calculated by these blueprints and also the fact that there are shadows in here and volume metrics as well to move at the same time but uh normally um you know you could create this with a niagara system as well if you want to but then you will have the problem that i have faced in this render that i've made here where you can see that the meteorites well sorry the asteroids themselves don't have any good shadows to them because they they only have a bit of self shadow and even that is not accurate they cast no shadow whatsoever on the world and so or around themselves so basically they're not useful to us but um in my example here if i start moving the sun around so control l and start moving the sun you can see how the shadows are actually working perfectly on these meshes because they're just an instance mesh across the whole board and they can as said they've got self shadow and they also cast shadows in the scene which makes it a lot more of a realistic scene um so let's begin just deconstructing all of these elements that are put together okay so and now you'll see that the there's a this sort of weird looking sun glare over here uh the reason why i've got it is because it adds a bit more um sort of volumetric into the scene and it helps with the scene build up when you're actually using the cameras that you will you know you set up now if you don't want that you can just go into the exponential height and start removing it but let's just start deconstructing the scene like i've said previously uh basically we've got these five blueprints over here that generate all the asteroids and i'm going to show you how to set up one of these which is you know it's it's quite of a complicated process in the sense of there's quite a few things to be added in the blueprint but we will get through together and you'll see it's not that complicated once you start laying the foundations down um so these are the this is one blueprint that we're going to create then i've got the camera again there's just a camera a blueprint but you can just use a normal camera if you want you don't have to do what i've done here with a volumetric attached to it that's really up to you then we've got a directional light and the directional light is just set up at a very low intensity 0.2 and then you know i've just done the settings in such a way that it helps my scene you know we obviously want to have shadows and so on turned on uh but i haven't really done anything to the directional light apart from light shaft occlusions so i've turned those on with some occlusion difference in bloom and i've done this because i wanted to have these sort of rays of light as you move through the asteroids which i think has a lot of um you know quite a lot of um uh well uh i would say i would say a very nice atmosphere but this only works if you have a volumetric in here so if i get close to the um to the planet as you can see there are the light shafts and the blue um which for some reason seems to be working with those off um oh yeah i think it's just because purely just just how the atmosphere works but now that i've got these on here they will also work with the volumetrics like i told you uh otherwise they just they wouldn't um so i can't really get the effect to pop up very nicely here just because i don't have a lot of um big enough volumetric effect within the scene as you can see it's only at that point um but my use of the exponential height fog which you can see in the level as well is to make those setups here for the for the cameras to work so this is this is why i've got the volume energy because if i deactivate it as you can see there are no more volumetric effects within the scene um okay so um i've also got the planet let me just um get out of this camera so this is the planet over here um and the planet is using a texture that i've got from this website which is a mars 8k texture i can also i know how to generate um you know create my own planets by um procedurally generating them but in this particular case i've just used a mars texture on top of a sphere the saturn ring is also from here so maybe you can't really notice it but there is a ring in there so if i deactivate these blueprints you should be able to see the ring and the ring itself is using an opacity mask to decrease the intensity of the actual ring when you see it and also has a depth of field fade so that when you have meshes around it it actually blends quite well and you'll see what i mean when we get to that step and then we've got over here on the planet i've also got um these are clouds over the planet uh so that that's just how i added those clouds and they're just got a panner uh within the scene to just turn around uh i haven't yet removed the cast shadow on this so the meteor the asteroids are actually casting shadow on the planet you wouldn't really want that so i'll just have to remove it and this is a this is a shadow that i've added uh underneath the clouds so it just gives a bit more depth to those shadows then we've got a post-process um effect that just darkens the the you know the space around us and just helps with building up the scene a lot better again adds a film grain and and so on but this is just purely up to your preference then we've got the sky atmosphere which is obviously adding the atmosphere around the planet and i'm going to show you how to set that up i've also got a skylight doesn't really play much of a role in this and then i've got a star system which is just a dome around this area with a star system map which i believe uh i've got from here somewhere as well so we can find that texture in here as well anyway but yeah that's that's the break that's the breakdown of the scene what we're gonna do we're gonna create a new level and just start building it up from scratch starting with the basics where we're going to add our planet atmosphere lights uh volumetrics and then we'll move on to the more let's say complicated part of this whole thing which is to create the asteroids so the first thing we want to do now is we want to create a new map so i'm just going to create a new level and just call it space to tutorial and then i'm going to double click it and this will open my new map now as you can see it's actually completely blank and that's because we have no lights or anything like that in the scene so we can go over into window and then over here select environment light mixer in here we can create a skylight an atmospheric light and a sky atmosphere and that's it because these two we wouldn't need them so we don't need any volumetric clouds because we are not creating a landscape or creating a planet so now we're going to have a look at our scene there's nothing in here because there is nothing that light can be casted on so we have to create an object so i'm going to create a sphere um if you haven't yet um activated your modeling in unreal engine just go to plugins and enable it this will ask you to restart the engine do that that's fine but then you're gonna have modeling tools inside unreal engine five or four both of them have it so then you can press this button over here and you want to create a sphere so let's try with a sphere type a so once you press it you want to select certain um uh see you know certain parts in here so we want our pivot to be centered and then everything else could actually just stay the same and then we just press somewhere within the scene which has now added the sphere we can press complete and go back to where we were now if i press f this will center me around the sphere that's our sphere over there in the world let me just decrease the speed we're moving way too fast so that's that's the sphere that we've added within the world and this sphere if we go over to the transform panel we can actually start increasing its scale so let's just take it over to about 1 000 because i've got my lock turned on this scale is 1000 in all directions not just that one axis now if you look at the speed of the sphere itself you can see that it's a bit low poly so it may not actually be what we need so we're actually going to go back into our modeling and then have a look at maybe sphere type b and see if that's um any better uh normally you'd have to look at the subdivisions levels so in this particular case let's try with 128 and then i've just pressed uh my you know button uh into the scene and this should have added the sphere and as you can see this is how the uvs are laid out now this is not gonna work with our texture because if you have a look on the website that i've shown you before these textures are actually going to need a sphere like like what we generated the first time which is sphere type a um so this is why i'm showing you this because it's very important they actually get this right uh so you've got these slices on the sphere so you've got to maybe create so i'm just going to go for 128 by 128 again centered and i'm just going to add it within the scene now this is a far more smoother sphere than what we have previously make sure it's actually centered into our world um and then we can have a look at it increase it to 1 000 for now and when you press f as i said it just takes you out into this um it takes you outside of it so let's just have a look i'm not really sure why i can't see um the sun but i think i'm pretty sure i'm going to be able to see it once we turn some of the settings up so the directional light you've got to make sure that it's actually set up as a um as a light source that's affecting the whole world um you know it's affecting the atmosphere so you want to go over down here where was it now there you go so you've got cast shadow cast cloud shadows cast shadows like that and this is our as i said the sour sphere over here we want to go to the sky atmosphere as well and then we want to decrease the radius to let's say 10 and 10 is still too big that's our like that's our sun over there so the sky atmosphere was actually blocking um our um our sun um so we want to turn this down to maybe a two or three let's try one and it's still too big too big for a sphere but that's fine i'm just going to increase the size of this panel uh with the atmosphere we want to select over here planet centered at component transform so this is now the sky basket is now centered around our world origin but it's still too big so what i would suggest instead is we take our sphere and we make that bigger let's just try 2000 and as you can see 2000 is exactly the size to be as big as our sky atmosphere but still the sky atmosphere it looks very weird um it's like it's like it's massive basically so we've got some settings over in here which is that's the ground radius then you have a height so you can turn that down and you can see what's happening over here uh this is how this is how big the atmosphere is going to be but it just doesn't look right um you know we've got some other settings in here to make it look a bit better but um you know you've got this exposure this is exponent um setting these these all these things will be done based on your preferences within uh what you're trying to do but right now it's not looking right so what i would suggest is go and add a shape which is like a cube right make the cube the same size as the sphere and now as you can see the cube is quite uh big we're gonna move the cube where the sphere is rotate it so you can see its side like that and now we can see our sphere casting a shadow over on the cube which is great that's what we want now let's put this let's put the cube further back maybe somewhere around that point and now select the sphere and let's make it let's add 20 000. obviously the sphere is massive the cube is inside of it right now so we're just gonna have to bring the cube out and maybe make it a bit bigger like that okay so why did i do that well the as you can see that is no longer at this scale there is no longer a shadow being casted on the cube now this is this is a massive problem because the only way you can gonna get any shadows or casted on that is if you get close enough and no amount of settings will help you to further increase the shadows at least none that i can find so what you want to do at this point um you want to start scaling down so the sphere could probably scale it down to 1 000 um and then our cube as you can see it's now capturing the shadow from the sphere so this is this is how how far you can go with the camera before the shadows start disappear now this is important if you want your planet to properly cast shadows on your um your asteroids your meteors or whatever um so that that's why you want to have you want to test this out so we can now delete the cube this is probably the size that we want to keep for our um for our plant now we can start increasing the ground radius of this um and it's important that you increase it to the poi you know to the point where it's actually um perfectly aligning with the planet so that's it that's number five for me and here um now what i can do is i can look at the atmosphere height uh i can use i can look at the exponents so i could turn the exponent down to maybe like a 0.6 and then the atmosphere [Music] height could go you know could be higher or it could be lower the more as you can see the more i push it out the more uh it fades um outside um so we now have volume metric over in here by the way so whatever debris you're going to have around here is going to create light rays and so on just like what you see normally this um sky atmosphere would be far higher the ground radius would be far higher and that would help with mitigating sort of this effect with a sharp edge so what you want to do now is basically play with the settings until you find something that really works quite well for um for your scene so 0.2 is not enough let's try 0.3 something like that and what we want to do now as you can see we want to take the scattering down to 0.1 it's too much maybe something like that so normally you start playing around with the setting settings [Music] yeah now i'm just gonna i'm just gonna take this down to zero for now this is gonna be okay i do have a proper sort of atmosphere showing up right now which is quite nice um so this is this is now set up wanna add we want to start adding the textures over into our planet um and also the sky dome but there are other things that we can do um first as well so for example we can take the intensity of the light to a 0.2 that's what i like to take it to 0.2 might not be enough for you but that's really you know up to prefer preferences 0.5 is also okay if you want to use that but so far this is what we've got and let's move on to texturing now what you need to notice is that in our folder where we created the map we have a new folder called generated if you go into the generated folder you'll see that these are the meshes that have been generated via this modeling editing mode so our sphere is the one ending in f e a so we can actually take these two and delete them we don't need them anymore and this is basically our planet you can't even rename it let's just call it planet and unfortunately we're gonna have to rename it within here as well now let's go over onto the website where we've got the all of these um sort of meshes and sorry these textures and i'm going to download the 8k saturn so save image as i'm going to download in my downloads folder and then i'm going to take the ring as well so i'm going to save image as and put it over as well um i think we might want some clouds so i'm just going to take the earth clouds just so i can show you how you know other the clouds can be applied as well and then also we could have a look at how um we can apply some shadows to these clouds um one thing to note as well is that oh look there's the stars plus milky way so we can actually get that if we want to so i'm going to download that as well which is going to help us with setting up the scene even more uh one thing that's um you you won't need to know is that this um texture for saturn doesn't have any normal so you have a normal map for earth but you don't have a normal map for saturn so you're going to have to create it on your own in photoshop or try and um sort of you know i would say force it through i'll show you what i mean when we get there but now we've got we've got the textures i'm just going to open a um file explorer go into my downloads and i'm going to bring all these textures in here obviously the system has now imported them and we want our saturn texture we want to create a new material um and we'll just leave it like that for now but what we want to do is over into our planet we want to add the saturn material and if we have a look the saturn material has now been applied again with no normal so it doesn't look too uh unfortunately um but there are there are things that we can do so if we double click and we open the material uh let me just shut down yeah so i've got the material over into here let me just bring this over to the side uh what i'm going to do is i'm going to go into my original um work that i've done so far and i am going to open the earth material if i can find it there we go and i'm going to copy some nodes from here and the reason why i'm doing that is because i don't want us to start putting it together from scratch if there's no need to um so what i'm showing you everything here i've actually generated a normal of the mars texture uh because that's what i wanted to do in that particular uh sort of setup um but what i want to do is let me just go over into the material over in here i want to create this i wanted to copy this normal intensity sort of node so i'm just going to bring it over into here and what this is doing it's basically taking the texture which now i need to change it over to the satin one let me just find that i'm going to try i'm going to try and tank it this way you know like just using just using this texture and see what happens so i've just put the base color texture and i've got a parameter the normal intensity parameter is just a number really and 1 minus x node going into a flatter normal and then that can go into the normal node over here now let's apply and see what has happened so we have a look it's actually not done it's not done a very good job unfortunately uh one thing that we can do to mitigate that problem uh let me just go back into where i have um created sorry where was that that was over in here maps this is where i created the the tutorial files so this is the material let me just open that again what i what i need to do to this material is i need to create a material instance so right click it create material instance and then we can add that over into our planet now if we double click the material instance we can play with the intensity of the normal and if we switch that over to a one you can see that it's starting to show us something yeah but the as i said to you this is not this is not ideal because this is not actually a normal unfortunately this is just um a base color file so you do need to generate a normal um for this if you really want to fix that and you can do that through photoshop so in photoshop all we need to do is go over into filter 3d and generate normal map and this will automatically create a normal map for us but you've got to play around with these settings so you want to turn this over into maybe 120 i'm not really sure why it's doing that there we go so what about yeah it's very interesting isn't it if i press the button so if i use a slide that it works okay but if i press the button it just messes it all up right so this is our normal map that we generated from this texture and we can now export sorry we don't need to export photoshop is all about saving so 8k saturn and i'm just going to type in normal don't worry about my naming convention not to mention that i've actually messed it up because i pressed um i pressed save but i didn't actually [Music] one second uh press save yeah okay large file okay okay now so now it's saved and this is our texture so i'm just gonna drag this over into my content browser over in here um let me just go back into our material so bear in mind like i said to you this node is literally just um a so i'm just going to select that texture um and let me just go over it here and use it so that's the texture so this this node just allows us to intensify our normal so i've just pressed okay i press apply let's just have a look this is our normal looks like and in our word over in here we can actually play around if we want the higher intensity or a lower intensity i'm just going to go for a 0.5 and that should be a good enough intensity for this particular scene so this material as i've said normal normal intensity flatten normal and then over it's the normal node now other other people may actually you know look at this and be like well i want to have a higher up you know i want i want to have a planer or i want this sort of planet to to move you wouldn't want to rotate the planet you can rotate the texture itself um so in the material that i showed you guys earlier which i don't know if i've got yeah i've still got open i've still got it open so if you look over in here i did use a panner um so this panner as you can see it goes into a million different textures that's because i've got so many different sort of ways of of doing things that are generally not necessarily um finished but i was using a uh decal so uh sorry not a decal a um um parallax occlusion mapping but in this particular case we're not going to need to do that i'm just going to copy these nodes from here and i can add them over in here then i can put the coordinates of the panel into both of the v's of the normal and the texture sample and now i'm going to press apply let's close this material and what you or you'll see right now nothing is really happening if we double click the material instance um we've now got a speed so if we see that put it to one and it's now rotating like crazy so we probably want the zero point that's not 0.01 no it's still too fast so 0.001 is still spinning the planet at a far lower rate but now but as i said the supply this is rotating we do may want to increase our um height of our atmosphere it's just it's just not you know it's not bleeding out enough enough sort of um you just try and play around with these settings it's not bleeding enough atmosphere out there so 0.6 yeah there we go um so again you can see the atmosphere that we've got that's looking quite well okay so what else do we want to do well we can take our um planet that we've created and we can press ctrl w to duplicate it and we can then rename this to a star system yeah and then the size of this star system we've obviously got to make it quite large so this is now occupying the entire area of um of our uh sort of site the sun is blocked up and everything else is blocked as well um we need to create a new material for this so i'm just going to create a new material and call it m star system um i'm then gonna double click it and what i want to do is i want to create our milky way texture over into here and then we just hook this up to the base color click the material itself and make sure you've got two-sided on and then press apply now if we go back into our scene again you can't see anything because the there's no light sort of shining in here unfortunately um so we need to mitigate that we need to make the this material allow for light to penetrate it without obscuring it in any possible way so in order for the star system to ignore uh the sun well sorry the sun to ignore the star system we want our uh landscape sorry our material why did i say landscape i have no idea we want our material to switch to be switched over to one lid to begin with and this doesn't allow us to use the base color anymore so we want to drag this over into the emissive color instead but we've got to tell on real engine that it needs to ignore uh it needs to allow the light to pass through so we're going to search for a node called sky atmosphere light scattered luminance that's what it's sorry like this kilometers why i'm just saying the wrong thing all the time today right so once we have that node in there we can then put a add node over in here and we can connect our luminance over into the a node then we want to add a multiply node in front and we need to connect our texture over into it and then a parameter into the multiply this then goes into our b slot over of the add node and this goes into the emissive color with that done we want to add a texture coordinate this is just going to help us to in order if we want to expand on the uh you know use the uvs in a different way so i'm just going to create a new parameter um and then i'm going to convert this sorry i'm going to convert it to a parameter i'm going to call it size and i'm going to add a multiply node here as well and connect the texture coordinate and the size over into each node and put that into our uvs now as i said this over here has to be a parameter on its own as well so we're just going to call that um brightness okay and we can give it a default value of one and this size a default value of one as well and then we can press apply um and then we can have a look over into our you know over here into our scene i still can't see um anything so let me just browse over to this material i've got my um my content browser over on this side so that's why sometimes they just don't show up because i've got it on a different monitor i'm actually finding it very difficult to run with the 1080 p monitor right so with the star systems selected let's now create a material instance of our star system and then we can drag that in on top of this um now you can see we've got um you know what's it called so there shall be light so that's it uh we've got a light now um i think it's too strong so the effect of the the brightness itself is probably way too strong so 0.1 brightness works far better than you know using one and for some reason it has affected my planet so we need to obviously work uh we need to work with that and sort and resolve it okay so we've got in order to fix this basically the star system itself we've got to um take the cast shadow option off so now the star system is no longer casting any shadows meaning that the light is not creating a shadow from the star system onto our planet which is great so that that's now working properly uh we also want to add a cinematic effect sorry a visual effect which is a post process volume and somewhere way down you've got an option called infinite extent if you press that button now the post process it doesn't matter what it is it within the world it will affect the entire world and the reason why i've added the post process to begin with is because i want to go over to bloom and change the method from standard to convolution which this this this will give us a more realistic sun glare uh if you want over in here you can also start adding other effects such as um uh you know a dirt lens flare um film crane so for example i like to go for a 0.2 or 0.3 sort of film grain something like that i don't know if you want that i've also i myself use the big vignette effect as well uh because it just helped with building up that scene even further um so what we've done in this video we basically created the planet we created an atmosphere which again you've got countless of options if you want to extend it make it bigger make it you know whatever you want to do with it we added our lights uh we created our planet that also spins around in the next video we'll be exploring uh creating the um asteroid fields and also uh you know the clouds and shadows from the clouds um and then the volumetrics around the asteroid fields as well to make them look a lot more cinematic um but yeah that's pretty much it for this uh video so i hope you guys you've really enjoyed that and you found it useful please leave a like and subscribe to my comment if you did please let me know if you have any suggestions or if you have any improvements to suggest to me i'm still developing this i'm still working on creating a very good space sort of environment for my science fiction movie so any ideas you have please you know throw them my way and i'll see what i can do to implement them but thank you guys for watching and i'll see you in part two of this tutorial thank you
Info
Channel: Arghanion's Puzzlebox
Views: 97,655
Rating: undefined out of 5
Keywords: how to make a space scene, unreal engine space scene, unreal engine planet, 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, unreal engine planet tutorial, make a space scene in unreal engine, ue 5.2, unreal engine 5.3
Id: OtfPWM4M9j0
Channel Id: undefined
Length: 39min 53sec (2393 seconds)
Published: Sun Jan 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.