Blender 3D Importing Terrain Data & How To Make Atmospheric Light Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so it's been about a month and a half of radio silence from me and i kind of apologize for that kind of don't because i mean i had to do um but i can understand if you guys are getting a bit if you want to hear but more of my knowledges on stuff um anyways enough joking around um i've been working on this scene for the past few days and there are some pretty interesting elements of this that i thought might be interesting uh to put in a video and i'm gonna cover them i think i'm gonna focus on two main things that is how did i make this terrain which is by the way it's all 3d and this lighting effect um the sort of scattering that you get from the lights um but yeah let's get into it so i'm going to start with the drain so i want to show you this is the project file let's get rid of this ugly ass cube for the fog here you can see this is all 3d it's not just a background texture that composites stuff in um it's actually got pretty much everything baked into the terrain height itself uh and then the texture just provides additional detail on top of that so um the question presents itself how did i do this and you might think i use some sort of world like terrain creation software like world creator or world machine um i don't know i'd be flattered if you think i was if you thought i was good enough to do this but no i don't think anybody is good enough to get this detail in one of those programs um but basically i'm using real data from the mars reconnaissance orbiter to create these terrains now how do i do that um that's the fun thing that's the first thing i'm going to show you so there's a site uh university of arizona has the high-rise camera on the mars reconnaissance orbiter i think that's right yeah um anyways you can go to like their about page and all that stuff um but they have um you can go to this this is the url but they have these things called depth terrain maps and they have like a 900 of them well 834 close enough um and all of these are really interesting um so let's let's find one uh not all of these are great in terms of detail um there are errors it it's mars so you can't really be sure what you're getting all the time um but a lot of these are pretty workable now i am going to let's see this is the one i believe in yeah this is the one i'm using in this you can see the similarities there um but yeah this is a shaded altimetry um okay image of it uh you can download this but i don't really see why you'd have any use for it but anyways so you'll see that there are these images right here and you might be tempted to go to this is the um this first one here is a height map you might be tempted to use this but this is not good do not use this it won't give you good results it's not high resolution enough um and it's only eight bits so you'll get a bunch of stepping errors so you're gonna have to use one of these this first one this first one right here is the depth terrain map and if you download it you'll see it's a img file and that unfortunately cannot be opened in your ordinary photo editor like you can try to open in like or photoshop and won't work that's cause it's not traditional photo format so how do you do how do you work with this and that's where you get to the importer that you can use so and this how to use section right here i just went up a step i'm going to open this new tab uh you can read all this if you want um but on one of these links um you can find the uh you can find the add-on i'm not sure if this is it no here ah come on i'm sorry this is already turning um i should wait no it's pre-built into the thing i believe they say it right here so anyways get a copy of blender 2.79 running on your computer it's not that hard to do they have links to older blender sesh or older blender versions go to file um or is it user preferences uh and add-ons and then just type in hirise and enable that if it doesn't just tell me in the comments i'll re-upload the video um keep pushing out false information right so then you go into file import import hiriz terrain data so i'm going to go to my downloads folder and just choose the one that you just downloaded and you can choose the terrain model resolution right here now i believe for this one i had up to like 75 but it takes a while to import so import it at like 10 first and then decide if you need more details so then click up here once you have it selected and let it run all right now on onto the coloring so go back to where um go back to the one that you're using and you'll see this um this red a1 underscore ortho whatever that is that's the red channel so you're only given one color channel uh for the full terrain there's an irb channel which is the like infrared that sort of thing which is three channels um but it's not for the full terrain so i don't use that it's pretty easy to recolorize these things especially because they give you a shade of relief although it's generally not necessary and by the way my things haven't been imported um thanks we're going to come back to this later i'm just going to uh file import i'm going to import this again at a higher resolution let's go 40 might take a little while um anyways so download um this third image uh this first one says red you aeo1 whatever that is um and let's uh i'm gonna go back to my downloads folder here so i already have that one somewhere in here yeah actually wait hold on let me just re-download it gotta go through the processes um you can't take shortcuts when you're doing tutorials they have good production quality rather ironic coming from me all right generally these things download pretty fast um but just give it a second so these are in the this.jp2 file um this is jpeg 2000 is like the jpegs uh younger younger sibling i can't assume is gender hey um but it's never used and nothing opens it well actually that's not true a lot of things opened it um if you try and open it in a um just your standard like photovirus might not work so we gotta take it into um actually blender does support this but you see i have these untitled things because i'm too lazy to name it and they're far less far less space hogging than these and they open up like seven times faster in blender so as opposed to like three minutes to load a texture it's like 15 seconds so i'm going to load it into uh i believe 2.10 and higher can uh can do this so i'm going to grab the file we just downloaded why is it saying zero bytes oh that's why oh and i'm in the wrong folder oh i just opened it ah that was the right one though i guess this is an older version i just re-downloaded it today but yeah you have to give it a while to open and now this is taking forever so um yeah it's fun so i might as well show you around these are like so um these are some previews and by the way there's um this site um arrowbrowser.com you can find and search for certain terrains that you want to check out and you can find them again because they're named the same thing in the highrise data set um now i believe we can actually find the exact same one in here if we look for second um yeah oh you might have to scroll down a little bit yep uh so these naturally do not have the highest quality because they're not using the full res you can change the quality here a bit there you go make it full screen for the full experience um don't need grid i don't need artificial objects this will help you see what you're getting that way you can see if like for instance if the color data has crazy amounts of shadow built into it this one doesn't it's relatively color neutral and you can see some there but it's not that bad um but yeah uh this is really neat and you can find a lot of um really cool data in here like there's slope monitoring this one's pretty neat uh and you can see like this is um all this is just pulled straight from mars and it's really interesting because you can explore these in 3d uh and you can see this is the irb channels right here and they sometimes have them for trains they sometimes don't and usually when they do they do not cover the entire terrain again super neat but like not very usable which is why um some of these are harder than others to recolorize this one might be a little bit harder because there's just simply so much variation in the types of materials that you can see like you can see lighter sand and then darker sand there and then there's like like van darks i mean that's pretty much mars lighter sand and darker sand and then a couple rocks scattered here and there but it's really easy to judge even if you haven't experienced recolorizing these things yet um what to do oh or like what what you can do uh to make it uh which ones will look better which one's one um also if the lighting is rather neutral it'll be a lot easier to recolorize them just word a warning still importing still opening actually no never mind this isn't i am stupid uh just trying to stall here well i completely failed but yeah just aerobrowser.com has some really neat stuff in it um see this one's pretty neat i like the formations here this is just going to turn into a 10 minute long escapade of sam um let's say i'm just uh salivating over monsters um because that's that's what we do here on this channel that is definitely what we do and it's quite rewarding yeah you can see um you can clearly see the errors here right um some like yeah as i said some of these aren't that great in terms of accuracy um specifically these sort of channel ones generally aren't that good um there were a few good channel ones i don't remember where they were i downloaded one like a year ago that was really neat um by the way i have this one also on my computer i've been making maps of this one um this is also a bit hard to recolorize because if you look up like mars terrain images you'll see how the train color actually is it's not just red there's desaturated bits all over the place um like this right i'm not sure what's going on there somebody screwed something um but yeah it's pretty neat sketchup has some stuff there all right is loaded i want you to fully take um fully appreciate the scale of this terrain image uh it is like what does it say 40k look individual rocks on the cliffs it is absolutely amazing um but yeah and this one in particular uh the like on some of the terrain maps the height maps they have a bunch of like banding and stuff because how these height maps are computed they're using stereo pairs um meaning there's two images that are taking taken basically sort of like right after each other from slightly different positions and using the parallax to compute the height info and it generally works pretty good but on i'd say maybe 30 percent of these there's a decent bit of banding and you'll even see some on some of the better ones but it's generally not super apparent especially if you keep the angle low um but yeah let's see if this has imported and it has yeah like if you look closer you can kind of see a little bit of it i think actually at this resolution not really i have um when i was using on the uh terrain in the image was a little bit less um or a little bit more detailed but yeah you can actually you can see it right there um but it's not really perceptible so file so save this and then we are going to open this in 2.9 actually more accurately we're going to append this into a 2.9 file i already have a high res version of this saved um this only has 11 000 tries i think mine is like 30 or 11 million um i think mine is like 30 or something um but yeah so open up blender 2.9 and then uh find the file you saved it as and we are going to uh append this into it so i believe it is this one object it will naturally create this as terrain so append this give it a second to work and by the way we want what we want to do is we want to file export as choose a name for it and set the file type to jpeg or png i'd recommend jpeg it these things have enough detail and enough natural variation that you don't really need the um extra sort of quality step you get by using png but do as you must i choose to save my heart rate storage space um export this however you will just change to jpeg um or just leave it as untitled which is as you know the proper way to address this but yeah i'm not going to do it because exporting this will take forever all right so we can see the scale is actually a bit off and the arrow browser and just high-rise in general uh gives you i believe actually um never mind this doesn't give you it gives you the scale per pixel um but air browser gives you the precise scale you can see it right there uh and this naturally imports it like factor five or ten times bigger than it is so just ask point one and set this to the center alrighty so all right the other blend file i've opened for the scene with the rover is taking up a ton of memory so that's fun it'll be slow for this tutorial and we're kind of gonna have to deal with it so the strain data looks absolutely astonishing in rendered view even without textures let's go into cycles not evie alrighty so give it a second to update the bvh let's actually well let's see exactly yeah all right like 25 million triangles yeah so give it a second to update the bbh alrighty boom let me change my view distances all right so we can see this is an exceptional clean piece of terrain um there's actually very little banding in here especially and you can easily see that in the um rendered view i mean there's some and you can see it but it's not super apparent especially and it'll be less apparent once you have texture on it um but yeah these things are awesome absolutely awesome i love messing around with these okay enough salivating over terrain let's actually add the texture um and the nice thing about this is if you import or if you appended it correctly by using the object tab and instead of the import or append mesh uh you actually i'm not sure i never use import or append mesh maybe you will um but you get the uh the uvs are automatically assigned here so that the uh high rise cameras which always um do weird stuff with the uh orientation of the image all right like you can see you could see that wasn't like fully uh it didn't take up the entire space of the screen right it was a little bit rotated and stuff this will naturally correct that so add the material now i'd recommend for the start to kill the principle and just directly preview the image because this has some lighting data baked into it already so open up the uh folder or not folder the image that you exported in and or from to the jpeg and uh let's go into rendered view now it's going to take a little bit of time but you will see how it looks so all right updating images now shouldn't take too long considering we just made it an ft jpeg it said jp2 awesome all right let's open this up so we can see how realistic this train is from many different levels of view and i'm going to close this because i don't want this open and it is stupid stupidly slow all righty so you can see actually i mean eventually this looks familiar this is the camera angle i chose to use when in the um in the other image right and you can see the this is where the rover was um there are the hills all this stuff looks so amazing from up close it's just incredible um now obviously there's there's limit right um but at lower camera angles uh you can kind of skirt by but yeah this is quite impressive um unfortunately you need a pretty good gpu i think that goes without saying uh with a decent amount of vram because these are 40k textures um but yeah pretty nifty stuff anyways um you might want to relate these um some of these work better than others with relaying this one happens to work pretty well so and the principled vsdf give it a second give it a second there we go uh turn specular down round this up and voila um also might be more contrasty when the world shader is set to black and you can see um since our you might want to shade smooth on the terrain data by the way instead of shading flat um but you can you'll be able to get up pretty close to the terrain and uh still have it look convincing even under different lighting conditions like look at that it's pretty neat as i said shading smooth is pretty good it'll prevent that sort of um blockiness but hell yeah man i love this sort of stuff i think it looks awesome okay so that's enough of the terrain i believe i promised i would show you how to do those lighting um sort of things these sort of volume metric lights and this will be more classically node based which i think people here generally appreciate so start out by making a cone um i think blender has yeah it does no we're going to use some cylinder though because come i forever disown it uh and also this will just naturally help out uh because we don't want the base to be a point we want it to be like an actual face so scale it down until it looks like a cone period 6 to set the origin to the 3d cursor and scale this up a decent bit actually you know let's just keep it like that we can scale it up if we need to oh and we want to point this down so rx180 there we go all right shading tab cycles gpu compute let's go into render view so we have a material and we want it to be a volumetric emission based material so stick animation into the volume shader and boom we're done nah this looks terrible i'm just kidding with you so what we need to do is we need to grab the x y and z position data relative to the object's orientation transformations so we take this object output feed it into a separate x y z and this will separate x y and z components z is black because this is below zero so math absolute and that's what we're going to be using here you can see that that gives us the uh aspects we need so we're going to do a combine xyz feed the x and y into this because we want to create sort of a conical structure here or not conical what am i saying cylindrical structure here with the um coordinates being independent of the z axis and we're going to do vector math length to get the length of the vector that is output from here and what we can see is if we plug this into the strength of the emission uh what happens is that we get this middle area is completely black and if we use a color ramp to invert it we can sort of see how we can control the radius here so now what we need to do is we need to make this conical so how we do that is to take a cylindrical object and turn a conical the same way that we would basically transform two parallel lines into a similar sort of thing so if we open up desmos and say let's say absolute value of x equals one all righty so this is sort of just a 2d representation imagine if this was revolved either around the um around the z-axis or in this case the y-axis so we need to do we need to transform this um we're just going to pay attention to the top half here we need to transform this into a cone or just a triangle so we can divide this by um the absolute value of y and boom and then we can basically add in this arbitrary variable a steepen or flatten it it's pretty neat so we're going to use this principle this is the y value here the c value and the graph that we would just use so what we need to do is we need to duplicate this math node and change it to divide and boom um theoretically should work of course it isn't uh there we go oh i'm silly okay so since this isn't perfect 90 degree angle we need to add in the scalar that we just put in desmos the a value so we're going to need to um add a multiply and this will be sort of the um the slope actually divided might be easier this will be the sort of slope for it right and we can see this tapers off around the edges um now what i like to do since this is incredibly linear and we can kind of see how flat it is or like flat the slope is um but the derivative or whatever you know flat the gradient is uh change it to ease and that will make it a little bit more spotlighty and then we can change this to be like the inner radius that sort of thing now the fun thing is if we um add a small bit to it we can change sort of the starting radius i like to keep this at like 0.01 i'd like to think that's like the size of the light but we are still missing something or we're missing a few things but the most important thing we're missing is that light tapers off after a time and it starts out a lot brighter than it ends and it sort of diffuses out right so we're going to divide this by this and add in a power node to basically hammer it in um and then just we're going to use this multiply to control these the length that we're going to fall off so um actually just set this to divide that will be it's a bit more intuitive this will be multipliers will control the general strength um and if we have the strength high enough and by the way i'm gonna set this down to like three something but we still see um actually let's keep this at two we still see it still intersecting and the way we do that is we just take um z value here divide it by two right because we want to renormalize it um actually you know what i'll do something easier duplicate the separate rgb and just xyz uh this generated the c value will automatically renormalize it and then we just multiply the entire thing by this that way it is and by the way we might want to use color ramp on there that way it will always ease into zero at the bottom and we can see that we now have no intersections no matter how crazy we go um but do be warned it might look unnatural if you go to whack with this right that's a pretty quick taper off so maybe 10 to 20 would be good also good to note literally scaling this up will increase the intensity do the property of how this works uh how mission works i mean now so i maybe do that instead of using this um although do use this if you need to uh if you have like some super small object if you're not using real world skills or something yeah alrighty um next thing we need to do is we need to add a little bit of variation in the air uh and how we're going to do that is we're going to use a geometry node and this gives us the bra position of our model that's independent of object transformation and that's really nice um because we can create basically a sort of universal um map of the noise in the air the noise and the air density right and that'll mean that we don't have to duplicate the material for each object or even just use a random thing and we can update the um noise automatically uh with the transformations so texture noise texture now to give some turbulence just duplicate it color into vector pretty neat and then change the scale of the first one if you want to change the scale of the noise so since the value of a noise texture generally averages to be around 0.5 multiply it by like 1.5 or something to get some values above 1 and use a power node to increase the contrast and then multiply the results using this multiply node multiply the result of these nodes by that noise and you will see sort of the worldliness now if you want to keep a base air pressure you can use an add node and add a certain value to it right i like to keep this around maybe 0.25 that way you can see both of the things and you can when we rotate this and move it around we can see the power of the geometry nut right super neat uh now if you have colored light sources you can color this however you need um and you will have to create instances of this material um actually just plunder doesn't have instancing material instancing so you always have to duplicate the material by the way block the uh bug the blender devs about that because unreal has the material instancing and it's super nice um blender needs it it would save us a whole lot of whole lot of annoyance so let's say we have a light source like so we have a light and an area light right what we can do is we can take this and use the constraints to copy the transformations of the target light right and that means move this rotate this however we want it ends up looking pretty neat anyways that is that that's a cool little trick um and you can see how it works well in some certain situations this is literally like a node for node copy of what i did there um and obviously there's some more of these i think there's like eight of those on the rover one for each light and there's also a little rover over there which has another one of those and yeah there's some pretty neat stuff there um i think i might explain how i did this i think it's relatively obvious just take a cloud vdb or anything that looks noisy and stick it behind the rover and mess with the density and that's basically it um i like to duplicate it a couple times duplicate the materials that sort of thing and just sort of make it so that it's a little bit denser closer to the wheels as you can see you get more detail there but kind of like diffuses out a bit um it shows motion pretty well i think i need to add motion blur to the tires i know it's kind of the main problem with this the motion blur and the tires but i like it um lack of um but i i like this sort of how it turned out some light salad dishes that sort of thing and i learned a lot in composition through this by the way i'd like to shout out a few people um anonymously but some people on various blender discord servers did help me out a lot with composition and i thank them for that and that's this is that's why this is my new youtube banner which is super fun anyways i recorded i want to give you a bit more info for those who care about certain series on this channel and why i've um seemingly forgot about him the answer is i have not um i have actually some recorded that i need to get around to publishing like uh the atmosphere series i have the next one but i've been hesitant because it's super math heavy and um the first half of the video is deriving equations of light transport functions using desmos and then the next part which is somehow even more confusing is implementing them into blender notes and well i think it's helpful i think that there's going to be a lot of confused people on the discord server in the comments section i am not sure if i'm prepared to deal with that i'm not sure if i'm prepared to let other people go through that sort of confusion um but i will still upload that sometime soon by the way i love it when people learn stuff but i should i should articulate this better because i just did a terrible job people often copy node setups node for node with my tutorials very few people are actually able to understand why i'm doing something and that's something that with these sorts of um node setups and this sort of complexity and for somebody who's not verbally gifted let's say it's nearly impossible i know some people who have done it like done it really well but there's an intuition that's built up over time and people [Music] generally sort of when they come to my tutorials i know like some of them the veterans are they just they come to my tutorials for a bit of inspiration to see how i did something and then they just leave because they don't need to see the nitty-gritty details because they needed that one level of abstraction but they got all the others and i love it when people do that because they always create something super unique and different than what i come up with um but i mean i'm not gonna blame anybody for just copying node setups but it's not the sort of thing i want you guys to do with these tutorials because you don't really learn a whole lot other than maybe a couple things about what certain nodes do and i mean any learning is good learning but you end up with a lot of like very homogeneous results right i've seen a bunch of people do the same black hole over and over again i don't blame them because i didn't show them how to do anything else but it's it's something that part of the reason why you make tutorials in blender is you want to see what people make with those tutorials you want to give the spark of inspiration there's definitely been some great results that i've seen i don't want to undermine those and even people who have just literally copied the node setup but just just changed values they've done some pretty creative stuff but the issue i'm getting at is i don't exactly think that if you're forced to copy your note the note setup that you're really getting the full experience of learning the strategy behind why those notes work you're given basically a mathematical formula and well you are literally given a mathematical formula to do something because that's what knows either math pure math literally pure math this is all math notes um and you're i mean you're using it i'm not like saying have any copyright on it or anything that's ridiculous but part of the interesting thing about these sorts of very complex math equations that are represented with nodes is that there's always something in it that can be used in some other scenario and part of what i've failed to do i think is just generally teach the abstract sort of concepts of what certain groups of notes do break down these equations very well now again i want to reiterate you aren't doing anything wrong by copying these node setups i don't want to imply that i'm saying i'm probably doing something wrong but you're also being misled that this is some sort of i i don't think that's really the whole way to learn if you can understand that so i think i'm gonna leave it at that i'm not sure if i fully really articulate what i wanted you guys to get from it but i hope that didn't come out too aggressive i don't mean to be aggressive look as i said before anything that you guys are doing with my tutorials and spending the effort and time on them i'm super happy about couldn't be happier i'm glad that i am making some um i'm glad that i'm making some genuine impacts on people's uh skill sets and blender what i just want to restate the issue here is that i'm worried that this is this is a me problem right i'm worried that i'm not fully connecting with the viewer about what the what the nodes are really doing right and it's generally just presented as this abstract formula which which does and that's not how i wanted to do it um so that's going to conclude the tutorial again i hope i hope that came across very pretty well something i've been meaning to talk about um but yeah that's about it guys hopefully you've found something interesting through this ridiculously chaotic mess of the tutorial and it's really been that usually there's some sort of structure today there hasn't been any i'm kind of getting back into the game sort of figuring out what's going to go right i'm so actually i want to give you a bit of insight into what's going to come next for the channel is that i've got some people that have offered to actually edit my videos and change and like increase the production quality quite a bit um just sort of snipping out parts that don't need to be there at um right like i say um for about 10 minutes each video is just um you could basically it's like those one in movies you hear the buddhist monks going that sort of you can just compile all those times i said um then you basically have a 10 hour soundtrack of that um set it again but expect actually don't expect because i'm not good with fulfilling expectations maybe be ready for an increase in video quality sometime soon the video quality is i mean i don't have a great mic i don't really have a great recording system but hopefully with some tweaks it can get better and i trust the people that i've offered to do this and i i thank them and i'll i'll link them in the description for each video that they edit so you can definitely check them out i'm not going to mention names right now in case they withdraw their agreements or actually it's not an agreement withdraw their offers uh so to the couple people who've done that thank you very much uh services are incredibly appreciated and uh yeah all right finally done forgot to mention the patreon whatever check the description for links to stuff you need help i got a discord server i've also got the comments i'll try to respond to the comments um i haven't been good about that i need to get better about that all right goodbye guys and i hope to be more active soon especially because christmas break's coming around hopefully you've learned something hopefully you make something really neat with this i really hope to see some really interesting stuff um i hope this high-rise terrain data proves useful to you i love it so much just so much detail so much quality um but yeah have a good one guys see ya
Info
Channel: Samuel Krug
Views: 1,007
Rating: undefined out of 5
Keywords:
Id: iCGvwZTddJ8
Channel Id: undefined
Length: 55min 24sec (3324 seconds)
Published: Sun Dec 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.