Unity Render Textures & Tessellation Shader - GameDev with Imphenzia

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay i have no idea if this is actually going to work because i pre-scheduled this stream in uh hey youtube and then i connected streamlabs i don't know let me know if you can see this all right can you guys see me uh confirm if audio is okay and if the video is okay and also if i actually ended up on the right stream cool great that's good good i was a bit concerned because uh in stream labs there's like go live and then i'd pre-schedule it for the first time in youtube so i thought okay i bet you're just gonna set up a new stream now apparently not so that's good oh it's scary i see my own face i don't like that let's get rid of it um okay all right i'm just gonna set up the chat so i can see everything properly here all right folks welcome it's thursday there we go there's the official start um so this is the fourth live stream now and let's put some weird music on some random stuff here so it's the fourth live stream and i've been thinking a little bit about what to do still and i've come to the conclusion that i'm gonna do probably some streaming and mixed like some premieres as well on thursdays and then i'm going to spend some more effort and do proper videos i think that'd be good for my channel as well and for everyone else to get a proper compiled tutorial it's fun now with blender 3.0 being released and everything so i'm looking forward to releasing some new content about that and also some like uh compacted uh united tutorials uh last week we did uh some some like a premiere where i showed a little bit of what i'd done online war and i understand that that's very difficult to follow but maybe it's cool to see like an insight on what's going on but overall um like i'm gonna try to keep the tutorials maybe to like 20 minutes 30 minutes compact and then maybe i'll do a long one of course as well so i'm going to check out uh all my chats so bear with me i'm just kind of set up for some reason i've lost my chat history here in obs so let's see if i can find that don't know why that's gone but i might i can move this one across all right so let's check it out so a unity though really yeah i know i'm going to switch i'm going to try godot at some point because funny enough i'll show you this actually i set this tweet out and because i started a new unity project yesterday i was going to test some stuff out because i'm working in an older version of unity i'm working in unity 2018 believe it or not that's actually end of support so that's what we're going to migrate line more from that at some point when they finally after like four years the three years decide to come out of like the deprecated netcode stuff so we're going to upgrade that but i've started the unity 2021 and i thought i'm going to make a tessellation shader because that's what i've been using in the game and then it turns out that the urp pipeline doesn't support tessellation shaders in shader labs or in the shader graph which i thought was ridiculous i know that was the case like a few years ago but i thought surely that can't be the case but surely it can be because it doesn't support tessellation shaders so okay i thought i'll check out the h drp so the high definition render pipeline so i started that one up and first of all for anyone who's starting development if you pick uh the hdrp pipeline when you start unity you're probably going to scare yourself out of the product faster than any human possibly have in the past because uh it's really done for a lot of customization and like squeezing optimum performance out but at the cost of like developers especially new ones having absolutely no clue what to do in there and even though i've been using unity for like 10 years i i really don't like the workflow of that one so someone proved me wrong but then i thought as well i'm going to show you here because check this out on my screen uh i sent a tweet out with a screenshot and believe it or not i started a blank hdrp project in unity 2021.2 and after it took about three minutes to just start and you can't like deselect any any assets or anything it'll just start you on a clean prod product project 32 357 files in 1624 folders and one gigabyte in size and that's just to get started with a new unity project so i have i i went on a bit of a rant with this tweet here actually and it actually got gained a bit of attraction as well on uh when i was looking at the comments because the uh it's absolutely ridiculous i think they've since they want to become a public trading company they have to probably boost their like appeal to uh to attract investors and stuff so they're like spreading across uh trying to like squeeze more performance out of the product and add more services but i i strongly think it's at the cost of the flexibility that made the unity's like successful to begin with so i think uh they switched into this package manager and it's all this bloat stuff that comes with it so all those 32 000 files that's just to have a blank project and then you have to delete the example assets and even if you delete the example assets you still have 31 000 files so it's not that much of a difference so unfortunately slipping away there and that's why i'm going to try godot because people are saying there that it's so much more lightweight and i can totally understand that it is so i'm looking forward to testing that and i'm actually going to record that i know arvid's been i've been saying that to arvid for a long time that i was going to do it all right let's check this out didn't i transition no there i did uh let's have a look why can't i get my chat like it doesn't look the way i'm used to there we go let's check out the yeah jules the unity is getting pretty bloated again it's totally true and c sharp i like uh oh right okay they do they have their own language or something don't they use c-sharp that's going to be a problem for me so for a blank project yeah whoa that's whoa so i've been a while since i tried unity but i'm loving ue 4. i'm actually going to try but i believe unreal engine is i had a lot of comments saying that that one's pretty much very bloated as well so i don't know what your experience have been see jim my friend there as well my 60 meg hard drive yeah those were the days everything was in dos that was cool all right so if you saw the teaser this week we're going to do some stuff that i've been working on on the game as well i've i use render textures a lot and basically instead of having a camera rendering to your screen you can have the camera rendering to a render texture and uh you can use that texture then in your shaders and for materials and i've used it in line work for stuff like um a deforestation when you uh either like when you construct a building you want to erase some trees so i've used like a render texture that renders uh just like little footprints of white blobs and i'll suppress the trees with a shader same thing goes for some of the like water rippling effects or when i offset some of the mountains and stuff when you build things you want to flatten some terrain i've used that quite a bit and it's a really handy way to do it and it's quite performant as well and combined with a tessellation shader and tessellation shader just takes a few vertices and just makes loads of them and like creates like a web but everything is done by the graphics card so it's really fast so i thought i was gonna do a little uh setup of that one and play around with it so um and what else have i been doing done a little bit of this as well i tried one of my characters i've had some questions if they run in mixamo so set this one up for a test see if i can get my hang on this one so i've imported this little guy um seems to be running pretty good in mixamo i thought the thriller animation was pretty good so i could also set the tutorial to bring like the low poly characters that we've been modeling a lot last year and the year before it's quite easy to get them both into unity now with the correct rotation and there's a few things to get them into mixamo like uh the shader in the blender for example you have to get rid of fancy stuff like normal maps and stuff just have a there are a palette texture plugged into the base color that's all you need and you can't really have anything else and then you zip up your fbx file combined with the texture file that you have in your material and then you submit it to miximo and then they rig pretty much straight off you can't have the same fbx export settings that you do when you do it in um for unity you have to change the different uh like z axis and stuff but it's pretty much default settings when you export it to be used for miximo all right let's go get back to it just a few more comments then before i start the new unity project here all right yeah yeah they look uh i like to just playing around with the mixomo animations i was surprised that the feed planting and everything worked pretty good uh i usually model like bigger heads on the low poly characters so some of the animations especially that revolve like uh where you do flips and stuff could need some work but all right let's uh go back to the mainstream window here and we're going to get started now here we go so when i start unity 2021 apparently one now didn't i use dot two let's do two instead there we go uh you get to pick whether you should do like the the traditional standard pipeline or 2d or the urp pipeline or if you want to go high definition around the pipeline down here and all sorts of things and for new projects i'd okay here's going to be a tricky one trick i want to recommend because urp universal render pipeline is designed for ease of use lightweight games customizability like creating up-to-date modern graphics for games that's going to be easy to use so that's what the universal render pipeline does h a high definition render pipeline that sets up a new like customizable render pipeline but it works very very different in terms of exposure for the camera it's very least easy to overexpose things all the settings are quite tricky to get a hang of when it comes to lighting um lighting probes and everything like that so i'd say that if you're gonna make a game like a first person shoot or an adventure game and you have a team of more people that are skilled and you really want to squeeze performance out go for hdrp otherwise i'd normally recommend uh urp which is there sorry universal render pipeline i was pointing at the 2d one here so because and the reason why these these are the two new render pipelines that unity have uh like released from a couple of years ago and this one was also called used to be called the light weight render pipeline i think but they've changed it to udrp and one of the main reasons for using this one would be to use the built-in shader node editor which is uh called shader graph and over like i used to program my own shaders using the shader language and that's super difficult i'd say because like you have to program them first of all it's a different language and then you have to code them so because the gpu will process everything in parallel so it's not like a normal program where you go like hello world and then like a for loop of that you have to think that everything that comes in is distributed like across all the pixels at once so it's quite difficult to get your head wrapped around it so that's one of the reasons that uh finally when that came to unity with the urp and the hdrp i thought that's going to be great i can finally like use their built-in shader editor now but it sucks so that's the bad side i've given it so many tries and i actually realized why i haven't started to create a lot of you tutorials on it because every time like during the past year when i've come into unity and i thought i'm going to create a tutorial now so let's bring up shader i even say shady labs all the time but shaded graph and then i run into problems because okay so this one's not supported that feature and i google it and i think surely it must be supported and nope it's not implemented or it requires hdrp or it's in preview or it comes with additional customization so that really really is terrible so my recommendation if you want to like start using unity and if you wanna like get right into game development if you wanna be able to use shaders and use a shader graph i wouldn't even actually use shader graph anymore i'd go with the 3d pipeline which is the built-in one because that's still the one that actually has more features than the urp because when you do a feature comparison left and right uh the standard definition pip or the standard pipeline actually still has more support and customization when it comes to like i want to trigger my my own render of a texture render texture for example doesn't work in urp so for this project i'm actually going to boot it up in under texture 3 3d in the good old one still takes forever to launch them let's while that's starting i'm just going to check the chat here a really basic shaded tutorial would be great i'm actually going to do a very basic shader in this one and everything's going great thanks welcome for coming in um let's see we've got a few people joining here what's going on yes a unity project we're booting up i'm gonna do don't know if anyone saw the trailer but i've got a i'm gonna do a few test things today so i'm gonna close this one matt says it's a shame blender and unity can't share the same shader tech yeah that would be nice with the geometry nodes and everything i sort of understand maybe that i don't since it's like a maybe for eevee it would have been closer since it's like a graphics engine but it would have been nice with some more compatibility i usually use very basic shader for my blender stuff so that's only like a maybe an emission texture and a base color texture or albedo texture and a normal map and then all my other shader works is usually custom stuff i have to always achieve different things like in the game and a lot of it is shader and either you effect like the colorization with a fragment shader or a surface shader and you use vertex shader so i'm going to show a little bit of that so today it's no blender modeling today is uh unity for a change i've been doing so many blender videos that i'm going to install blender 3.0 very soon i haven't even installed that one yet and how i get my it's still loading the project by the way i'm not uh forgetting there it's still loading up my unity project insane why is it so slow check this out loading initial domain with user assemblies i'm using a program called fences for my desktop if anyone's wondering why it looks like that and that's how i can group the icons together in windows pretty useful but i think you have to pay like 20 or something all right okay so let's get started um i've just started a new one and unfortunately i've got to do one thing which i really wouldn't actually like to do i really wanted to use the the built-in shader since or shader editor shader graph because it comes included in unity and i rarely actually even though i'm an asset publisher myself i try to go everything native in unity as possible if it's like editor stuff for content wise you know the assets are good but often if there's a built-in feature i'd like to use it for the editor-wise whether it's like text or sprite packing or anything like that but saying that i'm actually not going to use shader graph and a while back maybe three or four years ago i bought an asset called uh amplify and that's actually moved now into the package editor so they went away from the asset store a lot and they went into the package editor and in the package editor you can actually access assets that you have my assets and am i even shown this yeah so i have this amplify shader editor here so i'm going to import this one and it's actually on discount now i'm not promoting this i'm not paid to say anything like that i think it's half price maybe 30 or something but any day of the week any day of the year even any day outside the year i'd recommend this one because i think it's actually super super good to compare if you compare them side by side with the with shader graph it's just so much easier to use all the features are there it just works so apologies if i'm actually starting this video with a um with an asset but saying this you could if you want to you can try to replicate this workflow in shader graph and if you tell me uh afterwards as well if it was easy or not you're a better person than me because i just does do not like the shaded graph in the same way i like this one but saying this the you could actually even write the shader itself like i said i used to write them but i so with the shaded graph now everything's so much faster to create things like that so all right so i've just got a blank scene here now and this is what i like about the original 3d project as well you don't come into all the bloat that the urp and the hdrp projects have they usually have loads of example assets they've got light probes set up they've got like reflection probes and i don't know you name it they've got it so i like coming into this empty look uh and the first thing i'm going to do i'm going to create just a 3d object and i'm going to create a plane here in the center and let's make it like five by five maybe or even if maybe we'll stick it yeah five by five in size here we go so i actually did the something similar to this just beforehand so to test it out that it worked and that's why i got the stuff for the trailer so let's call this one snow that's just going to be our snow surface here simple uh plane doing nothing else at the moment and then i'm gonna create uh a camera so i'm gonna right click here and do create empty and i'm gonna call this camera and then let's add the camera component i could have actually added the cameras and i added a secondary camera here and i'm going to rotate this one so it points downwards and i'm going to switch from perspective to orthographic it's very important to get the camera facing down and it's not rendering with any perspective then because i'm going to create a particle system now like i showed in the trailer where it's actually recording that with this camera and then translating that into a texture so we can deform this mesh here instead and i have to change the size of this camera if i do it to 10 i have to get the size okay let's make this one smaller again then let's see two two maybe two and two should really clip this one so the camera size needs to match the render texture there or the text the the plain mesh and we can come back to that problem in tweak a little bit uh and then i'm going to create a particle system here so i'll right click create another empty call it part typical system and we'll add a particle system here and that just sends some particles across so i'm not using the visual shader graph this is the default good old particle system here and for the shape i'm going to change it from a cone here and let's set it to like a circle then we can either we could rotate this whole object or i can change the rotation here to 90 degrees and i will change the size to like 0.1 so it emits it right from the center there and then i'm going to change the shapes here as well i'm going to go with the render we can just switch this material to like a default particle i'm actually using a bigger screen so they disappear a little bit so the part default particle and there's our just uh like little particle flowing here and uh let's create here in the assets as well right click create a folder called demo i'll try to keep everything in this demo folder here keep it nice and tidy so let's see what should we start first we'll i'll create um a render texture we'll need that's the whole key thing behind this one so i'll right click and then if i can find it somewhere render texture so here i can set the dimension we'll uh keep it at 256 by 256. i think i'll keep all everything here by the default for now and this is uh like normally you'd import the texture into unity and by dragging any like image file into unity you would be able to use as a texture in a material the benefit with a render texture here we'll just name it around the texture is that you can have like i said either a camera or a different uh stuff working onto this texture and changing it on the fly which is going to be really performant so for this camera now i can change um some things first we i need to change the calling mask here unity works with a lot of layers so if i have the like by default everything is created using this default layer uh but if i click on this layer up to the right when i've got the particle system added i can add a new layer and i'll put this one at the bottom here so i'll just call this one snow or something and i'll come back here and that was just to create it now i have to pick it and nothing will happen to begin with because all i've done now is say that my particles are supposed to be rendered on the snow layer now and the layers are good for two things one is that you can actually pick which layers a camera renders so if you want to hide the objects you can stick them onto a layer and then just not render them with that camera another thing layers are good for is for collisions so if you have like two objects that should or shouldn't collide with each other you can stick them on different layers and it's a super fast way for unity to separate the physics and not collide things because you'll gain a lot of performance by splitting those into separate layers so maybe all the small debris you don't want that colliding with the world then you stick that on a separate layer but we're going to use it for the culling mask and if i look at the main camera here i can go you can see that a culling mask here is set to everything so i'm going to take away snow now and it still shows in the editor now but in the game view it should disappear or it will disappear in a second at least it's still showing because actually showing this camera so this one is set calling masks to not show the snow and this camera i'm going to change so it only shows the snow so i'll set it to nothing first and then pick snow so the only thing this camera now is going to render the particles that this particle system is generating on this layer here let's see i hope i actually ended up thinking that it was uh i think it is trying to remember if i if it's actually allocating the layer here but i think it is just on the parent there okay so now one more thing i need to change here as well so for this camera i need to select a target a render texture so let's see we should find it here somewhere target render texture and if i click on this little thing i can pick the one that i created i could have dragged it as well and the only thing this camera will render now is uh is that render texture oil render those particles to the render texture so if i press play now i'll have my main camera view this is where i'm showing and nothing's really happening yet so we're going to take the next step here now we need to start to create some materials as well so i'm going to right click and create a new amplify shader and it's going to be a surface shader and let's call this one snow and bring that in here so this is the shader editor that is the third party asset compared to the shady graph what i really like about it is that everything about the shader is accessible to the left here it's really abstracted and hidden away i'd say in shader graph here you have got access to everything that you need and it's a bit similar to the way it looks in blender i'd say so you have like this would be the base color you have the emission and it's again that's a little bit similar to the way it is in um in the shader editor i keep saying it wrong uh in the shader graph but this one has got all the features and stuff like tessellation and things like that doesn't even exist in that one so that's what i like about this one so we're going to uh add a texture and to add things here i'm going to press space and i'm just going to add image effect oh yeah no i'm not actually going to add a texture see texture sample and i want to change this one it's already a property so we're going to call this one render texture and i'm going to drag this one so it just shows on the albedo here and just switch on automatic saving for now and we'll have to create a material i'll just move out of view right click create material i'll call this one snow and then i'll change the shader here or i have to rename the shader it's already renamed so snow there and when i select this one now this one is not mapped by default so now i can drag my render texture into that slot and then if we press play we'll see if we start to get some now we can actually see that it's got at least some things here on on this one if i click on the render texture i can see that it's rendered a few things and we don't really want the gray background here so i have to change this one so on the camera i can disable the skybox we'll switch this one to a solid color and then just set that onto black and if i press play again and now we need to assign this material to this one this mesh or the plane that we had before so you can just drag this one onto the plane there press play and there we go we can look here so now actually in the editor i see both the actual real particle system and i see uh the texture that's been updated in the game view you don't see the particle system because uh the main camera isn't rendering the particles it's only rendering this texture now and what we should probably do is get the camera up so we can see this a little bit from an angle so bring the camera up hard to rotate uh e to rotate so weird in unity i have to change my my uh stuff my uh my clothing line or my merch there we go maybe i'll do this actually i'll split this so we can see them at the same time just drag this window to there and let's swap them i want to have the game window on the left and this one on the right let's play and there we go so in the editor we see both the actual particle system and we see the this surface itself and in the game view now we only see this one so step one is pretty good now we need to change we want to actually start to distort this one and to do that i can go into this shader editor again the only thing we're using now is this render texture is sending everything out to the albedo channel so it's just rendering what it can see right now but what we could do is we can offset the the local vertex here and send it down so like based on the color it'll send it downwards so let's have a look and instead of rendering the color i think i'm only i'm gonna set this one to a white color so i'll press space add color change this one to white like a snow texture and we're just going to have the snow and i'm going to use the render texture now instead of showing the particles i'm going to distort them and we can pick any channel because it's a black and white texture so any of these rg and b channels are going to be the same color now and the easiest way to do it is that we could just plug this into the vertex offset so i press space and i need to append there's a feature called here and then i can pick any channel doesn't matter i'll pick the red one and i'll put into y and then we can also change this one from a vector 4 to vector 3. so now vector x will be 0 vector z will be zero so in the width and the depth plane it'll be the same but we're sending the render texture into the y offset there and if i drag this one now into the vertex offset we'll say this one and try it out it'll probably look a bit broken now because we haven't enabled tessellation yet now when we look here that we can see that something funky is happening and that's because if we switch this one to uh why can i not see oh they've actually changed the naming in this version of unity i wanted to show with the let's see shaded wireframe i wanted to see okay where they put that then there we go okay so it's apparently this one now instead shaded wireframe apparently i didn't use this version when i did the testing so we can see that this doesn't have that much geometry to begin with and this is where the tessellation comes in really handy because it's just popping up and down now those vertex vertices so in this shader editor now i can scroll down on the left and just enable tessellation and that instantly added some geometry to it and we can see it's still not looking that great but it's added a few like geometry we can increase this one by going to edge length let's just do fixed and then change this one change it even more we can add quite a lot of detail here and since the graphic i mean if if you were to do this like a procedural mesh and then have unity affect all these vertices it would not be good at all it'd be super super slow but with tessellation enabled in the graphics card it just does this uh at a very low cost i've actually ran our whole game world our whole map in the world with multiple layers using tessellation so it's actually quite performant and you can add a lot of geometry and suddenly those little weird spikes and still look weird because they're small and stuff but we can start to change these a little bit maybe we can change the particle size a bit so start size change them to bigger particles and they're going in the wrong direction though because we wanted them to go down really and we have another problem here and it's not adding any shading here so we have to come to that in a second because even though the the meshes actually move in the vertices but it's not really knowing how to shade this unfortunately yet that's not built in so we have to compensate for that a little bit which we'll come to so in the game view it looks very strange uh we could maybe change this one to uh this color here i'm going to change this one to a property instead main color so now we can control the color here make it a little bit darker now you can sort of see that there's a slight shading but that's just the real time shadow that's kicking in and normally if you were to do this like in blender and import something that looked a bit like this then the light would come here and the normals would be calculated remember when i tried to explain what a normal was but it's like this thing that's perpendicular to the surface so normally like if you'd bump up a surface like this the normal would be pointing to the side but the problem is that we're just raising the vertex height so the normal is still pointing up so in terms of lighting it thinks that everything is still flat so that's uh that sucks a bit you can uh get away with it with some cheating and then we can do it a little bit better in the second run so but first the first thing i want to do is make these go down instead so i can just press space in the shader editor here and do any g negates and then i'll drag this one to there and and now we're actually inversing it so instead of going from zero to one it goes from zero to negative one so now we'll have that those are going down here instead as dips with those um ones so far so good so the cheating way to do it would be to actually uh just make it a little bit darker in the dips so if you were to make like a snow surface maybe you'd get away with it the cheapest way possible and that's just to offset the color make a little bit darker when it goes down so it wouldn't be the proper lighting but let's start with that one at least so i'm going to press you can select one of these as well try to fit this on the same screen it's terrible i'm using a suit like an ultra wide screen i have to work in a little window that captures by the streamer i'm going to copy this one ctrl play v to paste it change this one to black so now i want to go from a light color here let's go nearly to white again i want to go from this one to this one based on the how far down i've offseted them and in i often use the thing called the lerp and that's a linear interpolation and the it it goes from one one value so i want to go from white to black color and then whatever i plug into the alpha here will determine how much it should fade so if i just straight plug in this one which is going to be the uh the same channel that we used to offset this one and then plug this one into the albedo it'll lurp from the white color to the black color and then it'll do it based on this value so now when we look we can see that the dips here are going darker and again it wouldn't really look that realistic but if you if you have like a nice snow texture and all you want to do is make some footprints this would probably be the cheapest way to do it that it it just offsets these ones a little bit and we could also let's see that one's absolutely yeah everything's good so let's check i'm just going to check the comments meanwhile the way tessellates looks weird doesn't it yeah i think it works in some real weird algorithm that just connects them all together all right see all right cool it looks like you're having a good time to chat to yourself there that's good i'm noticing very different from my from the blender one on this one i have to focus a lot more on what i'm actually doing in blender it's easy to just like go with the flow and model some stuff uh here you have to think okay am i doing the right thing now am i connecting the right thing does this make sense so hopefully you can get something out of it or if you're watching this retractively as well okay what should we do next maybe we should do the proper way to do it um maybe you want to affect how much this effect is taking place how much we're offsetting i can introduce a new variable i press space and do when i want to have a float variable here float and then call its mesh strength maybe and then with this one i have to switch from type here i want to do it to properties so we can access it in the material editor and i'm going to multiply this value so i plug the mesh strength here and the red channel into b and then i do the negates here and we can change this one so maybe you can go from zero to ten or something default value is one and that introduces the slider so now i can drag the slider and just affect how much it's deforming these and again this is taking the particles rendering them with the camera and then putting that onto this render texture that we've created and then the material here is using that render texture to just uh change this offset down and slightly like colorize this and like if you wanted to do lava shaders and stuff you could do the same let's expose this color as well we've got main color there this one's going to be called a dark color maybe and you could also change this one to the emission just testing some different things and then you could go from like orange to like red or something so you could theoretically create different lava flows and stuff like that that's animated and again everything is accessible through the particle system so anything you make i'm still in edit mode or in my plane i'm actually playing this stop it this should really work in the editor i think without playing as well so i made some changes there so when i've got the particle i can press play here it should really work in the editor too yeah and i changed some sizes here so let's change this again start size maybe two and let's randomize the speed a little bit and between three and five and lifetime maybe 20 seconds one to two and we can increase the counter as well let's go for a maximum of 10 000 particles and change the emission rate here to like a hundred percent 100 per second and they're coming in and we can fade them as well maybe so in the particle system i'll do color over lifetime and this is the unity particle system so we'll go from black to white and back to black so now it fades the particles in and then it fades them it's a bit messy and now maybe i should switch this to shader just again we can see that it's i don't need to press play okay let's just highlight the particle system and press play so you can see now it's rendering a lot of park particles and it's taking those and using those colors now to just distort this one and you could uh i guess you could just duplicate this particle system and offset it a little bit and you can have two doing the same thing you can combine them and i don't know what the frame rate is now they've apparently changed that overlay as well used to be a drop down here see game view stats and okay it's disabled it so new stuff in unity let's checked out but it's running super fast anyway so that's good okay i think one of the difficult things now is to get that thing correct with the shading and that really has to work if you want to use it properly so let's go back to the snow shader that doesn't look like snow anymore change it to white and then maybe black here so let's go i should actually change maybe we'll introduce a slider here as well for that one so that's the mesh strength and we can copy this one ctrl c ctrl v for this float property call this one color right color strength copy this one grab this value multiply the color strength by the red value from the render texture plug that into here and now we'll when this one's compiled we we can change the amount here as well on the color strength and this one only needs to go it doesn't need to go from zero to ten it can go from zero to one and there we go so now you can control the strength of that effect that it goes darker the further down it goes okay so now we need to do the tricky thing and that's to get uh without the colorization effect now this should really be looking correct as well and i had to spend some time thinking about how to do this because we you can't really calculate the normals on the fly and i saw on on when i googled it which i do a lot by the way uh i don't really know all of these things in my head i'd like to but i have to google a lot of stuff all the time when i do the game development half my time is just googling snippets and like seeing how other smart people have solved things math is not my strong thing but i remember solving as like this issue for the game for line war for our offsetting the world i had to recalculate all the normals normals after i'd distorted them because all of those meshes are procedural not in the graphics card but they're procedurally generated so i needed to calculate all the surfaces and there is a way to do it and that's by looking at this render texture i'm going to try to zoom in on this if i can and i'm going to explain this in a terrible way now in a very very bad way because the shader that we're doing now it's looking at any given point of this render texture and it gets a gray value there and all it gets is that gray value to say it's either black white or somewhere in between and then it's very easy to get that value and then just offset the vertex position on the y position downwards and so that's the easy part and then we need to get this local vertex normal recalculated and you cannot do that from one value if you just look at that one particular point on a surface if you had nothing else except that point it's impossible to calculate in which way the norm is you have to have like at least three but i usually use four points on the plane to calculate in the in the area to see like what is the tilt of it so if i have like my phone here for example if there was just an atom here it wouldn't know exactly where which is up and down but if i have four points and i can like calculate where they are then i can calculate what direction it is here and it's an approximation but i the way i used it i think it's pretty like it works pretty good but uh and there's probably better ways to do it i saw that there was a shady code from someone named ron ronya ronyo and uh she'd shown it with the normal mapping enabled it took like a mesh and warped it according to sinus wave uh but the way she did it she or he or she i guess you actually could predict from the equation what the angle would be which we can't so i had to come up with a like my own little custom way to do it and we haven't the nice thing we haven't written any code yet so we've got this nice like texture thing but we don't have any code yet so i'm going to convert this render textures because i need to sample them in four different points now and then calculate what the angle is for this local vertex normal so i'm going to copy this render texture and paste it here and instead of having a duplicate of it i'm going to change this one to uh from object to reference because then i can reference the same render texture so there we go uh there's no performance different now it's just the underlaying code will it'll allow me to drag some nodes into this one now whereas i um you know encode it's the same actual object here and for this one i need to look at the uv coordinates of this texture and i need to look at it a little bit to the left a little bit to the right a little bit up and a little down on the texture because then i can calculate what the value is on what the slopes are in the two directions and then i can calculate uh which way the normal is facing from that one so i need to offset the uv coordinates a little bit i'll press space and do texture coordinates here and then i'll drag this one into here and if i type in a value here now i can just do offset here on the x-axis so if i do 0.1 it'll be a little bit more apparent it shifts the whole texture now to uh to the left so but i can't really do it that big of a step so i'm going to do 0.01 so now i've got uh with the offset now the same shader code like the gpu goes in and it gets oh i want the height for this pixel and now now i want to look at the angle and this one since i'm offsetting the texture a little bit to the side i'm actually getting the value that's right next to it so i can do that one and then we'll just do i have to combine this into a vector three again and this is going to become the y value so again it doesn't matter if i take the red green or blue i'll plug this into y and that's one of my pixels now so i need to do the same thing now for the offsets that i've done so and maybe i'll actually do so we can multiply this with normal strength here so i'll do i'll do another float space i pressed another variable called normal strength we'll expose it as a property and then set from 0 to 1 where the default value default value is 0.5 and then before this one i want to imp i'll press space and do multiply and then i'll grab this color here and then grab it with a multiplication and then send that one in and now i can just drag that slider we won't see any visual effect if i do anything now because this is not going anywhere so i need to finish this little thought process and connect and spaghetti machine here to get this to work so now i'm going to copy this so i'm going to copy and let's see i'm going to need four of these ctrl v ctrl v and if i offseted this one a little bit i'm gonna do the opposite i'm gonna do negative x point zero zero one or zero point zero one and then here i'm gonna go uh 0.01 on the y-axis instead and negative 0.01 so now i've got the same thing now it's going in for this pixel location it's getting a little bit to the left a little bit to the right a little bit up and a little bit down and now i'm going to combine these into where i'm going to okay let's see subtract so from the left and right or east and west angle i'm going to take this one and subtract this one and then i'll do the same here for the up and down i'm going to grab those to there and then if anyone's uh really good at math here lucky for you good for you this might be super easy for you it's not super easy for me i only know that like with vector calculations so a vector a vector three in this case we're not using the fourth component so theoretically we could change these two not just theoretically we could do it practically too these are all vector threes really so it's an x y and a z component and if you paid more attention in school than i did then you know a little bit more about cross and dot products of vectors because uh you can actually look at there's like this rule with a with a like different angles of a vector and you can calculate like what the from two vectors you can calculate the normal of that one uh my s my approach is very different i i just go okay maybe this is the dot product or is it a cross product i don't know but for this case i figured out that it's the cross product so i drag the left and right here so the x offseted one to the y offset that one and then i'm just gonna try to plug this into the vertex offset and we'll see what happens first of all and it goes pitch black so i've missed something there it's a little caveat here i hate that word i don't know why it's called caveat it sounds like caviar but i'm gonna go and it's because it's go going into like um uh when these values are zero the x and z axis here on all of these it's get i think it's getting into like a gimbal lock type of situation where it doesn't like it's like division by zero practically uh so i have to do a little slight uh just a little nudge so it knows in what which plane it's operating and this is going to be in the x opera so i'm going to do just the same here i'll type in just so it's not zero and then we'll do the same here but instead of that we're grabbing the x and y here from the texture coordinate and now we're converting it into 3d space so here i need to go negative or 0.01 and then negative 0.01 because now we're using the z axis because we've flipped our plane down x y is up and down in unity if anyone remembers and x and z is the depth or the width and the depth hopefully that would have fixed a little bit of the problem and we haven't fixed it yet so let's figure out maybe it's the normal strength it's not too low nope okay i'm going to change the color as well of this one so it's not full white okay i've done some error in here i'd expect this one to look the same as this one reference okay these need to be references to reference reference okay i'll normalize these two normalizes bringing it to normal maybe it's too flat the angle so normalize takes any vector and gets it so the vector length is one so normalize okay still some issue here it's sort of working but it's not i'll have to increase the ability to multiply that one a bit stronger maybe so we're getting some shading here maybe we can throw up like a ball in here 3d object sphere try to see if that light angle is correct okay we have a light effect but it's not it's very soft have i got fog enabled i don't think so see general nope rendering lighting no sometimes i get tricked by the fog effect maybe i got these mixed up so this is my usual troubleshooting process did i get them mixed up okay i'm missing something strange oh right okay i'm multiplying these by zero maybe you've actually commented that in the chat they all need to be multiplied by the about in the chat i should really it's difficult to keep track of the chat and this stuff at the same time still doesn't look right though so it's sort of on the right path but i don't know why it's not shading it as strongly as it did before but try it combine it with the color strings as well i mean the shading is there i just expected it to be a little bit stronger ah aha okay it's still plugged into emission so it's lighting itself up it's lighting itself up on fire no wonder there we go so i was uh a bit me uh it was sending the it was still in emission so it's lighting itself up okay stuff like that happens let's go back into whiter okay let's press play there we go so we can control the normal strength now here and here we have an issue too i think yeah but let's see that's looking right i put this sphere here to verify that the light is actually hitting in the right angle because i usually get that cross vector mixed up so the light is coming from here and i can compare it now with the built-in like the accurate stuff and see that the shaded area is actually coming on the right thing so that's good string and here you can get a slight effect now even without like if i reduce these both to zero and let's see oh yeah color strength as well so here's the flat thing nothing's going on then i can control either the mesh strength which is just doing like the up and down and this is the real time shadow note that's added or i can just do the normal strength so this is not distorting the texture it's just doing the light is reacting as if it was bombino so that's one way to do it control it and then we have the color strength to colorize the dips now and those these uh parameters now in together we have quite a lot to do like so we can control this and some of the usage areas that i'd say is um like i do it a lot for the imprinting like in terrain if i want to tire like a tire tracks for example or something if i disable this one um let's just press ctrl d on this one and instead of having emission here rate over time i'm going to go to um rate over distance and if i press this two for every or if i do one for every one unit that i move now it'll spawn one particle but we've got movement on them so that makes no sense i'll change the start speed here to constant zero so now when i move and we've got some more stuff here this is uh see it's not actually doing it in the right location and that's because the texture is rendered i think it's like just 180 degrees flipped from how it's reading and putting the render texture so we could rotate the camera 180 degrees that will hopefully get it to the right location because you want really the tight track or the footprint to be in the same place as they are actually happening and so this one's spawning oh yeah it's moving with that now because i need to change the space here from local simulation space to world so now every one unit that i go it'll like imprint one particle and if i do it over here we can see that it's over here and the reason why they're sinking down slowly like this it's because i had this cholera over lifetime so for this particle system i can just do let's get rid of that one and go from straight from white and now when i do it it'll just snap it down as if i put my foot down but maybe you'd want maybe actually a little let's see a slight indentation over time there so it just presses a little bit and this could be like if you're walking through snow and usually you probably wanted to raise a little bit at the end here and i won't cover that in this video but i'm just using the default particle now which is a shaded and i'm using that in like an alpha like the way it's just writing that into the world but you could design your own little texture instead that has like raised things at the edges so like it goes white at the edges and then like slopes on the side and then you could have that move and then you'd get a slight like raise up and then a slight in like a well a deeper indentation so that would really look pretty good i think uh as if it was a proper like footprints that are actually pushing some snow up around it because you wouldn't just get indentation you'd probably get some stuff that and if i duplicate this one you could have two next to each other here if i was moving through the snow you wouldn't jump like this but you get the points and what else oh yeah so the indentation will only live now as far as the particle lives so if we do a particle life here of one second just it'll fade away really fast and sometimes you probably want like snow to regenerate so and since it's quite performant and as long as you don't spam too many footsteps you could have like 100 seconds or something um so then they'd last for a lot longer but then you'd have to adjust the time that it takes for them to to like indent as well um and what else oh yeah but there is another way to do it as well and there's something called a clear flag here on i haven't actually checked this before i recorded but if i go to [Music] clear flags somewhere rendering path clear flags we should have solid color don't clear i think now if i move stuff it should be more or less permanent i think it just keeps rendering and then it'll never regenerate as far as i know uh with that clear flag disabled and then you can also even make it really performant by not having the clear flag and then you only render it when a particle is emitted or even if you don't use the particle system you could use uh like objects i usually do that in my game objects so like a tank in line where for example has this uh little like a plate under it that's rendering with a specific shader that only outputs it to the render texture so it knows how to like press down the trees or fold the trees i do so when it comes into the trees it'll actually check the direction and then fold the tree so the tank runs over it and now it's actually raising because i need to still i think it's just resetting it but you could use the clear flag and then render it on demand instead through code so camera.render and that will just send it off once right to there and the texture and it'll do it super fast in a single frame and then it'll um it'll stay like that until you like render it again but now it's considered continuously rendering so it's not really doing that effect no uh okay so i can enable this one again and i'd say the performance on this even if we bump up the render texture here it's only at 2 5 6 2 5 6 10 24 by 10 24 we could do it's much higher resolution on the render texture but in my experience it's been like super performant take this one away maybe and then should we up this even to like 200 particles and we can change maybe the start size randomize that a bit random between two constants 0.5 and 2 and this one's rendering 4 000 particles now to a 10 24 by 10 24 texture and here even if it's uh we will go here shaded wireframe i mean it's so many polygons now that it's actually ridiculous and i've got a good graphics card so it's at 2080 ti so it's not the best but it's good and so you probably couldn't get away with maybe like as much but overall i found it to be super performant so the likes of rippling after boats or something or if someone's walking in water you need to move this locally so it's not spanning across the whole world you can move that so it's only like the viewport in range of the camera that's being affected and so we still have the and let's see you could stick this on different objects as well doesn't have to be on a flat plane like this maybe we'll put some noise on here as well noise scroll speed strength all right i'm gonna check the chat now i've been doing this for a long time how long have i been doing over an hour over nine thousand no probably not is anyone left ever lost everyone came here for you for you blender all right let's go nifty stuff should i read from below and up winter race track with this effect the aztec design that perfect for for the low poly racing 100 i'd go for something like this to get the terrain and indentation so we're taking it again from low poly into something else but it'd be cool to have it either in mud sections or in like in certain areas at least cool with indentation snowfall perfect you can actually have a particle systems that like drop snow on you have the don't clear flag so it adds up and then you have cars like removing that from that render texture super good also water if you like splash into water you can imagine you just have a ripple effect and instead of calculating the normals like i did on this one with a grayscale i would probably have a ripple ring that's colorized with the correct vectors so it's like a bump map that already contains the red and green and blue components so i don't have to do that whole thing with the four four nodes to create that weird tree i just like output that normal map as a single colorized rgb texture and increase it over time like this and that'll ripple it so if you if you want like cars splashing into the water or like if you're playing like fortnite or something when you're running in the water they're using that technique to to just affect the area around it all right still here eric pog cool some people let's see 80 people still here did it make any sense uh at all the way i tried to explain everything i hope so yeah waves would be cool i agree uh could you do destructible terrain with something like this i just joined uh well regardless of if you just joined you you can do destructible terrain the good thing about it is that it's super performant and i i use it again in line where a little bit i'm going to increase the usage out of it a little bit more so when a crater blows up i do like only a normal map now but you could definitely have it that affects the terrain the only downside is that the graphics or the colliders have no clue what's going on so that's a problem if you wanted a crater or to deform the terrain like significantly so you actually go down into the terrain with a like when you walk or something then you have to do it both ways you have to maybe you do that high detailed stuff with a render texture but you'd have to actually unfortunately change the collider mesh as well trickier but it works oh yeah jonathan asks if it's possible for the collisions so not out of the box like this this is only a visual effect unfortunately so for collisions um you'd have to do it on the mesh as well but usually the collider mesh is a lot more primitive than the world terrain so i'd probably wrap like this very similar logic into a c-sharp script that goes in and affects those vertices because it's quite easy to do vertex manipulation in unity as well you can access all the verts in a mesh as long as you operate in the same location as you do on the texture in this case but in this world it's the same texture space um so like it translates correctly which is quite nice in our game it doesn't 100 do that all the time uh so then you could actually offset the do a similar calculation but maybe if the visual representation is like uh a thousand words or something or ten thousand words uh you can do the visually really fast but then for the collider it'd be slower but it's doable yeah so amplifier package i for the past two years i'd say i've i've looked continuously at shader labs back and forth i said that in the beginning of the video as well and i really really want to do this in in the shader graph editor in the shaded graph but every time i try i run into like unsupported feature unsupported feature or it doesn't do this and it doesn't do that it can't do the vertex manipulation and the geometry node doesn't exist in the urp pipeline uh so that's why i've decided to for productivity i'm going to stick to using amplify until that's sorted out and most of the time i think i'm even going to stick to to the 3d pipeline that that is so much simpler to use than the urp and the hdrp so until i'm proving wrong or something i'm going to be doing that so all right jen so yeah thanks i'm i'm gonna so yeah i can imagine if you're coming from like the blender world or don't do development and stuff like that this is probably super strange and weird but uh maybe it's an insight to see like when you see some of the effect in games you can sort of see the most common one is like the rippling effects i think that's what this is predominantly used for and i'm a little bit surprised over how performant it can be because when you think about uh like think about when you're working in blender if you're coming from the blender world and then you know like when you do sculpting or something you're like yeah it takes a bit time it's a bit sluggish to do some of the sculpts and stuff and i find it a little bit strange and cool that it's so performant that you can do it um so many triangles that the graphic card has to do so i'm quite impressed that the performance is out of the box like this and do i mean i'm just thinking of the days when i used to program like the first top-down racing game that i used to do and i couldn't even get the semi-transparent meshes like in place i had to fix uh like fake the transparency with every other pixel and things and still i ran into performance problems and now nowadays like only 20 years later i guess that's quite a long time but it's like this is done on the fly i think it's pretty cool all right fat cat i'm just uh finishing off the stream actually i spent some time to to create a render texture and had a particle system render particles onto texture that i used to deform this plane here using it we can disable the tessellation again so you can see what it would look like without the tessellation so and of course it's not supported by all the graphics card but i think nowadays most graphics cards are supporting this let's see where did my shadow graph editor go there so if i disable tessellation now this is what it looks like without slightly less impressive so this is the original if the if you imported a super detailed mesh from blender for example or if you did it procedurally it'll look better again so tessellation is just a way for the graphics card to do this on the fly again i'm so impressed that it works like that all right let's have a look oh i hope i didn't miss anything before as well but um irishes thank you so much for your uh great contribution here super chats are really helping me out love your unity stuff thanks for the great tutorials thanks so the idea now is to do a bit of this stuff on the thursdays so i'm going to do maybe the live streams and then i want to put together really compact tutorials so i don't have to go and go wonder what i did wrong here like when i did the had it plugged into the mission for example for like five minutes without realizing or when i'd flipped the cross vector maybe i should try to explain those a little bit better and i think it'd be good for the channel as well to get those type of videos there and then in the live stream i can answer questions and stuff at the same time uh so thanks again irish s for uh for that great contribution i really appreciate it um jen about uh by the way infantsia you can use c sharp in godot but the native language is gd script similar to python okay cool uh great uh well i really important i really like c sharp uh because i learned it's pretty good now and uh i've actually learned python as well well i wouldn't say that i've launched it but i've programmed quite a bit in it now to script automated stuff for blender both outside of blender in inside of blender so a lot of like mesh assemblies of randomization stuff and i hated python before now i don't hate it as much but some of the stuff is really accessible i think but it's tricky great to think thanks eric you're glad you enjoyed it um let's see um thanks emma keith as well glad you liked the tutorials and eric yeah shaded graph very irritating but i'm the only one i work with so but let's see but i'm the only one i work with that knows it okay i've given it so many chances and every time like i said i go in and it's missing the features that i really need and i google it and i think it must be implemented and no it's in the request forms like we must have tessellation for our urp or we must have it for even for each i think it just came into hdrp in this version of unity that was just released and like in amplify i've been using it for how many years i don't know all right cool so i'm not going to scroll too far up into the history so oh yeah i'm glad that you're saying about the problems and and i can't really emphasize that a lot enough a lot of people think i think when they watch tutorials that that the people behind them just know them and maybe some do i definitely do not uh i have i spent so much time like a normal game dev for me is i'll like i'll tackle a problem and i'll figure i'll start searching like with or i'll think of different methods that i've know from the past roughly like how to achieve it and then i do a lot of time searching and even when i start to get on the path i run into problems all the time especially like with my code like with the shaders so much is for me is trial and error and it's quite funny my co-worker christian is one of the developers he's the total opposite of me he'd like he reads something like from start to finish over like a day and then he knows how to use it and he programs accordingly i my brain doesn't work like that at all i need to uh to test it and i sort of just knew that if i had like with this angle for example within a normal direction i knew that like it must be averages between points so i sort of figured that one out and i knew that it was vector math and i remembered something like that there's the cross product and stuff so uh i sort of go along that line and then i do a lot of tests and er trial and error so i try it out trying out and i go oh okay it did get shaded but it's in the wrong direction so instead of like learning the math that way i should probably do it my brain isn't really capable it's faster for me to just go okay if the if the shadows are inversed it's probably that i got uh the x and y like mixed up in that case or and that it needs to be um like inverted instead so i spent a lot of time doing it like that and this is not a 100 accurate way to do the the normal maps either but i usually go for like the visual result that's the more important thing to me if it looks good enough it doesn't have to be 100 accurate mathematically so as long as i can get the visual effect that i'm after that's really what what's the important thing for me and then whether this is the exact correct normal or not i'm not too fussed about that so as long as it looks the way i want it to that's the important thing oh cool so some of you actually liked me to run into problems that helps you the most that's good yeah all right uh so ola jet grove jetland thanks for picking up that middle name it makes it a lot easier now to realize who you are no just joking the tessellation is wonderful to use when uh you fake color and vegetation movement underwater yeah but this stream makes it so much easier thanks yeah i mean it is like i said this one was not with a single line of code so if you weren't like i think we can check the shader code here actually let's have a look i used to write these like for my planets and my procedural planet stuff i had to write all of this stuff but this is what uh those graphs uh generated this code so the render texture everything would be in here this is the stuff that i exposed as properties we had the different floats so i used to type these instead the texture sample and then it's defining all like setting up the access to the variables and then it's going through the vertex stuff and the surface shading luckily enough in surface shader the it's built in i used to have to do all the lighting and unpacking of normals and stuff but that's built in with the surface shaders and this stuff down here is just uh to describe what the nodes are so this stuff you wouldn't have to type this is only to do the connections and stuff one thing i want to show in here that's pretty good is that you can mark a few of these and press c and that frames them so you can do like uh name these things which is pretty nifty all right that's it mia pizza what is faster for you doing it in nodes or typing it including bug faces oh do you mean the shader if if you mean the shader nodes any day it's uh for visual scripting it's much faster to type code like if i were to try to do bolt or maybe a blueprint in unreal engine or something then i'd say that programming is faster for me but for shaders any day it would be the node system because you just first of all it's just difficult to know the language the shading language and it's very unforgiving when you program shaders you don't really get an error message and well you can get them you get some error messages when they try to compile and say which line it's wrong but debugging it's really tricky so the only way you can really debug like let's say you wanted to know what the value sometimes you'll get that it overflows or something or you don't really know then the way to debug the way i often do the me shaders is that i'll i'll plug like a value here into the albedo and then i'll check what the colorization looks like and then i see if it's correct or not and sometimes if you're doing like ranges like gradients and things like that the easiest way to to troubleshoot is actually just to plug it into to the visual and see and then try to figure out what's happening so that's i often do that one i'll move that one onto the albedo and i see how it colors it sometimes with specific colors and stuff too i haven't tried the houdini yet i want to try houdini for the procedural generation that would be fun and i haven't used unreal engine the only thing i've used on railfor is that i actually published a few my assets in there some of the sound effects and space boxes but i really really want to try especially on real engine five i was a bit disappointed to see the comments when i did that tweet about the bloat in unity that apparently it's very very bloated i believe in unreal engine 2. like a new project is huge but i don't know if it's as bad uh as a reference when i did my procedural planets uh i had to break a lot of new ground to do but i think i spent a year programming my procedural shaders for i'll show you the like this stuff as so a few examples here i'm just gonna bring up something here so here these shade comes with music apparently i'll turn it down uh so these planets are those are the shaders that i coded and then i used procedural materials so i used procedural materials that used to be integrated in unity they were built in super nifty way to just generate procedure like splat textures and all these cool valleys and everything like that and then managed to build these procedural generated node stuff worked great and then program the shader to get the atmosphere to get uh like how the how it blends it's quite difficult to blend stuff around a sphere because usually you get seams at the top and the bottom like try to wrap a square texture around a sphere it looks great from the equator but when you get up to the top you usually get significant pinching so that's all solved through like crossfading within the shader and stuff and i think i spent about a year on and off in my spare time uh and i don't know how many hours i spent like programming this shader and then when it finally came to doing um i did the like the gas giants after i don't have that in this video then i decided that i had learned the amplifier shader editor and i replicated the work uh in one day that i'd spent over a year doing but it's not really fair to compare it that way because i had to to learn so much about how to assemble the planets but if i were like maybe i can compare it if i needed to recode the shader manually instead of using the nodes even if i'd learned how to do it and even if i know roughly what commands to use i'd say like in order of uh maybe 20 20 times longer to do it if i didn't use it like if i had to program it instead maybe like 10 to 20 days instead of one day to do with the shader editor all right oh yeah yeah matt i agree i think uh in geometry notes and it just the general thing to use a texture to offset vertices and i used grayscale now but you can definitely do it with the like rgb textures to send them off in any direction you can really get some cool effects to get like warping and things like that uh so if the planets are a shader or a full 3d model with depth and everything so yeah it's just a shader it's a sphere and the shader does everything um you could that's why you cannot land on them you can't transition into terrain i had so many questions to say oh this is great can i land on them and my answer is always no because i wanted to create planets that look good from space that's my main interest i knew like with the likes of uh no man's sky and things it was popular to start making games where you transitioned in and out of them but i always ended up having a loss of quality of the like the space view of the planets if i were to try to make them seamless to land on so and this asset that creates all this uh all these planets it's only well it was at least only five megabytes in size so i was quite happy with the fact that it could produce because the equivalent texture quality it's doing a lot of crossfading and tricks within the shader as well but if you were to try to achieve this result with a single texture map it would be about sixty thousand by sixty thousand pixels in resolution and then you'd need the bump map for that one as well and you'd need so the shader is doing all of those maybe i'll cover that in a video because you can do a lot with something called look up textures so even if you've got like a low resolution terrain texture then the graphic card graphics card will interpolate and fade between the values to cover the distance and then you can use a lookup texture and you can gain like an incredible amount of detail and it looks like it's the most detailed texture map in the world but it's actually just finding a sharp line uh within like low resolution the faded texture so a lot of this one like this texture for example is 512 by 512 i think and and again if you try to replicate it with a texture that wrapped around the whole planet then it'd be sixty thousand pixels or something all right cool okay i think that's going to be it there so an hour and a half this stream was fun to hang out again so i hope you uh like uh enjoyed the little view into uh unity stuff so i hope it gave some always you can go back and look at the the shader code you could replicate it in shadow graph if you spent enough time do it and uh you just have to figure out how to do the tessellation somehow but the the general like type of notes like of dragging the stuff into like vertex offset sort of works but it's um i just don't like it as much so all right okay folks so come back next thursday for another video and uh maybe i'll drop a tutorial soon in between everything so that would be nice to get actually a regular video it's been nearly a month since i released a regular video you know so let's make it mix it up a lot and i hope you have a great weekend coming up to christmas as well so make sure you've got everything prepped and planned and uh i'm gonna see you next week so take care and bye for now i should have used this camera
Info
Channel: Imphenzia
Views: 3,103
Rating: undefined out of 5
Keywords:
Id: mthmC5Yot3s
Channel Id: undefined
Length: 91min 43sec (5503 seconds)
Published: Thu Dec 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.