Alright! I just learned that mipmaps are a HUGE blindspot in my gamedev education. I understood the performance benefit side of things, but the fact that you could use other mipmap properties - like controlling the distance at which we see the caustics - was never on my radar before. Thanks, as always, Ned!
Yeah, I think mipmaps are one of those things we just take for granted, but there are some interesting tricks you can do using them. Thanks for watching!
Incredibly informative (as usual!) It's always interesting to see technology designed for one purpose, being utilized for another. Shows the power of creativity and flexibility.
Thanks for making this! I made my textures using SVG, so it was much better to export the SVG at various resolutions, rather than relying on sampling from the higher resolution. Couldn't figure out how to import custom mipmaps until I found this
This is the best explanation for mipmaps ( for me ) ... Thank you !!!.... The fog implementation idea was really cool. ...Waiting for more content and tricks...Thanks again !
Fabulous guide, mate. Came across this while rendering a tilemap dungeon with alpha shadows baked into my wall tiles. At first I was getting borders around my tiles due to the issue of bilinear sampling, fixed with a premultiplied shader. But now I get artefacts when zoomed out because of sampling issues from Unity's automatic mipmapping. Easy to solve if only I could provide my own mipmaps! Thankfully you guide me through all the steps and tools. Can't ask for more!
This is fantastic, I wish more unity devs would watch this video. There's been a bunch of boomer shooter games that have come out with mipmaps completely disabled, and the texture shimmering/aliasing is awful, just awful. There's even been discussion that it was done because of old school style textures (low pixel count, pixelated textures), but people seem to confuse low resolution textures to texture filtering. Even some devs I've seen don't seem to be 100% certain of the differences. Wish there was a way to force mipmap generation, even at run time, for a released game.
Thank you! Yeah, that's kind of a pet peeve of mine too 😆 Retro graphics are popular right now, which is really cool, but I don't think people are nostalgic for them due to mipmap shimmering!
Hi everyone, thanks for watching! Making your own mipmaps is not something you have to do too much, but as you saw in the video, there are a few reasons to do it. Can you think of or have you experienced another circumstance to make custom mipmaps?
Thanks for your video. I was lucky to find this channel of yours. Very instructive, even though English is not my native language. I learned a lot from this tutorial. I have a study prototype that uses 4K textures, for all of them, I assume - after reconfiguring Unity to read mipmaps - I'll have to use this process, I believe. I built my character using 4K textures, I think I will have to go through all of them through this process. Of course, I will review your video as many times as necessary until I understand everything. Thanks again, I subscribe to your channel too.
Thank you for the kind words! I’m glad this video could help out. And thank you for subscribing! If you don’t mind me asking, what is it about your character that doesn’t allow you to use Unity’s generated mipmaps?
Great video. Thanks. Do you maybe know what settings do games like Oxygen Not Included, Prison Architect, Rimworld for their sprites and textures use? They look perfect no matter if the camera is fully near the objects or 20 times zoomed out from them. They always look good.
Thank you for watching! Yes, crisp sprites are really important! To maintain that, I bet they restrict sprite sizes to the pixel grid, so you don't get ugly blurring where sprite pixels don't line up with screen pixels. Unity has a "pixel perfect camera" solution that does something similar.
Hello there, Ned. Probably a dumb question incoming (take cover!!!): am I right to assume that mipmaps are actually what people call LODs? Because from what you told, it seems like this is it, since LODs work exactly the same.
Hi! No you're fine! Mipmaps are basically texture LoDs! However, in my experience, when people say "LoDs," they usually mean model LoDs, or versions of models with fewer vertices or details. It's the same idea though. I have a video about model LoDs too, if you're curious: ua-cam.com/video/-mE4qreuqJY/v-deo.html
@@NedMakesGames Just finished watching. Man, that dithering technique is pretty cool. I remember seeing it in effect in Rockstar games, heh, especially in GTA IV; my god, it's everywhere in that game, lol.
😅 When I posted this to Reddit, that’s all they could talk about. I’m not sure where I picked up “the GIMP” from, but rest assured I know most people don’t call it that 😆
Hi! When you initialize your Texture2D asset, you can pass true to the mipmap chain argument and Unity will generate mipmaps for you! After calling SetPixels, you'll also need to call Apply(true) to generate mipmaps based on that new data.
@@NedMakesGames oh sorry i was not being clear i meant that i wanted to set custom textures as mipmap levels in code. not have auto generated mipmaps. well my issue is that the mip maps are sampling pixels across borders even while the texture is clamped or has point filter on. so i though if i was able to set a coustom texture level to the mip map it would solve the issue but there dosent seem to be any way to do that via code.
@@AustinPinheiro_uniquetexthere Oh, makes sense! You can actually pass a mip level as the second argument to SetPixels. docs.unity3d.com/ScriptReference/Texture2D.SetPixels.html So you can generate mipmaps however you want and set them that way. Be sure to call Apply(false) afterwards, so Unity doesn't overwrite them.
I have a question. So I went forward and added mipmaps to some 2D Sprites I have. I have two cameras, one high above, and one close (which sometimes is high above). I set the mipmaps as per your teachings, but I really don't see any differences. Do I have to tell Unity when to use them? Do I have to activate them? Do they self regulate depending on the closest camera? I have so many questions I do not know where to begin...
No problem! The cool thing about mipmaps is everything about them is automatic. As long as you generate mipmaps in the asset importer settings, they're good to go. The renderer will automatically choose the best mipmap to display for each camera simultaneously (including the virtual camera you view things through in the scene view).
Hey, back here, after following the tutorial, I converted a 4K PNG to DDS, however, before converting, it had 4mb (png format) after converting, to DDS, 84mb. Is it possible to mitigate this, ie compress this DDS texture?
Hi! I’m not super familiar with PVRTexTool, but you can compress textures with it. In this tutorial, I basically saved images as bitmaps, which explains the large file size. I think you choose the compression when saving a texture, so check out the website’s documentation to see what would work best.
Hi! Tried to apply this to 2D sprite. The only change I can see is that the object gets quite pixelated. Can't see any change in quality when I zoom in or out or when I scale bigger or smaller. It seems to me that the mipmap gets fixed on one quality setting and doesn't change as it's supposed to. Would really appreciate help :)
Hi! Do you mean you tried to create custom mipmaps for a sprite? If your sprite gets pixelated when you zoom out, are you using point filtering mode? Maybe trilinear will look better? Point sampling gets rid of most of the aesthetic benefits of mipmapping, but it but look better for pixel art.
@@NedMakesGames Thanks for replying :). Ehh, no I'm not that great at coding (yet?). You made it look so easy in the video so I thought it would automatically work on sprite as well. I'm not using pixel art. I've tried all filtering modes but it doesn't get better really.
@@eriknastesjo843 No problem! Once you turn on mipmaps and press apply in the texture importer, Unity will automatically create mipmaps for your image. Any image will look a little worse zoomed out, mipmaps just try to improve it a little bit while saving memory. It might just be more obvious on your image unfortunately, unless I’m misunderstanding the problem! Feel free to take some screenshots and I can try to help more!
@@NedMakesGames Hmm.. well for me it seems like it just gets stuck on one low quality setting. I'll work on some other things now but I might return to this issue again later. Thanks again for replying. Liked the video and subscribed because of that :)
Hi! Support is a little patchy - the DDS file importer is notably lacking features. But it worked fine for me in 2020.3 and 2021.1. What version are you using? Maybe the platform or compile target matters? I was using Windows and compiling for PC standalone.
Alright! I just learned that mipmaps are a HUGE blindspot in my gamedev education. I understood the performance benefit side of things, but the fact that you could use other mipmap properties - like controlling the distance at which we see the caustics - was never on my radar before. Thanks, as always, Ned!
Yeah, I think mipmaps are one of those things we just take for granted, but there are some interesting tricks you can do using them. Thanks for watching!
Incredibly informative (as usual!) It's always interesting to see technology designed for one purpose, being utilized for another. Shows the power of creativity and flexibility.
Yeah! I loved researching about the Mario Sunshine mipmap trick. I'm curious if there are other examples
Thanks for making this! I made my textures using SVG, so it was much better to export the SVG at various resolutions, rather than relying on sampling from the higher resolution. Couldn't figure out how to import custom mipmaps until I found this
Great video, looking forward to the next one!
This is the best explanation for mipmaps ( for me ) ... Thank you !!!.... The fog implementation idea was really cool. ...Waiting for more content and tricks...Thanks again !
I love your videos dude! Well illustrated and explained. Keep up the great work, seriously! Awesome stuff.
Thank you! I’m planning to!
Fabulous guide, mate. Came across this while rendering a tilemap dungeon with alpha shadows baked into my wall tiles. At first I was getting borders around my tiles due to the issue of bilinear sampling, fixed with a premultiplied shader. But now I get artefacts when zoomed out because of sampling issues from Unity's automatic mipmapping. Easy to solve if only I could provide my own mipmaps! Thankfully you guide me through all the steps and tools. Can't ask for more!
I was surprised how little info there was on importing custom mipmaps, so I’m really happy to hear that I helped out! Thank you for watching!
The water effect is really nice
This is fantastic, I wish more unity devs would watch this video. There's been a bunch of boomer shooter games that have come out with mipmaps completely disabled, and the texture shimmering/aliasing is awful, just awful.
There's even been discussion that it was done because of old school style textures (low pixel count, pixelated textures), but people seem to confuse low resolution textures to texture filtering. Even some devs I've seen don't seem to be 100% certain of the differences.
Wish there was a way to force mipmap generation, even at run time, for a released game.
Thank you!
Yeah, that's kind of a pet peeve of mine too 😆 Retro graphics are popular right now, which is really cool, but I don't think people are nostalgic for them due to mipmap shimmering!
amazing tutorial, go on sir
Thank you for watching!
Woohoo 🎉, normal video on this topic. Thank you.
Hi everyone, thanks for watching!
Making your own mipmaps is not something you have to do too much, but as you saw in the video, there are a few reasons to do it. Can you think of or have you experienced another circumstance to make custom mipmaps?
They could be used to create some really neat easter eggs based on perspective! Thanks for such a comprehensive explanation on this topic!
@@nicoapinedo That's a cool idea - I'm sure it would surprise players! Thank you for watching!
This is great video 😋
Thank you for watching!
Thanks for this.
OMG! You are so awesome!
Thanks for your video. I was lucky to find this channel of yours. Very instructive, even though English is not my native language.
I learned a lot from this tutorial. I have a study prototype that uses 4K textures, for all of them, I assume - after reconfiguring Unity to read mipmaps - I'll have to use this process, I believe.
I built my character using 4K textures, I think I will have to go through all of them through this process. Of course, I will review your video as many times as necessary until I understand everything.
Thanks again, I subscribe to your channel too.
Thank you for the kind words! I’m glad this video could help out. And thank you for subscribing!
If you don’t mind me asking, what is it about your character that doesn’t allow you to use Unity’s generated mipmaps?
This is really informative and helpful!! Thank you so much!!
I’m glad it helped you out! Thanks for watching!
i really like how you can do fog effect, i usually never touch these settings outside of the texture type and resolution. lol, now i know
Yeah, there's so many options its easy to overlook them! I'm glad this video can help
Clear and interesting video! Thanks.
great!thank you!
great video!!
holy y smokes dudes imn halfway but this is bloody brilliant. no im not high.
😆 Glad you're enjoying it! Thanks for watching!
Great video. Thanks.
Do you maybe know what settings do games like Oxygen Not Included, Prison Architect, Rimworld for their sprites and textures use?
They look perfect no matter if the camera is fully near the objects or 20 times zoomed out from them. They always look good.
Thank you for watching!
Yes, crisp sprites are really important! To maintain that, I bet they restrict sprite sizes to the pixel grid, so you don't get ugly blurring where sprite pixels don't line up with screen pixels. Unity has a "pixel perfect camera" solution that does something similar.
In 2019 generate mipmaps results in a worse quality image the higher the mip level you go. I'm not sure if this was fixed in later versions of unity
Hello there, Ned. Probably a dumb question incoming (take cover!!!): am I right to assume that mipmaps are actually what people call LODs? Because from what you told, it seems like this is it, since LODs work exactly the same.
Hi! No you're fine! Mipmaps are basically texture LoDs! However, in my experience, when people say "LoDs," they usually mean model LoDs, or versions of models with fewer vertices or details. It's the same idea though.
I have a video about model LoDs too, if you're curious: ua-cam.com/video/-mE4qreuqJY/v-deo.html
@@NedMakesGames Thanks, I'll watch it rn :)
@@NedMakesGames Just finished watching. Man, that dithering technique is pretty cool. I remember seeing it in effect in Rockstar games, heh, especially in GTA IV; my god, it's everywhere in that game, lol.
@@phlegios Thank you!
Oh yes. They used it quite a bit!
Great!
GIMP shall from this day forward only be referred to as "the gimp".
😅 When I posted this to Reddit, that’s all they could talk about. I’m not sure where I picked up “the GIMP” from, but rest assured I know most people don’t call it that 😆
@@NedMakesGames oh, from now on we all call the gimp "the gimp" ;-)
quick question how would you generate mip maps for textures that are created in code.
Hi! When you initialize your Texture2D asset, you can pass true to the mipmap chain argument and Unity will generate mipmaps for you! After calling SetPixels, you'll also need to call Apply(true) to generate mipmaps based on that new data.
@@NedMakesGames
oh sorry i was not being clear
i meant that i wanted to set custom textures as mipmap levels in code. not have auto generated mipmaps.
well my issue is that the mip maps are sampling pixels across borders even while the texture is clamped or has point filter on. so i though if i was able to set a coustom texture level to the mip map it would solve the issue but there dosent seem to be any way to do that via code.
@@AustinPinheiro_uniquetexthere Oh, makes sense!
You can actually pass a mip level as the second argument to SetPixels. docs.unity3d.com/ScriptReference/Texture2D.SetPixels.html
So you can generate mipmaps however you want and set them that way. Be sure to call Apply(false) afterwards, so Unity doesn't overwrite them.
I have a question. So I went forward and added mipmaps to some 2D Sprites I have. I have two cameras, one high above, and one close (which sometimes is high above). I set the mipmaps as per your teachings, but I really don't see any differences. Do I have to tell Unity when to use them? Do I have to activate them? Do they self regulate depending on the closest camera? I have so many questions I do not know where to begin...
No problem! The cool thing about mipmaps is everything about them is automatic. As long as you generate mipmaps in the asset importer settings, they're good to go. The renderer will automatically choose the best mipmap to display for each camera simultaneously (including the virtual camera you view things through in the scene view).
@@NedMakesGames wow ok that's pretty impressive. Subscribed!
i love you
Hey, back here, after following the tutorial, I converted a 4K PNG to DDS, however, before converting, it had 4mb (png format) after converting, to DDS, 84mb. Is it possible to mitigate this, ie compress this DDS texture?
Hi! I’m not super familiar with PVRTexTool, but you can compress textures with it. In this tutorial, I basically saved images as bitmaps, which explains the large file size. I think you choose the compression when saving a texture, so check out the website’s documentation to see what would work best.
Thanks so much and happy hollydays :) (sorry my bad english).
@@jeronimocollares320 No problem, I could understand just fine! Happy holidays!
Hi! Tried to apply this to 2D sprite. The only change I can see is that the object gets quite pixelated. Can't see any change in quality when I zoom in or out or when I scale bigger or smaller. It seems to me that the mipmap gets fixed on one quality setting and doesn't change as it's supposed to. Would really appreciate help :)
Hi! Do you mean you tried to create custom mipmaps for a sprite? If your sprite gets pixelated when you zoom out, are you using point filtering mode? Maybe trilinear will look better? Point sampling gets rid of most of the aesthetic benefits of mipmapping, but it but look better for pixel art.
@@NedMakesGames Thanks for replying :). Ehh, no I'm not that great at coding (yet?). You made it look so easy in the video so I thought it would automatically work on sprite as well. I'm not using pixel art. I've tried all filtering modes but it doesn't get better really.
@@eriknastesjo843 No problem! Once you turn on mipmaps and press apply in the texture importer, Unity will automatically create mipmaps for your image. Any image will look a little worse zoomed out, mipmaps just try to improve it a little bit while saving memory. It might just be more obvious on your image unfortunately, unless I’m misunderstanding the problem! Feel free to take some screenshots and I can try to help more!
@@NedMakesGames Hmm.. well for me it seems like it just gets stuck on one low quality setting. I'll work on some other things now but I might return to this issue again later. Thanks again for replying. Liked the video and subscribed because of that :)
@@eriknastesjo843 Thank you, I appreciate it! That is strange though. I'll keep a look out in case I hear of any bugs that might be relevant.
wouldn't lod do the same thing ?
LoD is usually for models, but mipmaps are basically the same thing for textures!
i can´t import dds files in unity. how did you manage that?
Hi! Support is a little patchy - the DDS file importer is notably lacking features. But it worked fine for me in 2020.3 and 2021.1. What version are you using? Maybe the platform or compile target matters? I was using Windows and compiling for PC standalone.
man how do you know all this. Its like you work for unity or something
I’ve been making games with Unity for a long time now 😅
@@NedMakesGames this makes so much sense cause i am new to tech art and i am like how do they do this
@@leemiller2243 Keep at it! There’s a lot to learn but it’s very rewarding when everything comes together!
Tf is this music