Procedural Ringed Gas Giant - Blender Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another exciting blender tutorial we're going to be taking a look at how to make this really cool planet with rings using nothing but procedural shaders so let's jump in so the final tutorial will probably be about 30 minutes and that's probably what you're watching right now is the 30 minute 20 to 30 minute long version on youtube which has got all the main points that really get you to this image when i finish the live stream i take it down and i put it up just for everybody that's on patreon and that's a channel member on youtube and then i take that video and i cut it into a shorter more concise tutorial so a lot of stuff that we did today a lot of the experimentation i mean the full live stream is an hour and a half long so we've done a lot of different things and all that is uh going to be just up for patreon and for channel members on youtube if you'd like some extra content um and you want to find and find out some more of what i'm doing you feel free to check out those places okay so first thing we want to do is um we're going to get our planet set up now i want to create kind of a gas giant so i have this like kind of soft planet that has like a a bit of like light permeability so it feels like it's a gassy kind of planet like a big gas giant and in order to do that we're gonna use a couple of tricks to make sure the light is passing through the surface of our object and uh just creating that nice uh soft feel to the the overall planet texture so first i'm gonna do is i'm gonna hit a to select all exit delete just for fun because why not let's have fun and i'm going to hit shift a and i'm going to create a ub sphere and i'm going to scale it up a bit just for you know i don't know why not each one of these squares is a meter so this is a very small planet but we're not going to worry about technicalities not on this channel all right we're going to come over to the modifiers and we are going to add a subdivision surface modifier that will just smooth out the edge a little bit and i'll make sure my level viewport is matching my render so i can see exactly how it's going to look when i render this thing out all right now the first thing you want to do is select the object we're going to come over here to the material tab and we're going to click new to create a new material and we'll call this gas giant now i'm going to open this side panel up here now if you don't know how to open side panels um you just move your mouse to the corner of one of your windows and you get this little plus symbol so i'll do it somewhere where you can actually see it where my head's not in the way so if you see i get this plus symbol if i click and drag it's going to split out the view and if you ever want to get rid of one you can do the same thing find the corners and then click and hold and drag and it's going to give you that arrow you can drop it in you can go in any direction with these so it's really helpful for creating whatever layout you want so i'm going to switch over to the shader editor and i'm going to minimize this a little bit and zoom in okay so let's also set up our render settings so we can start to look at how our final result is going to uh to appear so we're going to use the av render engine so we can get a real-time result and i'm going to go for ambient occlusion uh actually we don't need ambient occlusion so i'm going to leave that off among occlusion is basically when two objects get close to each other you get a little bit of a shadowing effect uh where they overlap it's great for objects that are like you know you have lots of like detail on an object it helps bring out that detail but we don't need that because we're not really going to have things intersecting so it's never going to be used i'm going to turn bloom on that'll help make things glow and they get really hot and uh really bright i mean and then i'm going to turn on screen space reflections i'm going to open up this drop down and i'm also going to turn on refraction and that's going to be really important for one of our steps coming up so once you've got all those settings set what we can do is we can switch to render view and we're not really see anything let's go ahead and make space just to kind of set the mood i'm going to take my color of my background if you click on the world tab and i'm going to drop it down to black if i turn off my controllers with these two buttons up here you can see now we don't see anything i could even hide this by hitting t now let's come over here to our shader and we're going to switch from object to world and then we're going to go shift a and we're going to grab a noise texture and a color rim all right this is the easiest way to make stars i'm going to take the factor of my noise texture and plug it into the factor here of the color ramp you could also use the color doesn't actually matter in this case factor is basically a black and white version of what this noise texture outputs and the color one is a colored version so different use cases now i'm going to take make a little bit more room i'm going to bring my color and i'm going to pipe it into the color of my background now you can see this cloudy look and i'm going to drag this down and then i'm going to take my noise texture and crank my scale all the way up to 600 so it's really really fine noise texture and then if i drag this in it's going to cut off more and more of the bright bits and leave me just this nice star field okay now if it's a little bit maybe too many stars i can drag these in together to brighten them up a little bit you may not be able to see that very well with the youtube compression but you can adjust it basically by adjusting the scale here uh to determine the size and how many stars you've got okay that's pretty good i might pipe the strength up to two that will also make them a little punchier make them glow some now let's switch back from world to object and with our sphere selected if you get confused you can always turn these controls back on to make sure you've got it selected i come to my material and let's start making this gas giant material i'm actually going to create a light too we need something to see with so i'm going to shift a come down to light we're going to go sun lamp and i'll just hit r to rotate and i'm just going to rotate it to kind of just create a nice uh little half moon shape and i might turn my strength up a little bit let's go to like five it's going to start giving me a little bit of bloom because it's quite bright and uh let's go back to our sphere select the sphere and first thing we're going to do is we're going to use uh we're going to create some colors so let's go for a noise texture just like we did with the space and we're going to create a color ramp and i'll plug the factor into the factor and i'll take the color and put it into base color and that's going to start to color the surface of our planet now i'm going to change these colors i'm going to bring them up give it kind of like a gassy orangish color and i'll actually make these pretty similar and uh drag them in so they're a little close to each other maybe not that similar it's a little too similar there we go so just a little bit of difference between the two and i'm gonna bring my scale i'll bring it right down to let's try one and i'm going to turn distortion up and that's going to start distorting this uh this this material and i'm going to play with my roughness and my detail that will kind of roughen up this surface a little bit and i could hold down shift as well to change the speed of like how much i'm changing these values that's kind of nice actually what if we rotate this planet on the y and on the x actually getting some nice kind of bands it's kind of nice i could bring these in a bit closer to make those bands a bit stronger and i can use my detail and roughness just to break up the edges you can see it gets it like rougher more cloud like okay so that's nice nice subtle look now i'm going to drag my roughness up because i don't want to have a reflective planet because it's planets don't reflect their environment and i'll turn my specular up a bit and then i'm going to come over here and i'm going to turn up transmission but in order for transmission to work i've got to change a few settings now what is transmission transmission it's basically the value that you want to change if you're making something into water right because transmission allows light to transmit through an object so by turning this up we're allowing light to pass through our object now if i come over to my options i get a couple of options here um and we've got green space refraction and subsurface translucency we're not going to use this because we're not doing subsurface but i'll turn on screen space refraction just because it'll help the transmission work a little bit better um now i'm also going to uh see i'll bring this up a little bit more and i'm going to turn my light up that'll help the light kind of fill out a little bit better it's going to really soften up the look of this planet now what i can do is i'm going to come over here and i'm going to make the edge a little transparent so that it's not such a crisp edge this will really make it feel like a gas giant so i'm going to use a node called the layer weight node and the layer weight node has a really cool effect where wherever a face in our objects if you look at the geometry of our object wherever one of these faces these polygons is facing the camera it's going to shade it uh black and wherever faces begin to look away from the camera the further away they're looking the more it's going to shade them white so you get this nice gradient towards the edge of an object all right so i am going to use the uh these spacing is a little bit of a softer fall off and fresnel's a bit of a harder follow i'm going to grab a color ramp as well though to give myself even more control over this and i'm going to plug the facing into the factor and i'll plug the color plug it into the emission first so i can demonstrate it go back to rendered view so you can see what's going on there it's not glowing here in the center because this bit's facing the camera if i drag this out you can see what it's doing now i'm going to soften this up a little bit by switching from linear to ease and then what i'm going to do is instead of plugging in the emission i'm going to plug it into my alpha now an alpha channel is basically the channel that determines whether things should be transparent or not now you can see it's actually flipped uh this edge is the edges fully opaque and the center of it's transparent it's also looking a bit funny because we have to turn on the settings we can invert this by just flipping these okay and then we also need to come over here to options and with blend mode now this is only for eevee you have to set this freebie uh cycles it'll just work but navy we gotta go uh alpha hashed or alpha blend i'm gonna select alpha blend i'm gonna turn off show back backface and i'm gonna select alpha hashed lucas says the whiskey and cigars voice suits you well welcome to today's blender tutorial we're going to be making a planet with rings think of how many subs i had if i sounded like this all the time okay so by plugging this into the alpha you can see now it's oh i'm sorry by turning on um alpha blend alpha hash basically allows eb to know how to interpret alpha and how to show it so um you can see now we're getting we're able to see through the edge a little bit which is kind of cool and we can refine that just by dragging these values here if i bring the black down a bit it's going to always make sure the edge is not fully transparent so that'll just give us this nice soft soft edge now it looks like this you know giant gas gas giant giant gas giant very helpful with my uh my english okay now let's go ahead and create a camera so i'm gonna shift a camera hit zero my number pad to jump into the camera view you can also get there by turning on your controls and clicking the camera icon that'll stick you inside it i'm going to zoom out and i'm going to find a nice view of my planet and i'll go back to my camera and i'll turn off like camera to view that way i can zoom back in a little bit and get a closer view and then i'm going to come over to the camera tab and i'm going to go viewport display and i'm going to turn up passbar 2. that darkens the outside just helps me focus on my image doesn't really change anything in terms of render settings okay so how do we make rings on a planet like this well um we're actually gonna do uh some tricky stuff there'll be a lot of ways to make this okay but i'll show you one way to do it and i'm gonna try to explain it as clearly as possible so you can follow along all right i'm going to create another sphere so shift a uv sphere i'll scale it up so it's a bit bigger and i can see it i'm going to right click and shade smooth and i'm going to edit mode and with all these faces selected i'm going to show you the uv editor now the default sphere when you make a uv sphere in blender it's uvs are already unwrapped all the default objects are already unwrapped and a uv is basically it's a it's a map that helps blender know how to you know position a texture so each one of these little squares is uh us one of these squares one of these polygons and you can see that what they've done is they've actually made these cuts up at the top these like sawtooth cuts and those sawtooth cuts are up here at the pole right and they've cut it this way so that the entire sphere lays flat so you can see each of these squares is the same size and it'd be really easy to just grab a flat picture texture and drop it onto this and it's going to wrap it around the sphere pretty perfectly it will pull a bit at the at the tips because you can see these polygons are quite long or these triangles are quite long and these are quite short so it'll start to pull that texture as it places it up here and it will pinch it up at the top right because everything's basically pulled towards the poles when you unwrap something this way what this gives us though is it gives us the ability to use this uv layout to create rings because what we can do is we can create a noise pattern and we can scale that noise pattern up really easily on the x or on the y and if we scale it like all the way on the x like or make it zero in the x right it's going to just be a y pattern which will put these like basically stripes these lines this striped pattern and then what we can do is because it's a sphere the stripe pattern is going to be wrapped around and now we can reshape our object in order to get rings so what i'm going to do is actually apply the material first and then we'll go into render view and i can let you watch this kind of happen so that hopefully that what i just described kind of makes a bit of sense so i'm going to leave this up i'm going to open this up here and i'm going to switch to my shader editor drag this out here and we're going to go to render view now go easy on yourself if this doesn't make a whole lot of sense at first um this is you're thinking about uvs it's a pretty advanced topic and it's hard to wrap your brain around at first but hopefully this will make sense as you watch it i'm going to call this material rings and i'm going to come over here zoom out a little bit i'll pull this up we don't need this as big actually we don't really need i'll leave it up for now because i will show you i'm going to start by creating a noise texture all right and i'm going to plug this noise factor into my emission so we're just going to look at this one thing now the next step is i want to actually make this a little bit harsher i'll put some contrast in this noise so i'm going to grab a color ramp and i'll put it here okay and i'll pull this like this to create that contrast all right now what i want to do is i want to turn this into rings right so how could i do that well i'm going to come over here i'm going to grab a texture coordinate node the reason why i need a texture coordinate node is because i'm about to use a mapping node to change the uv layout so it's important that i have a texture coordinate node first blender always requires that when you use a mapping node so i'm going to grab my mapping node now remember blender is always by default using generated so if i plug the generator into the vector and the vector under the vector of my noise nothing's going to change i can all stay the same so now i feel look if i take my scale on my x right and let's pull it down i'll go all the way to zero it's now stretched this noise across my sphere but you can see if i come to the edges here it's not stretched on this side and it looks very strange on this side right so it's only really kind of stretched it here i could try you know like okay let's make y zero as well or actually we'll probably do it more or less still getting some weirdness there but you can see we're getting these rings okay which is you know kind of what we want we have this ringed thing now if i use not generated if i use the uvs that were laid out so remember these are what the uvs look like let's have a look at what this thing looks like put this back to one and one so there we go so this is how it looks like it's laid out with the uvs you can see we get a seam right it's not perfect because with generated you see it it'll wrap around there's no seam anywhere um that's just because we're intersecting the other sphere but if i use the uv there's going to be a seam because if you recall get to the edge it doesn't just continue it's got to like start back over here so it's taking this noise texture and it's laying it on the square and as it meets the edge it just stops drawing and it starts up again wherever the noise was here so that's where you get a seam and that's one of the drawbacks of uvs if i take my scale right you can see i do the same thing if i make make it 0 on the x it's going to do that same effect it's going to stretch it all the way around right so now let's let's shape this into a ring i'm going to look at this from the side i might turn this on off so that i can just see the emission material and i'm going to turn on transparent mode right up here x-ray mode and this will allow me to select not just the vertices in the front but also the ones in the back if i don't have this turned on and i like box select here you can see it's not selecting anything on the back but if i do have it turned on if i box select it's going to box select the front and the back so if i jump into side view and i've got box turned on i'm going to hit b just like to do box selection i'm going to come down and i'll grab this group and i'll grab this group so it's kind of dark you can quite see it but just got basically these three rows here that i haven't selected i actually want to switch to face mode and see i'm going to box select that group and that group and i'll box this group as well so just i'm left with just one ring right i'll hit x to delete these spaces now i've got this one ring of geometry now if i crease the scale of my noise texture you get bigger and bigger and bigger and with this set to zero on the x you can see that basically it stretched this thing it's just doing what we were doing already before but now we're just looking at you know the faces that are left so how would i take this now and turn it into flat rings well i can just go in and change the geometry so i can switch to edge mode and hold down alt to click that's just a shortcut to click an edge loop it's the same as if i was to hold down shift and just go through and manually select all these and what i can do is i can scale in a little bit and i can you can see how it stays with the the mesh so that's the uv so the fact that i'm using uvs as the texture coordinate means that the texture is going to stick to the faces and stay the same no matter where i move the faces if i switch back to generated do the same thing you can see how they're sliding around it's the same with all of these if i was used to use normal going to slide around we're going to get different results object coordinate is also the same so i'm going to use the uv and the uv is the trick to getting it to lock on so that's how we can sculpt the shape of this basically by changing the geometry so i'll scale in a bit and i'm going to drop it down so it's at the same z level as the outer ring so i'm going to turn snapping on and switch from increment to vertex now i can grab zed and bring it down and drag my mouse and as i get close to a vertex it'll snap on so i'm locking it on the z plane by holding down z so it's only moving on the z or z plane depending on where you're from and now i'm going to lock on one of these and that will take the z position of one of these points so now you can see it's this perfectly flat system i'm going to turn snapping off now and i can scale up this whole thing i come over here and add in a subdivision surface modifier to smooth it out and now we've got rings now let's center everything up i'm going to select my planet i'm just going to make sure we're right at zero zero zero so it's right at the center of my world and i'll make sure this is centered up as well and let's turn my sunlight back on and i'm going to bring this up uh i want to intersect the uh the planet perfectly with it because that would make sense of gravity right so i need to my origin point say a little yellow dot it's hovering above the plane of this disc and that's because we started out with a sphere you know we've deleted a bunch of faces the origin has stayed in the center where that sphere was we need to shift it down so it's now in the center of where this object is so i'm going to go object set origin or is into geometry and that will just get sort of the average position of all the geometry and reset that for me so i'll come back over here on just as a reference so if we go back into edit mode and i go back to my uv editor you can see that's my uvs for this thing so we haven't really changed the uvs it's still the same as what it was when we started just we've gotten rid of a bunch of faces and then we've changed their position in 3d space so i hope that made a little bit of sense kind of doing that step by step so you could really see it now because we've dropped this thing down i can or we change the origin i can now move it and to the zero zero zero position and that will put it right in the middle there and i can determine how far out i want these rings to be from the surface of my planet and it's also cool we're gonna get this nice shadow i'm gonna click alt to select the outer ring and hit s to scale and bring that out like so all right now instead of plugging it into the emission what i want to do is plug it into the alpha now let's make sure alpha's set up for this material because remember we're in ev so come to options blend mode we need to switch this to alpha hash or blend the difference between these is just a rendering effect so hash gives it kind of like a noisy look and blend gives it a smooth look but blend has some limitations so blend you can't see through to the other side of an object that's why often it turns on show backface automatically which means showing you the back facing polygons it doesn't really matter with something that's just a single layer of polygons because there is no back face but and shadow mode i'm going to switch to alpha hashed so you can see we can get these nice shadows now you do get a better resolution when you render all right now i'm going to turn off my selections i'm going to switch into my camera view i'm seeing things it's really coming together it's looking quite nice all right now let's make these rings look even better so i'm gonna just come over here i'll turn my scale way up a bit now one thing we can do is i can go into edit mode and hit control r to create a loop cut and let me show what that will do to our uvs okay so let me undo that cut so okay you can see the uvs if i do ctrl r to create a loop cut and do that and just hit escape it'll stick a loop cut and you can see now we've got this extra cut here right in the middle of our uvs if i was to go into edit mode now and select this by holding down alt and then hit s to scale and drag in you see how it's like actually stretching these rings now that's because in here it's not moving it's staying the same so that's kind of how uvs have this kind of power to them where you can you know work between both environments so we can create like sort of a denser setup of rings here and a wider setup out on the other side all right now let's take our rings and um i want to figure out the material for these guys i could bring my roughness down and i like the specular being up pretty sure if we turn up our samples yeah samples is what matters for alpha hash so if you're not getting a good result with your final rendering just turn up your render samples and it's going to look a lot better let's add in a little variation to the color on this so i'm going to grab my color ramp here i'm going to grab the noise bring the factor in and then what i can do is i can set these colors to be the colors that i want and stick this into the base color this will give me the ability to drag these around have different colors at different rings i think what i might do is like have a bit of light there and then shifty rotate this one around so i can get a bit of a pin brick off that i might turn this one down to a touch so it's just kind of hitting off that and i might make this like a blue and let's create a uv sphere and i'm going to grab this and i'm going to unlock my camera to view and i'll just bring that way out and i'm going to put a new material on it i'm going to make it an emission material i'll turn it way up and i'll make it blue as well it's like blue planet blue sun kind of thing um we can also take this i wonder what happened if we shift a mesh uv sphere grab this out grab y let's bring this out so we get a shadow on our planet right the shade smooth and what if this is like a moon i hope you learned some really exciting stuff with this video i hope that you uh picked up some cool tricks you got a better idea of how uvs work even though they're pretty confusing and uh you're ready to make some cool rings you could push this effect a whole lot further than what i've done so be curious to see what you do so feel free to join the discord link is in the description below or it's in the about section on twitch jump in there and post up your images in the show and tell section and we'll have a look at what you've done we've got a great community over there so it's really worth joining don't forget to hit that like button and subscribe to the channel and uh leave a comment that helps people discover these videos and it really helps the channel grow i appreciate it check out the patreon and the gumroad and blender market all the links are in the description all the different ways you can support what i'm doing it's worth your time so check it out thanks so much i hope you enjoyed this tutorial having a good time and learned a few cool things don't forget to hit that like button and subscribe to the channel if you want to see more videos like this leave me a comment let me know what you think and let me know of any other video suggestions that you've got of tutorials you'd like to see i'm always happy to take those on board don't forget to check out the patreon and all the other cool things that we've got lots of extra content for you everywhere you look so i'll catch you in the next tutorial until then see you later bye [Music]
Info
Channel: CBaileyFilm
Views: 33,032
Rating: undefined out of 5
Keywords: blender, blender turorial, blender beginner tutorial, scifi, create a short film, create a fan film
Id: 4glvIjnmdZ8
Channel Id: undefined
Length: 26min 26sec (1586 seconds)
Published: Tue May 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.