PDA

View Full Version : Mentalray Fixing Antialiasing, Flickering, and Making Images Crisp


Jadetiger
12-09-2009, 02:00 PM
This is probably rendering 101, but I've been having trouble with the quality of my renders lately. Sometimes I'm working on a project that will not allow me the luxury of time to crank up things like Final Gather rays, filters, diffuse bounces, Samples, etc. Lately I've found that I can not get the texture quality and model detail I want unless I do almost all of the following: Sampling Min 0 Max 2, Alpha Contrast .01, Filter Mitchell, Final Gather Filter 1. Doing this drastically bumps the render time and I don't have the fastest to work with. So I guess my question is, in a render with fine model details and textures with a very fine bump (asphalt), especially if the camera or objects are moving in the scene, how do you keep those details from flickering and constantly crisp without drastically bumping up render time? Thanks in advance!

Undseth
12-09-2009, 02:20 PM
Why do you write "Sampling Min 0 Max 2, Alpha Contrast .01"? Was this a typo, or was there a reason for pointing out the alpha contrast only?

Jadetiger
12-09-2009, 02:23 PM
Sorry, I mean Color and Alpha Contrast .01. Its one of the ways I can get the detail and textures to show up better.

Undseth
12-09-2009, 02:37 PM
I think that for the "crispness", the choice of sampling filter is most important. And then, not only is the sampling filter type important, the filter size by x and y value is important too.

A "gauss" sampling filter has a default filter size of 3x3, but then things look blurred. Setting it to 2x2 looks sharper. I suppose that one shouldn't just use any values. Values like 2.123 and 2.123 might work, but I don't know how much sense it is to use decimal numbers.

default box = 1x1
default triangle = 2x2
default gauss = 3x3 <- usually looking too blurred
default mitchell = 4x4
default lanczos = 4x4 <- usually looking too sharp

The various sampling filters has different default x & y values.

Sampling contrast can afaik be set for rendering both the rgb and alpha channel (might be different with maya versions). If you don't need the alpha, I think you can set alpha contrast to 1.00 and maybe save rendertime.

Best quality from using sampling level 0 (min) and 2 (max), can be had by lowering the sampling contrast values. With the lowest value of 0.01, things should look the best this way, but might not be worth the extra time used for rendering.

To improve antialiasing around straight edges, enabling "jitter" will improve the antialiasing.''

glxtrix
12-09-2009, 02:42 PM
In addition to what was stated above....don't forget to check that the filtering on the texture file itself is turned off. Maya by default filters a file texture.

Undseth
12-09-2009, 02:45 PM
I never figured it out, because im lazy, but if you render with a file-texture on a material, I think you might want to set texture filtering to "none" to get it to show sharper.

Might have something to do with the original size of the texture, in relation to how large that texture look when seen rendered in render view window.

Supposedly there are options for dealing with flickering when using final gather, but I don't know much about that.

Undseth
12-09-2009, 02:52 PM
Another thing. I almost dont dare talking about gamma adjustments, but I think that antialising might improve if one used the framebuffer gamma setting in therender globals, instead of the various gamma adjustments on each texture.

I can't explain why this seem to be. Seems like the contrast in the image is greater. A rendered thin wire would look sharper and appear a bit thicker afaik.

About movies and post production, it would be fun to learn how they deal with antialising. Maybe they get nicer antialising by scaling the final rendering abit down or perhaps up?

Also I wonder if rendering a highly detailed polygonmodel might be hard to get to look right at a certain distance, if things get too small or loose contrast.

Jadetiger
12-09-2009, 05:33 PM
Thankyou so much for your feedback. Framebuffer is actually one of those things I've never used before. I'll have to look up some more info on it.

As far as the texture filters go, I have noticed that they do look sharper without a filter, but there was also a downside to that, and I can't for the life of me remember what it is at the moment. ^^, I will give it a try though and see if that improves.

crispy4004
12-09-2009, 05:34 PM
So you need a solution that doesn't flicker, gives good results relative to the time spent, and doesn't require lots of waiting for renders? Yep, you just described some of the benefits to using proper render passes and compositing.

Look at the Deex tool thread (http://forums.cgsociety.org/showthread.php?f=87&t=828928) . On top of that we also have the solution (http://img517.imageshack.us/img517/5528/render2b.jpg) to FG flickering problems in the works, that is if you are willing to sacrifice multiple diffuse bounces and the material color contribution to the indirect light. Well worth it in my opinion.

karakistou
12-10-2009, 08:40 AM
Setting textures filters to none will give you flickering textures if your camera is moving.

You can change the value of the texture filtering in the Attribute editor of your file node, in the Effect part. It will control the "max blur" of the texture.

From what I read, the best filtering for textures is the elliptical. It allows the textures to be sharp where it has to be sharp, and blurred nicely to avoid flickering. To use it, change the filter to mipmap, then, in the mental ray part of your file node, you can turn the elliptical filtering on.
When you use it, the value in the Effects part is not used anymore (afaik). You control it with the value in the mental ray part.

CGTalk Moderation
12-10-2009, 08:40 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.