Lets Learn Godot 3.4! What are Impostors and How Do I Use Them?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is mitch with fine point cgi and today we're going to talk about octahedral imposters so we're going to talk about what an octahedral imposter is we're going to talk about how imposters can be added into godot we're going to talk about setting up octahedral imposters and baking them and then finally we are going to talk about all the little bits and bobs with the octahedral imposter add-on so that's what i have in store for you guys today so let's go ahead and get started okay so the first thing that we have to talk about is what an octahedral imposter is so an octahedral imposter is actually an image that follows the camera and flips through different sprites as you move to different locations so if you were to rotate your screen you can see that i have two objects here right and they both actually look really good right you can see how they look pretty darn good but one of them is an imposter and i'm sure you guys can pick out which one it is right and it's the one right here on the left if i kind of rotate you'll see that it kind of blurs and moves as i rotate if i move up you can see how it kind of blurs a little as it goes up and you can see that the lighting accuracy well it's just frankly it's not there right you can see how much better it looks but if you look at it right if you actually kind of zoom in and look at it right this is a single image so if we actually come in here and we go into wire frame mode you can see that this is a single plane versus all of this extra geometry now the reason why this is useful because you might be asking yourself why is this useful for me right well the reason why this is useful is because in a 3d game when something or somebody is really really really far away and you don't want to waste your time rendering all of that additional detail you can just kind of throw this little imposter in and people's brain will fill in the additional information if i zoom all the way out to here right where my last lod let's say would switch out and i hide my light because my lights in my way and i kind of rotate around i mean really it doesn't look too bad from a distance away so that's one of the big advantages to an octahedral imposter and the way it works is it tracks your screen and then flips out images to make your object look three-dimensional i know a lot of people who use these things in strategy games and things like that for stuff that's rendered really far away that the users not going to directly see right off hand but still needs to have that 3d look to it so if i go ahead and open up my windows explorer here and i come down and i look at my base right here and i double click on it there we go so you can see all of the images that makes up this octahedral imposter so you can actually see this is one big 4k texture that it's using and it took photos of every single angle that this object could be looked at so you can see that you get all sorts of really good angles on this object and it gets every single angle that makes this object up other than below it because generally you're not going to be looking underneath an object so you don't need to have that full 360 right you only need the top half of the sphere if that makes sense no one's going to go underneath an octahedral imposter unless you turn on full sphere mode it's not going to create that but it would also half your resolution so that's something you'd have to keep in mind but this is really awesome and this is basically how it works now it does also have if i open up normal and depth you can see right here this is how it calculates all of your lighting and you may need to make some adjustments to how your normal and depth is handled right if your lighting isn't correct so it's basically how it works it uses this as a normal map to make sure that your light actually reacts correct based off of where the light is positioned so that's basically how an octahedral imposter works inside of godot how do we do it inside of godot well there is a person by the name to pill i think and basically he created this octahedral imposters project so all we need to do is we can just go ahead and click on the code we can go ahead and download it as a zip we're going to go ahead and extract this so we're going to drag this out to my downloads folder open up our downloads folder and you'll see there is the octahedral imposters and you can see we have all sorts of cool stuff here now we don't need all of this we really just need the add-ons section that's right here so what i'm going to do is i'm going to go ahead and grab this add-on here i am going to go ahead and open up godot here and we will go ahead and make a new project we will call it posters tutorial we're going to go ahead and create our folder and create an edit and i'm going to resize this for you guys i'm gonna have to find an application that automatically does this for me so i don't need to do it every time all right so now we're gonna go ahead and right click open in file manager and we are going to right click create a new folder and we're going to call it add-ons with a lowercase a if i remember correctly and we're going to go ahead and hit paste and we're going to paste that in there so now if we go into godot it's going to go ahead and load all of that and if we go to project project settings and then we go to plugins you will see octahedral imposters by wojek tech pill and we're going to go ahead and click enable and that will enable our add-on or if you don't want to download it from the godot github you can actually come out to the asset library and then search imposters and you should see the octahedral imposters right here you can actually go ahead and download this one as well instead of going about extracting it from a zip folder and manually installing it you just click download and then go ahead and do it from your project settings now octahedral imposters are really easy inside of godot what we can do is we can just go create a 3d scene right click add in a child node and then go ahead and add in what kind of whatever kind of mesh we want so we'll just go ahead and say mesh mesh instance we'll click on our mesh and we will go ahead and just add in a nice simple we'll say prism mesh why not because it's an interesting looking mesh right and we can actually click on our spatial node here and you can see that says convert to imposter right here all we have to do is click on this and you can see that it has a bunch of different options now each option is very important the atlas covers how much percentage of the atlas you want covered generally speaking you're going to want 100 grid size is the number of rows and columns generated in this atlas so it would be 16 rows and 16 columns you could do something like you know 15 or or 20 or something like that and it would do that atlas resolution is the resolution at which your atlas is being created so if we were to click on this you can see we could do like 4096 or 8192 we'll just say 4096 a full sphere if you want to be able to go underneath the object or not profile light or standard and basically the profile is whether or not you should use a higher quality shader so why not let's go ahead and do that optimize size will optimize the size and export with shadow mesh will actually export it out if the um if it'll export out a um imposter with it so with that being said we'll just do standard with a 4096. we're going to go ahead and click generate and it's going to say hey where do you want to save the scene we're going to say imposter.tscn we'll just throw it into our main directory we'll hit ok and it should go ahead and start making our imposter so you'll see it's going to go ahead and take photos of all of it and start saving it out and it's going to go ahead and import it now something to keep in mind is that it will import your mesh textures with some compression here so you want to be sure to check for that so if you actually look and you go into your import settings you can see that it is importing them as textures with some compression attached to it some lossless compression you can actually go uncompressed if you'd like video ram is technically a better compression algorithm but that's just something to keep in mind so i'm just going to go ahead and re-import this all right now we'll just go back to our scene we're going to go ahead and drag in our imposter and you'll see as soon as it re-imports the re-import all right so if we drag this over you can see that now we have an imposter of that object so if we rotate around it looks three dimensional even though it's a 2d object you can barely tell if i actually zoom in you can kind of see when i rotate how it kind of flickers there but really if you're this far away you really can't tell and it's really well done and it really depends on the shader and how you want to approach it but if i put in a light here and i throw in like an omni light and i kind of drag this in you can actually see how it gets affected by light just the same as a regular object see it's really quite fantastic how it works now when you get really really close that's when things obviously start breaking down really easily you can look at it and literally watch it break down especially if you go below the plane of existence right it just doesn't exist but for one single texture it's a fantastic result so the shader here we open up the material and we open up our shader parameter you can actually see that you get a lot of really cool things here so we can actually come in here and say okay you know how rough do we want this object to be you can kind of bring down the roughness bring up the metallic things like that to help make it look nicer if i remember correctly if i throw a reflection probe in here let's see what that does now you can see it actually reflects light as you would expect so see how shiny it is now you know it actually is a mirror-like effect so you can get some pretty interesting results you know for a really cheap shader i mean it's a cheap little shader there is also if you guys ever want to do your own imposter inside of here you can actually come in here and you can see how many frames you have so if you come in here you can see a pasta frame 16 if i were to make that like four and four you can see how it really borks it up but you can see kind of how it works see that so if you go back to 16 by 16 it's literally just flipping through the images but it's just doing it in such a nice way if you do full sphere full sphere will allow you to go underneath it right but since we don't have enough texture information to handle that it just looks ridiculous but if we had the texture information for that we could definitely pull that off position offset will allow us to offset our position of our texture so if i you know offset it you can see how it's going to offset it alpha clamp allows you to clamp your alpha so you can see how it looks like this you can see if we up it and we start clamping our alpha how it will help with some frame blending here so if we actually kind of put it at like you know a little maybe a little bit more clipping it'll actually start blending a little bit better things like that it'll help with some of the shimmer you have dithering which dithering will allow you to dither the edges instead of doing alpha cut off so it can help with blurring off the edges when you're making that rotation so that it looks more realistic but it does add that weird dither effect which i'm not a huge fan of i prefer sharper cuts if i can even if it's going to look a little weird i'd rather have that scale is the scale of your imposter so you can actually scale it up or scale it down depending on what you need to make sure it's correct depth scale will give you the depth of the parallax of the texture so you can see like you can see how now it's really choppy because the depth of the texture is less but if i move it up you'll see that it's not as choppy so that's something to keep in mind you can mess around with that normal map depth in sometimes when you do your texturing this will allow you to kind of blur out your your normal map a little bit which can help you out when your textures seem a little bit too sharp if that makes sense if everything looks kind of too shimmery almost you can change this down and it'll help with that and the last one is aab max and this is the bounding box imposter offset you'll probably never need it but it can allow you to change your fix order and sometimes fix some shadow problems so that's something else that's kind of cool is if i actually go in here and i add in a mesh actually let me go in here and add in a actually i should be able to do with my omni light if i bring this over here like this and i turn on shadow this should in theory cast a shadow or maybe not i always thought it did or is this just not casting oh am i so there's a shadow there you can see how it's casting a shadow on it if i put it over here you'll see that it does not cast a shadow right but this allows you to receive shadows so that's one of the coolest things about this system is that it uses the light and then it calculates the object based off that light and gets the little shadow it's not perfect obviously if you look directly at it you can see it's correct right but if you rotate it kind of messes it up but it is really cool and it can make your stuff look really realistic so what did we talk about well we basically talked about what an octahedral impression imposter is we talked about how to get an octahedral imposter inside of godot we talked about how to bake one and set it all up and all the happy jazz and finally we talked about the benefits of the octahedral imposter so if you like this video go and hit that like button and hey you know if you dislike this video go ahead and hit that dislike button because i am here to make content for you guys this video was a viewer suggestion like all of my videos so if you guys have a suggestion go ahead and throw them in the comments below and i'll be more than happy to put it on my trello list and i will definitely get to it and hey if you want to ask any questions or just want to say hello drop by my discord link is in the description below and i'd be more than happy to talk with you but that's all i have for you guys today so thank you so much again for watching and i will see you all next time thanks [Music] you
Info
Channel: FinePointCGI
Views: 1,217
Rating: undefined out of 5
Keywords: godot, godot platformer template, stole my game and turned it to bad mobile ad, godot engine tutorial, godot 3.2, how to use cheat enfine, how to use cheat engine, cheat engine tutorial, godot platformer tutorial, godot 2d platformer tutorial, godot 2d platformer movement, godot tutorial, best was to use cheat engine, godot platformer code, how to hack games with cheat engine, how to cheat in games, godot 3d, #blade and sorcery
Id: RuXo5HORZ2o
Channel Id: undefined
Length: 17min 51sec (1071 seconds)
Published: Sat Nov 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.