File Filtering?


#1

What is with File node? Rendering with mental ray.
None of the filters work? They just show mad artefacts, but no filtering.
Mipmap or gauss or any other, there is no difference on switching any.
Filter value - makes no difference…
What I’m missing here? The node acts nothing like it used to… eg nothing works or makes any difference.

Thanks

Als


#2

[EDIT:] Look here: http://elementalray.wordpress.com/2012/04/17/texture-publishing-to-mental-ray/

Works fine for me.

Artifacts? Should introduce a blur over distance.

Mine work correctly in 2012 and 2013.


#3

I found that hard to believe.
I’m not use MR texture node, but “old” maya FILE node.
None of the filters work, I’m using map file format converted with -p option.
But I also see that different file formats have different artefacts, not to mention hell with alpha.
In this case the image rendered looks pixelated and changing values just makes it worse.
What file formats are you using?

Thanks

Als


#4

I found that hard to believe.

Not sure what I can gain from lying about it. :slight_smile:

I used different file types but not .map

Instead of .map I favor tiled EXR. You can generate tiled (cached) mipmapped EXR with exrmaketiled from OpenEXR (preferred) or with imf_copy (comes with Maya)

It will provide you with superior filtering and memory management, especially in 3.10


#5

Maya file-node filters work fine in Maya 2009 and 2012. I skipped the other two, so I couldn’t say. But I use them every day in Maya 2012, generally hi-res .jpg files but also .exrs when I can. Usually a mipmap filter at .2, and for bumps quadratic is usually good enough unless I need more detail. I’ve never used mental ray’s file node.


#6

Ignore my previous post. And I had a really snarky “you need to upgrade your internal Believer OS” comment all prepared for you, Als!

Quick test, perhaps it’s invalid but in the past this is how one could easily discern…

Mipmap, .2 filter strength:

Quadratic filter, at 1.0 strength:

Gaussian, at 1.0 strength:

There are no perceivable differences between any of the three. Quick Difference in Photoshop:

Took me a moment to realize there was anything there at all. Quick auto-Contrast:

So only the edge aliasing is affected at all by file-node filtering here, in Maya 2012. I am pretty sure this was working in 2009, but can’t test it currently. I’ll test it on Monday.

I did not alter the edge antialiasing or render settings at all between these three. In the past, Quadratic filtering (default) on the file node would produce a slightly blurry image, thus the need for Mipmap .2 strength. It’s been a preset of mine since 2009, the only preset for file nodes I’ve ever made really.

Nice to know it’s no longer necessary, I guess? (laughs not-bitterly!)


#7

I think most of the filter types on texture nodes don’t work with mental ray and were intended for the maya software renderer


#8

Seems alright to me. Out of room on CGTalk, get one here:

http://dl.dropbox.com/u/18209814/filter.zip

None and Quartic. Gaussian also applies a blur for me.

Are you rendering through a image filter as well?

Also, for best filtering you can use the dynamic attributes for miFilter. That’s next on the blog.


#9

No effect, so value doesn’t make any difference.
I’m using texture bigger then maya can take, so that’s why it’s map file format.
But if I use maya file node, the filter results are weird.
Is there a warning about this somewhere in the manuals I’ve missed?
I’ve also tried elliptic options under mipmap filter, and that didn’t make any difference.
Nobody uses these options at all, or everyone switches the filter off?
Any notes about this in manuals? Didn’t see any? Blogs?

Thanks

Als


#10

Actually working on the blog post now but might be a couple days to get it online (has to get verified, hate posting something wrong)

There are dynamic attributes to use on the Maya file node that are mental ray specific we’ll talk about.

Are you going to be using Maya 2012 or 2013 mostly? (2013 has a better imf_copy tool. . .maybe can grab it from someone.)


#11

I’m not sure then how to explain then why there’s no difference in the file texture’s quality at all, in my example renders? In the past, the various filtering types rendered very obviously different - you didn’t really have to even run a difference layer to see how obviously blurrier the quadratic was from none, mipmap, etc.

…so back to testing! Turns out, my file itself wasn’t that weird I guess, or troublesome to render. I tested with file filtering off, which looks like this:

As opposed to Quadratic at 1.0:

Again, not helpful unless you’re scrubbing in Render View, which was visibly crisper off as opposed to the Quadratic default filtering, but the difference between the two (with a quick autoContrast):

So the filtering is clearly working, there just wasn’t enough of a difference between the various types with this texture and scene setup to be clear before. My test wasn’t great, but shows that file filtering is indeed working in Maya 2012.


#12

Elliptical filtered (requires mipmapped)

http://dl.dropbox.com/u/18209814/ellipticalmipmapped.jpeg

Best option


#13

As promised: http://elementalray.wordpress.com/2012/04/17/texture-publishing-to-mental-ray/


#14

You just changed my life again, and my workflow. Many questions abound, but I’ll give it a spin for a week and see what I can learn before hounding you again! I’ve read (heard) you talk about elliptical filtering many times, but the concept of “publishing” or readying image files beforehand has severely eluded me. Most of my textures in Maya are .jpgs due to my budget memory constraints, but your method would either mitigate or bypass such constraints outright and obviously eliminate .jpg artifacts a great deal. Your blog also explains why we saw little difference in my previous render tests, and explains why they weren’t great as a test really as well. Thanks a ton for clearing the mysteries up!


#15

I reposted as a main thread on the forum too. You will find that with tiled EXRs you should be able to render with a large number of textures without sacrificing too much memory, in fact, you can give it a texture memory limit where it will swap out the texture cache as needed without going above.

This has been available for awhile with tiled EXRs and mental ray but was improved for more control and performance in 3.9 and 3.10

:applause:


#16

Well, I would say doing something, but working?
Do me a favour and get that camera closer, much closer, and then enjoy the show.

Al


#17

Great, when I grab a bit of time, I’ll do some tests to prove the points I’m making,
but thanks for detailed suggestions in workflow.

I’m suggesting to add to your great tutorial:

  • which options to use when saving tif from photoshop?
    “If using a pre-mipmapped image (which you should be)” - so how to make pre mip-mapped image and what this really means?

Al


#18

Please get closer with the camera. Also duplicate image plane and move it under slightly, render again…
Enjoy the show.

AL


#19

“If using a pre-mipmapped image (which you should be)” - so how to make pre mip-mapped image and what this really means?

By that we mean the part where we explain the imf_copy utility. It’s in the post as code.

imf_copy -r -p -k zip working_texture.tif published_texture.exr

#20

Oh, I’m not disagreeing with you at all, Als. My tests were just tests; as it stands, that image is not suitable for testing filtering really. That is to say, it’s too clean/hi-res to show the artifacting and problems both of us are seeing with other images. I should do the same test with three or four different images entirely, different types from different sources. And then I think we’d see a bit more action.

But at the same time, Bitter’s introduced the concept of publishing textures for superior quality and speed at rendertime. So the file-node filters we’re working with are basically obsolete, if you’re rendering with mental ray. Currently, I kinda this but “publish” to .jpg usually from within Photoshop; one image file for each map I need, such as cutout opacity, bump, spec, etc. I’d still have to do this using mipmapped tiled .exr files, but if this extra step of publishing to .exr instead of saving to .jpg saves any rendertime or increases quality at all, using elliptical filtering, then it will be worth it.

@ Bitter: What do the tiled .exr files look like in the RenderView? Would I also perhaps need to still save my .jpgs as well, apply them to my Maya base shaders for Viewport accuracy, then just link in the tiled .exr files into my overriding mia_materials for rendertime usage?

This wouldn’t be a horrible thing, just curious if you can see tiled .exr files in the Viewport and stuff.