Roughness on human skin requires custom mipmaps too. From close, the human skin is fairly smooth but if you keep a low roughness at a distance, the skin will appear glossy. You can solve it in shaders (at a cost of extra instructions), or for free in mipmaps by increasing the roughness value in lower mips.
@@wpwscience4027 Mostly eyeballing and adjusting if you got it wrong. Let's say that your base roughness is at 0.2, you could add 0.1 of roughness on each mipmap level until it reaches 1 and you try it in game. If the skin becomes too rough too quickly, you add 0.05 instead of 0.1 and try again, if it becomes shiny, add 0.15 instead. It shouldn't take you more than 2-3 adjustments to get it right.
even the SSS calculated in screenspace should be addressed in some way, I usually use a distance node, no need to waste time on making the mipmaps manually.
This reminds me ever so slightly of the method they used in Ghost of Tsushima to analyze a scene for how grainy it's normals and albedos are, so they could homogenize some of the visual look and make it less noisy and easier on the eyes. Very cool trick! I typically eyeball after what I think is important objects and things I want to keep as focal points and if I end up with too many props getting downgraded I sometimes stop and re-evaluate if I have to create some specific shader variant that use less textures samples and share more of them. So the cost comes out at least the same. Preferably cheaper.
I was thinking about how useless 4K textures are the other day, especially in a PBR workflow. You pretty much never need an albedo higher than 1k. I think 1K for albedo, 2k for RMAO and 2k for normals, with an occasional exception for a 4K normal map on a hero asset is all you ever need. And my God, would artists please stop making meshes with 10+ textures! So unoptimized.
@@VisualTechArt ruclips.net/video/exp1Yrxt50A/видео.html its here in digital foundry!! It's quite cool really, back in my modding days for trackmania, we were using this for pearlescent/iridescent cars as well, where every mip is a different color
never knew how to make these! so cool! I saw a youtube video where they broke down the snowflakes in one of the mario games, where the closer the particle, the more snowflake shaped it looked. and smaller mips were round masks
Also, I'm wondering - The packed Mipmaps texture (being double width minus 1px), all of that empty space... I wonder if there is a way to make use of that texture space? Is it possible to sample the packed mipmap texture including it's excess space? I doubt there is, but it feels like a good opportunity to experiment with channel packing/masks. Even without the excess space, could you potentially force the material to discard the first mip level, and use that as a separate three-channel mask? Just thinking, something like... 0 = 4k albedo 1 = 2k Rough/Metallic/AO 2+ = 1k or less albedo mips Or if the albedo wasn't that important, you could potentially put the masks in the 4k / highest mip level, and reassemble srgb in the material for the 2k mip level albedo
That would be great! But I don't know if internally those MIPs are actually stored in that way! It may also become a sort of texture array without any empty space, it would be cool to check!
This is probably a bit late, but all this "empty" space doesn't exist in the exported texture, only in the photoshop file where all the mipmaps are layed out in a row in a single area. The .dds texture contains each of the mipmaps in their actual size with no additional data. You know this because of the file size: a .dds texture with mipmaps is (almost) exactly 1/3 bigger than one without, and the additional 1/3 comes from adding up the relative sizes of the mipmap levels: 1/4 + 1/16 + 1/64 and so on.
This video is very informative about how to use and manipulate mipmaps in Unreal, however I'm confused about the utility of the texture you created. How does using the material you provided differ from simply using the Required Texture Resolution view mode?
I'll double check because I'm not 100% sure of what I'm about to say, but: the View Mode is basically a Post Process that shows you some stuff, but it doesn't have direct access to every single material you have in the scene. Meaning that if you have some weird UV mapping, triplanar etc, it won't account for that. With this texture you can visualize exactly what a specific texture slot is doing in your specific material instance, in your specific mesh :)
@@VisualTechArtYou create one DDS file for each typical screen resolution and try to approximate when there are more texels than what can be rendered by the screen (for example a 4K texture at MIP map level 0 being rendered in 1080p looks the same as a 2K texture in the worst case of a flat surface in front of the screen or even less in any other case).
Can you automate this whole process like mipmap creation automatically for any texture like really go through and see how much of this you can automate make it closer to unreal engine... nanite but for textures
Ok, ideas requested: use one of your mips that you aren't using for channel packing crap you don't have an easy way to bring in without an extra texture sample. Then be like skip this mip for doing stuff but grab this mip for your opacity mask or metallic or ao or whatever map you didn't have room for.
Just wondering - You show the Mip Bias, but does "Maximum Texture Size" (I forget the exact name) also scrap the higher resolution mips when building? We've been using this to set a maximum size lower than the imported texture size, but now I'm wondering if it's actually a good thing to do?
The point of the video was to show you that you have a way to know exactly the resolution of the texture you need on a surface, and that applies to VTs too, if you create one starting from that custom MIP texture I did, so you don't risk occupying virtual pages without a real need :) Plus, there are cases in which you need custom MIPs, because not always you want just a simple downsample at reduced screen sizes
@@VisualTechArt yes you are right, sorry for the stupid comment. I used to work with DDS back in the days, fortunately we had a custom tool to convert regular TGA into DDS. Ancient times! :D Also I noticed that when you scaled the DDS in Photoshop you got an antialiasing problem on the border, I think there is an option to preserve alpha when scaling, I think. Anyway, informative video as always.
when you say "scrap", will 4k textures when compiled to a 1k texture save on disk data, or would you still wanna replace the 4k with 1k towards the end of production?
hmm well that's odd the texture is in highest quality already but i think it's the monitour or projector 4k quality no matter which circuit or components are.
Upscalers render the image at a lower res, so MIPS are used accordingly anyways :) If you change dynamically the resolution then deciding what's the texture size you actually need will be a bit more tricky
You have a 980ti? The constraints you are working on are good actually, you remember that things should run on lower end systems and there are illusionary ways to pull it off that many devs forget
Yes, I personally find much more fun to make things for much slower hardware ahahah unless I'm purely focusing on the art side :) But to to be honest I'm really starting to feel the need for an upgrade, especially since I moved to UE5, that engine is not made to make things run faster :D
I'm sorry but there is no reason not to use 4k textures if not higher ones. Honestly, we need to stop using resolution and use PPI/DPI with 400 being the goal.
Nope, DPI are for prints, here we're looking at digital images, which have the resolution of the screen they're being rendered on :) So we think in texel density terms, which ideally should match the closest view you can possibly have of your texture during gameplay. And of course, if you have huge assets with bespoke textures, you're likely forced to go higher in resolution, that can be fine for a demo, for architectural visualization and so on... For games, meh, not as much if you care about performances :)
@@VisualTechArt DPI/PPI are still basically the same concept, how many dots/points/pixels per inch. Even still, if you used the "closest" idea for textures, then they would be FAR higher than 4k which is my point. Messuring in resolution doesn't indicate quality, even 4k can be less sharp if it is on a huge screen. Hence, I go by PPI.
Spoken like a true AAA game company executive edit for clarity: a 4096x4096 image in 24-bit color is ≈.05gb or memory. assuming each material has 5 textures, (albedo, normal, roughness, metallic, and either a specular or height so depending on what you consider more important) one material is going to be ≈.25gb of vram. If you have 20 (an arbitrary amount, but not too many for a detailed scene) materials loaded in vram, it’ll be about 5.03 GIGABYTES of your vram from just the material textures. (i believe all the math is right here, but i might’ve slipped up somewhere)
I didn't get that impression, just that maybe you can't make your own, but neither can peasants like me who live outside the fiefdom of lord photoshop.
@@wpwscience4027You absolutely can do this with GIMP. It comes with a dds plugin that can import mipmaps as layers, which then can be edited separately and then exported again with the setting "Use existing mipmaps".
Roughness on human skin requires custom mipmaps too.
From close, the human skin is fairly smooth but if you keep a low roughness at a distance, the skin will appear glossy.
You can solve it in shaders (at a cost of extra instructions), or for free in mipmaps by increasing the roughness value in lower mips.
How do you read out what mip you are on to tell the roughness to use different rules?
@@wpwscience4027 Mostly eyeballing and adjusting if you got it wrong.
Let's say that your base roughness is at 0.2, you could add 0.1 of roughness on each mipmap level until it reaches 1 and you try it in game. If the skin becomes too rough too quickly, you add 0.05 instead of 0.1 and try again, if it becomes shiny, add 0.15 instead.
It shouldn't take you more than 2-3 adjustments to get it right.
Composite textures help with this with less effort.
even the SSS calculated in screenspace should be addressed in some way, I usually use a distance node, no need to waste time on making the mipmaps manually.
This reminds me ever so slightly of the method they used in Ghost of Tsushima to analyze a scene for how grainy it's normals and albedos are, so they could homogenize some of the visual look and make it less noisy and easier on the eyes.
Very cool trick! I typically eyeball after what I think is important objects and things I want to keep as focal points and if I end up with too many props getting downgraded I sometimes stop and re-evaluate if I have to create some specific shader variant that use less textures samples and share more of them. So the cost comes out at least the same. Preferably cheaper.
I was thinking about how useless 4K textures are the other day, especially in a PBR workflow. You pretty much never need an albedo higher than 1k. I think 1K for albedo, 2k for RMAO and 2k for normals, with an occasional exception for a 4K normal map on a hero asset is all you ever need. And my God, would artists please stop making meshes with 10+ textures! So unoptimized.
Best use I've seen for custom mipmaps is the water in super mario sunshine, very creative usage
Can you link me an example? :O
@@VisualTechArt ruclips.net/video/Ipsd6rYj6Mk/видео.html
@@VisualTechArt ruclips.net/video/exp1Yrxt50A/видео.html
@@VisualTechArt ruclips.net/video/exp1Yrxt50A/видео.html its here in digital foundry!! It's quite cool really, back in my modding days for trackmania, we were using this for pearlescent/iridescent cars as well, where every mip is a different color
ruclips.net/video/Ipsd6rYj6Mk/видео.html
God, it's amazing usage of mipmap
never knew how to make these! so cool! I saw a youtube video where they broke down the snowflakes in one of the mario games, where the closer the particle, the more snowflake shaped it looked. and smaller mips were round masks
Ah that's a nice idea! Thanks for sharing :D
Also, I'm wondering - The packed Mipmaps texture (being double width minus 1px), all of that empty space... I wonder if there is a way to make use of that texture space? Is it possible to sample the packed mipmap texture including it's excess space? I doubt there is, but it feels like a good opportunity to experiment with channel packing/masks. Even without the excess space, could you potentially force the material to discard the first mip level, and use that as a separate three-channel mask?
Just thinking, something like...
0 = 4k albedo
1 = 2k Rough/Metallic/AO
2+ = 1k or less albedo mips
Or if the albedo wasn't that important, you could potentially put the masks in the 4k / highest mip level, and reassemble srgb in the material for the 2k mip level albedo
That would be great! But I don't know if internally those MIPs are actually stored in that way! It may also become a sort of texture array without any empty space, it would be cool to check!
This is probably a bit late, but all this "empty" space doesn't exist in the exported texture, only in the photoshop file where all the mipmaps are layed out in a row in a single area. The .dds texture contains each of the mipmaps in their actual size with no additional data. You know this because of the file size: a .dds texture with mipmaps is (almost) exactly 1/3 bigger than one without, and the additional 1/3 comes from adding up the relative sizes of the mipmap levels: 1/4 + 1/16 + 1/64 and so on.
This video is very informative about how to use and manipulate mipmaps in Unreal, however I'm confused about the utility of the texture you created. How does using the material you provided differ from simply using the Required Texture Resolution view mode?
I'll double check because I'm not 100% sure of what I'm about to say, but: the View Mode is basically a Post Process that shows you some stuff, but it doesn't have direct access to every single material you have in the scene. Meaning that if you have some weird UV mapping, triplanar etc, it won't account for that. With this texture you can visualize exactly what a specific texture slot is doing in your specific material instance, in your specific mesh :)
@@VisualTechArtYou create one DDS file for each typical screen resolution and try to approximate when there are more texels than what can be rendered by the screen (for example a 4K texture at MIP map level 0 being rendered in 1080p looks the same as a 2K texture in the worst case of a flat surface in front of the screen or even less in any other case).
Can you automate this whole process like mipmap creation automatically for any texture like really go through and see how much of this you can automate make it closer to unreal engine... nanite but for textures
Not sure I understood, the MIPS are already automatically created and used by the Engine when you import a texture in!
@@VisualTechArt I meant for your addon in blemder
Ok, ideas requested: use one of your mips that you aren't using for channel packing crap you don't have an easy way to bring in without an extra texture sample. Then be like skip this mip for doing stuff but grab this mip for your opacity mask or metallic or ao or whatever map you didn't have room for.
Man.. I've dreamed of using MipMaps this way but I could never find a way to sample that way (with my.. somewhat limited shader knowledge).
i use 256 usually.... for big bosses 512 thats all, i think i dont need that, but its still awesome for non ps2 projects xD
Just wondering - You show the Mip Bias, but does "Maximum Texture Size" (I forget the exact name) also scrap the higher resolution mips when building? We've been using this to set a maximum size lower than the imported texture size, but now I'm wondering if it's actually a good thing to do?
I think they should have a similar effect :)
Try it out with his texture, that's my plan.
Same question! I guess changing the Mip Bias is easier to do fi you apply different ones on different Scalability settings.
why do you want to make the mipmaps manually? and why don't use just virtual texture that perform already very good on current a hardware?
The point of the video was to show you that you have a way to know exactly the resolution of the texture you need on a surface, and that applies to VTs too, if you create one starting from that custom MIP texture I did, so you don't risk occupying virtual pages without a real need :)
Plus, there are cases in which you need custom MIPs, because not always you want just a simple downsample at reduced screen sizes
@@VisualTechArt yes you are right, sorry for the stupid comment.
I used to work with DDS back in the days, fortunately we had a custom tool to convert regular TGA into DDS.
Ancient times! :D
Also I noticed that when you scaled the DDS in Photoshop you got an antialiasing problem on the border, I think there is an option to preserve alpha when scaling, I think.
Anyway, informative video as always.
Great stuff thanks!
I love your channel 🤗
when you say "scrap", will 4k textures when compiled to a 1k texture save on disk data, or would you still wanna replace the 4k with 1k towards the end of production?
As far I know a 4K texture with a MIP Bias of 2 will be converted to a 1K texture in the build :)
@@VisualTechArt that's so cool!
hmm well that's odd the texture is in highest quality already but i think it's the monitour or projector 4k quality no matter which circuit or components are.
does it work for TSR and other upscalers? i saw it changes value when you change resolution but TSR looks pretty much as 100% at 80%
Upscalers render the image at a lower res, so MIPS are used accordingly anyways :)
If you change dynamically the resolution then deciding what's the texture size you actually need will be a bit more tricky
@@VisualTechArt gotcha
You could do some very trippy stuff with this.
Oh what's this in the distance? An apple tree? Wrong! It's a meat sculpture!
Ahahahah definitely!
You have a 980ti? The constraints you are working on are good actually, you remember that things should run on lower end systems and there are illusionary ways to pull it off that many devs forget
Yes, I personally find much more fun to make things for much slower hardware ahahah unless I'm purely focusing on the art side :)
But to to be honest I'm really starting to feel the need for an upgrade, especially since I moved to UE5, that engine is not made to make things run faster :D
I keep saying that all the time 1K and 2K are more than sufficient. 4K textures will only hinder the systems with little to no gains in visual quality
Which game it is?
UE sample scene
this guy sounds like microsoft sam
make it for Blender too please xD
interesting
I'm sorry but there is no reason not to use 4k textures if not higher ones. Honestly, we need to stop using resolution and use PPI/DPI with 400 being the goal.
Nope, DPI are for prints, here we're looking at digital images, which have the resolution of the screen they're being rendered on :)
So we think in texel density terms, which ideally should match the closest view you can possibly have of your texture during gameplay.
And of course, if you have huge assets with bespoke textures, you're likely forced to go higher in resolution, that can be fine for a demo, for architectural visualization and so on... For games, meh, not as much if you care about performances :)
@@VisualTechArt DPI/PPI are still basically the same concept, how many dots/points/pixels per inch. Even still, if you used the "closest" idea for textures, then they would be FAR higher than 4k which is my point.
Messuring in resolution doesn't indicate quality, even 4k can be less sharp if it is on a huge screen. Hence, I go by PPI.
Spoken like a true AAA game company executive
edit for clarity:
a 4096x4096 image in 24-bit color is ≈.05gb or memory. assuming each material has 5 textures, (albedo, normal, roughness, metallic, and either a specular or height so depending on what you consider more important) one material is going to be ≈.25gb of vram. If you have 20 (an arbitrary amount, but not too many for a detailed scene) materials loaded in vram, it’ll be about 5.03 GIGABYTES of your vram from just the material textures.
(i believe all the math is right here, but i might’ve slipped up somewhere)
@@compilererror2836 How even? A crappy AAA exec would want the cheapest crap, not 4k.
So basicly this won't work for AMD users? :(
I didn't get that impression, just that maybe you can't make your own, but neither can peasants like me who live outside the fiefdom of lord photoshop.
Sadly you need Cuda for that plugin :( Maybe there are other tools I'm not aware of
Just like most other gpu related stuff, it is what it is 🤷♂️
@@wpwscience4027You absolutely can do this with GIMP. It comes with a dds plugin that can import mipmaps as layers, which then can be edited separately and then exported again with the setting "Use existing mipmaps".