Basics of Mipmaps in Unity Part 1! Import Settings and Custom Mipmaps! ✔️ 2021.1 | Game Dev Tutorial

Поділитися
Вставка
  • Опубліковано 29 сер 2024

КОМЕНТАРІ • 74

  • @paladinrose
    @paladinrose 3 роки тому +1

    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!

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      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!

  • @VoonNBuddies
    @VoonNBuddies 3 роки тому +3

    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.

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      Yeah! I loved researching about the Mario Sunshine mipmap trick. I'm curious if there are other examples

  • @Eckster
    @Eckster 7 місяців тому

    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

  • @gilleswalther5964
    @gilleswalther5964 3 роки тому +2

    Great video, looking forward to the next one!

  • @srikanthsiddhu
    @srikanthsiddhu 3 роки тому +1

    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 !

  • @JadonBarnes
    @JadonBarnes 3 роки тому +1

    I love your videos dude! Well illustrated and explained. Keep up the great work, seriously! Awesome stuff.

  • @softwaregeezers2905
    @softwaregeezers2905 3 роки тому

    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!

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      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!

  • @jacksonking8250
    @jacksonking8250 Рік тому

    The water effect is really nice

  • @AluminumHaste
    @AluminumHaste 2 роки тому

    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.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      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!

  • @batnikelam-mavzer443
    @batnikelam-mavzer443 2 роки тому

    amazing tutorial, go on sir

  • @OdemGeek
    @OdemGeek 3 роки тому

    Woohoo 🎉, normal video on this topic. Thank you.

  • @NedMakesGames
    @NedMakesGames  3 роки тому +6

    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?

    • @nicoapinedo
      @nicoapinedo 2 роки тому

      They could be used to create some really neat easter eggs based on perspective! Thanks for such a comprehensive explanation on this topic!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      @@nicoapinedo That's a cool idea - I'm sure it would surprise players! Thank you for watching!

  • @CGRunLough
    @CGRunLough Рік тому

    This is great video 😋

  • @LukeAps
    @LukeAps Рік тому

    Thanks for this.

  • @oleksandrmartysh85
    @oleksandrmartysh85 6 місяців тому

    OMG! You are so awesome!

  • @jeronimocollares320
    @jeronimocollares320 2 роки тому

    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.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      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?

  • @wendywang1736
    @wendywang1736 2 роки тому

    This is really informative and helpful!! Thank you so much!!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      I’m glad it helped you out! Thanks for watching!

  • @paulorodriguez6288
    @paulorodriguez6288 3 роки тому

    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

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      Yeah, there's so many options its easy to overlook them! I'm glad this video can help

  • @jean-michel.houbre
    @jean-michel.houbre 3 роки тому

    Clear and interesting video! Thanks.

  • @quadriproduction
    @quadriproduction 3 роки тому +1

    great!thank you!

  • @hibiscusbear
    @hibiscusbear 3 роки тому

    great video!!

  • @EvansdiAl
    @EvansdiAl 3 роки тому

    holy y smokes dudes imn halfway but this is bloody brilliant. no im not high.

    • @NedMakesGames
      @NedMakesGames  3 роки тому +1

      😆 Glad you're enjoying it! Thanks for watching!

  • @Chris-zb5nm
    @Chris-zb5nm 2 роки тому

    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.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      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.

  • @Smash_ter
    @Smash_ter Рік тому

    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

  • @phlegios
    @phlegios 3 роки тому

    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.

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      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

    • @phlegios
      @phlegios 3 роки тому

      @@NedMakesGames Thanks, I'll watch it rn :)

    • @phlegios
      @phlegios 3 роки тому

      @@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.

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      @@phlegios Thank you!
      Oh yes. They used it quite a bit!

  • @geri4367
    @geri4367 3 роки тому

    Great!

  • @sidremus
    @sidremus 3 роки тому

    GIMP shall from this day forward only be referred to as "the gimp".

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      😅 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 😆

    • @sidremus
      @sidremus 3 роки тому

      @@NedMakesGames oh, from now on we all call the gimp "the gimp" ;-)

  • @AustinPinheiro_uniquetexthere
    @AustinPinheiro_uniquetexthere 2 роки тому

    quick question how would you generate mip maps for textures that are created in code.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      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.

    • @AustinPinheiro_uniquetexthere
      @AustinPinheiro_uniquetexthere 2 роки тому

      ​@@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.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      @@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.

  • @EvansdiAl
    @EvansdiAl 3 роки тому

    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...

    • @NedMakesGames
      @NedMakesGames  3 роки тому +1

      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).

    • @EvansdiAl
      @EvansdiAl 3 роки тому

      @@NedMakesGames wow ok that's pretty impressive. Subscribed!

  • @haochen4826
    @haochen4826 Рік тому

    i love you

  • @jeronimocollares320
    @jeronimocollares320 2 роки тому

    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?

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      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.

    • @jeronimocollares320
      @jeronimocollares320 2 роки тому

      Thanks so much and happy hollydays :) (sorry my bad english).

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      @@jeronimocollares320 No problem, I could understand just fine! Happy holidays!

  • @eriknastesjo843
    @eriknastesjo843 2 роки тому

    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 :)

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      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.

    • @eriknastesjo843
      @eriknastesjo843 2 роки тому

      @@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.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      @@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!

    • @eriknastesjo843
      @eriknastesjo843 2 роки тому

      @@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 :)

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      @@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.

  • @leemiller2243
    @leemiller2243 3 роки тому

    wouldn't lod do the same thing ?

    • @NedMakesGames
      @NedMakesGames  3 роки тому +1

      LoD is usually for models, but mipmaps are basically the same thing for textures!

  • @nielsw305
    @nielsw305 2 роки тому

    i can´t import dds files in unity. how did you manage that?

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      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.

  • @leemiller2243
    @leemiller2243 3 роки тому

    man how do you know all this. Its like you work for unity or something

    • @NedMakesGames
      @NedMakesGames  3 роки тому

      I’ve been making games with Unity for a long time now 😅

    • @leemiller2243
      @leemiller2243 3 роки тому

      @@NedMakesGames this makes so much sense cause i am new to tech art and i am like how do they do this

    • @NedMakesGames
      @NedMakesGames  3 роки тому +1

      @@leemiller2243 Keep at it! There’s a lot to learn but it’s very rewarding when everything comes together!

  • @HobieBrownAM
    @HobieBrownAM 2 роки тому

    Tf is this music