Can I control mipmapping distance via material editor?

I went out and shot some wonderful grass foliage textures and I’m trying to implement them as photo-real as possible, but I’m running into mipmapping(which I admittedly don’t know a lot about) and it’s breaking the immersion completely.
I have made a video previewing my grass without mipmaps below. I am looking for a way to adjust the distance at which these mipmaps are visible so I don’t wind up with blocky thick grass up close like the image I have posted.

http://i.imgur.com/M97Rgsg.png

2 Likes

You can select the texture sample in the material editor and change the mip setting to either “Mip Bias” or “Mip Level”. ‘Mip bias’ lets you bias the existing mip values and ‘mip level’ lets you set it explicitly, such as with the “compute mip level” function. Note that when using ‘compute mip level’ you will get bilinear and not anisotropic mip mapping.

Looking at your above image though, I feel like there may be something else going on. What resolution is your texture? Have you tried different settings for the mip mapping in the texture settings (ie various levels of sharpen).

Is your texture square?

Thanks! I feel like I should have known to check there, but I wound up checking just about everywhere else.
I took some screenshots of the values after changing them in my TextureSample details.

This is with “None, use computed mip level”

http://i.imgur.com/sg6KT8d.jpg

Here is with Mip Bias “Relative to the computed mip level”

http://i.imgur.com/287ajoq.jpg

Here is with “Mip Level” with mip level set to 0

http://i.imgur.com/dHRJSnG.jpg

The texture is square and is 4096x
I have a picture of my texture Mip settings as well. I am using settings someone recommended on the forums, though I did test it with all the other mip options before just leaving it on this one.

http://i.imgur.com/IVMB3UM.png

Thanks for pointing out where I can change it within the material. Mip Level provides the best results, but that’s also because I have it at 0 using full resolution. I’d like to have a function that somehow lets me keep it using mip level 0 until 10 or so meters away and then switches to a lower set of mips the farther you get away as normal. Is this something that is feasible now that I have the level input exposed on my texture sample parameter? I feel like it should have to do with utilizing the scene depth, but I’m unsure where I would start with that.

(EDIT) I’ve managed to come across a decent solution to covering up the mip distance look using SSS and a strange shading method lol. I’ve also swtiched to using mip bias on -1

Glad you got something that works. If you want to try a more literal control of mip values you could try using “Camera Depth Fade” and then use a lerp node to control the gradient. By using the start offset input you could push out mip 0 to be as far as you like. Probably should do log2(x) or something on that linear result to get closer to the results of real mip maps.

Hello again! This is a little bit of a necro, but I’m revisiting the issue as my workaround wasn’t permanent and wanted to approach it the way you suggested in your last comment. However I’m left confused because can’t only translucent materials utilize depth fade? I tried looking for a “Camera Depth Fade” node and nothing popped up. I may be daft and just not yet fully understand what was said. This is entirely possible. lol.

Any further explanation would be greatly appreciated. :slight_smile:

edit-

I’ve created something as follows to mimic it. Not entirely certain if this is what you meant, but it’s working to an extent in the material viewport.

edit again! solved. I was being a dork and needed to freshen up on my material editor knowledge a little!

http://i.imgur.com/wIkk8gY.png

Hi! Does this solution works with foliage as well? Object position gives me the foliage actor’s position, not the individual grass instances’.

Edit: Just for being sure I checked the Depth fade node and it actually works with masked materials as well.

Thanks,
Fisher

know this is old but this is what your looking for

1 Like