Mipmapping - Interactive 3D Graphics

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • This video is part of an online course, Interactive 3D Graphics. Check out the course here: www.udacity.co....

Комментарии • 37

  • @kiwi1118
    @kiwi1118 5 лет назад +98

    I... I'm just tryna understand minecraft man...

    • @zanagi
      @zanagi 4 года назад +4

      lmaooo

    • @bukachell
      @bukachell 3 года назад +2

      Yoo I came here after seeing mipmap in the minecraft settings and remembered "Oh yeah, I should get to learning about these!" Since I had heard of them for a while.

    • @pepper2027
      @pepper2027 3 года назад

      Same

  • @daddydangerous20
    @daddydangerous20 7 лет назад +10

    This is the best tutorial for mipmaping I could find on the internet.. good job

  • @nomnom...
    @nomnom... 2 года назад +2

    I was trying to find a little more information on bilinear, trilinear, and anisotropic filtering. This video explains it to a point where (even though I was not previously familiar with the concept of texels) I can get a very solid understanding of why texture filtering is necessary and what the different forms of filtering are doing.

  • @ThefamousMrcroissant
    @ThefamousMrcroissant 5 лет назад +5

    Interesting. Not a very complicated process, so I appreciate the fast pace of this tutorial.

  • @narf0339
    @narf0339 Год назад

    Whats its for ? To save cpu and gpu power when the gameobject is too small ?

  • @Nytrox3000
    @Nytrox3000 2 года назад

    With magnification why would you make the texture larger? Wouldn't that make the texel/pixel ratio even smaller?

  • @Craigy4488
    @Craigy4488 5 лет назад

    thank you. you really cleared up what MIPmapping is for me

  • @reshadeit3860
    @reshadeit3860 Год назад

    I'd there a program to check of my textures, hundred of thousands are Power of two ratio?

  • @BikeLifeMike93
    @BikeLifeMike93 4 года назад +7

    I must have the IQ of an infant, why am I like this lol.

    • @SisuBjörk
      @SisuBjörk 4 года назад +2

      Bro you aint alone in tthis

    • @blaccy5991
      @blaccy5991 4 года назад

      Basically textures require more proccesing the higher the resolution they are. MipMapping just makes the texture low res so it takes less power

  • @Fjuron
    @Fjuron 6 лет назад

    nice, now i unterstand all the texture filtering methods much better!

  • @Kaim.Argonar
    @Kaim.Argonar 4 года назад +2

    Is this the same as LOD?

    • @DJxSGGxNeo
      @DJxSGGxNeo 4 года назад +3

      Hmm, did you ever figure this out? I don't think it's the same as a LOD, Though if it isn't are we able to use both LOD and this?

    • @Kaim.Argonar
      @Kaim.Argonar 4 года назад +2

      @@DJxSGGxNeo that is the question...

    • @FrostbiteCinematics
      @FrostbiteCinematics 3 года назад +5

      @@Kaim.Argonar Chances are you have already figured this out since this comment is a month old, but I figured I'd drop this here for any future readers just in case they come across it.
      You're very correct. Mipmaps can basically be thought of as LODs but for 2D textures rather than 3D meshes, except they are used for a slightly different reason. LODs are switched out based off of distance. And to answer Mr Blank's question for anyone else wondering:
      Yes. We can use LODs and mipmaps simultaneously.
      Why render a 50k-poly model at a long distance away if we can't see the detail of the model anyway? We might as well swap it out with a low-poly model and we won't even be able to tell the difference. This helps us save on our poly budget. So in the same way, mipmaps are swapped out based off of how far away the camera is from the texture.
      Consider this short demonstration video here: ruclips.net/video/fBwBhvLb4YU/видео.html
      At the beginning of this video, texture filtering is disabled, and we are seeing the raw texture on the plane. The texture I use is 2048x2048 pixels/texels, and when zoomed all the way in, we can see every individual texel as a block, almost like it's from Minecraft.
      (For anyone confused, 'texels' is just a shorter way of saying '(te)xture pi(xels)'. To describe a 1920x1080 HD image created in Photoshop, you could either say it is 1920x1080 pixels or texels. We can use 'pixels' and 'texels' interchangeably when referring to the number of pixels in an image/texture, but 'texels' adds clarity since we know it is specifically referring to the texture resolution rather than the screen/monitor resolution.)
      If you watch when I zoom out (minification), the amount of screen pixels that the plane takes up on my 1080p monitor gets smaller and smaller. Imagine that the plane is now taking up only a few hundred pixels horizontally and vertically. Without texture filtering, all of those texels (2048x2048) are being crammed into such a tiny space on my monitor, and when I continue to zoom in and out, it becomes very apparent that there is a LOT of visual noise/jagged edges from the texels. So how do we combat these awful jagged edges?
      Filtering. We can filter textures so that they are a little blurred, making it harder to see the individual texels when zoomed in. So when we zoom out, we no longer see those jagged edges/noise as clearly and it looks more realistic. In the program I use in the video, Autodesk Maya, I show a method called Quadratic filtering, and the methods used in games may be slightly different. When textures are being filtered in a game, they would need to be downsampled to a lower resolution on the fly to remove obvious 'jaggies', which could add a computational cost. So rather than computing this on the fly, mipmaps are generated (I believe when the game is baked/cooked, though I'm not positive) so that the downsampled textures are readily available, rather than needing to be generated whilst playing the game.
      So to recap, when the camera is further away from the texture, the high-res texture is swapped with a lower-res texture with fewer texels (similar to how LODs work for 3D meshes) to avoid lots of texels with varying colours being condensed into a small number of screen/display pixels.
      Now let's say instead of looking at a plane either head-on or top-down, we're looking at it from an angle. Imagine you're playing a first-person shooter and you're staring at the horizon. If you put down your controller/KB+M for a moment and look at the ground near your character, it's probably high-quality. Yet if you look at the ground near the horizon, it might appear low-res and blurry, especially when it's being viewed from an angle. This is probably due to the high-res mip being the one nearest to your camera and the low-res mip being furthest from it. If we think of the player's location as point A and the horizon as being point B, chances are that between those two points (A and B), there are multiple mips for your texture, where the texture resolution decreases closer to the horizon. For reference, refer to the clip I linked. You'll see that there are multiple planes in a straight line. They all have the same texture on them so it may be hard to visualise, but imagine if the plane on the left had the highest-res mipmap, and the plane on the right had the lowest-res, and subsequently, every plane between the two gradually decreased in quality the further away the texture got.
      A good exercise to visualise this would be to imagine each texture as a different colour. For example, if this were in Minecraft, the closest blocks to me in a line could be grass, and after that is mud, and after that is bedrock. Because these are different textures there is a visible line between where each texture meets. In the case of Minecraft, it's a very sharp and quick transition from green grass tp brown mud. If this were real life, grass would most likely naturally blend with the mud, almost like a gradient. This is what trilinear and bilinear filtering is used for. It takes the points between where the two nearest mipmaps meet and takes samples from them, linearly interpolating between the two mips to find a good blend, removing the sharp line we see when the textures meet.
      I'm aware that this may not be the best demonstration or explanation of how mips and texture filters work. It's not easy explaining over text, nor am I particularly experienced in these subjects (so feel free to correct me on anything I misunderstood). Though I hope someone gained a little more knowledge from it nonetheless. :)

    • @rosenrot6871
      @rosenrot6871 3 года назад +1

      @@FrostbiteCinematics Excellent and well put explanation that cleared up things perfectly, the video you used as an example for filtering really helped me understand the importance of it in it's use to remove visual noise as you described. Thank you for this important info.

    • @regbot4432
      @regbot4432 3 года назад

      ​@@FrostbiteCinematics Surprisingly well explained, worth reading definitely!

  • @messiasof
    @messiasof 5 лет назад +1

    wow, simple and faster
    thanks!

  • @alotofclouds5706
    @alotofclouds5706 4 года назад +1

    ok, what is a texel?

    • @Edigor100
      @Edigor100 Год назад

      a texture pixel, basically a pixel on your texture map

  • @mcbuttlovin9908
    @mcbuttlovin9908 2 года назад

    So how do I make my textures powers of 2?

  • @watercat1248
    @watercat1248 4 года назад

    yes this Mipmapping but is way to use differen for each stage texture instead to use the same textur and do automatically result ?

    • @DJxSGGxNeo
      @DJxSGGxNeo 4 года назад +1

      also, do we set up the normals, alphas, and such this way? So far I have gathered that I should make a main surface, then have the rest called mipmap 1 - ect., I am going to really need to read up on this.

    • @watercat1248
      @watercat1248 4 года назад

      @@DJxSGGxNeo ok

    • @watercat1248
      @watercat1248 4 года назад

      @@DJxSGGxNeo ok

    • @FrostbiteCinematics
      @FrostbiteCinematics 3 года назад

      @@DJxSGGxNeo Not sure whether this is the answer you're looking for (and judging by the fact that your comment is a month old, you probably found your answer anyway), but here goes just in case.
      As far as I know, every texture benefits from mipmaps, especially colour and normal maps. Consider the following clip:
      ruclips.net/video/fBwBhvLb4YU/видео.html
      When I zoom out, you can see that all of the texels are being crammed into a progressively-smaller amount of screen/display pixels, resulting in jagged edges/visual noise. And when I zoom in, everything is very blocky, almost like Minecraft. The planes in the clip only have a colour texture being rendered, but the exact same thing would likely occur with your normal maps too. Without filtering and/or mipmaps, they would have a lot of visual noise when the camera gets further away from the texture as, just like with the colour texture, all of the visible, unfiltered bump information is being condensed into hardly any display pixels. Hope this somewhat helps someone out.

    • @DJxSGGxNeo
      @DJxSGGxNeo 3 года назад +1

      @@FrostbiteCinematics This helps a lot, I read up on it, though I will check this out also. Thanks a ton!

  • @bjarnes.4423
    @bjarnes.4423 4 года назад

    that was very informative. thank you

  • @Denisfutbol
    @Denisfutbol 2 года назад

    0:40 Here I think he meant "if the scale is larger, a LARGER resolution is used instead"

  • @The_SOB_II
    @The_SOB_II 4 года назад

    your breathing is extraordinarily noticeable

  • @kyoheiblink-1826
    @kyoheiblink-1826 4 года назад

    PPSSPP

  • @dream.n.m
    @dream.n.m 3 года назад

    Он
    Да
    д оо