• About us
  • Contact Us
  • Terms and Conditions
  • Forum
  • Materials
  • Shaders
  • Tools
  • Video
  • Learn
  • Gallery
My Mental Ray

Navigation

  • Main Page
  • Cookbook

MYMR WIKI Tools

  • Creating pages
  • Markup n styles
  • Page protection
  • Help

 

Toolbox

  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Article    Discussion    View source    History   
Personal tools
  • Log in / create account

Anti-aliasing

From Wiki

Jump to: navigation , search

You are here: mental ray cookbook / anti-aliasing

some advise on sampling parameters

The min and max spinners control super sampling. Set the min spinner to something like 1/4 and max to 4. Set the spatial contrast to say 0.05 for r g b and a and render. If its too noisy set the spatial contrast to 0.03 and render again. If that doesn't cut it, try using the Gauss filter instead of the default Box. If its still noisy, only then should you bump the Max spinner up to 16 and render again.

The reason why adjusting the Max spinner upwards should be your last resort is that it can affect rendering time exponentially. Always adjust the spatial contrast first. Spatial contrast acts as the threshold value where Mental Ray decides to sample a pixel in more detail. By adjust the contrast to a lower value you effectively force Mental Ray into sampling a pixel in more detail. Sampling a pixel more than once like this is called supersampling.

how to use mental ray's elliptical filtering

First, you need to unhide a couple of (unsupported) MR shaders from base.mi in the mentalray subdirectory to get this to work:

  • Texture Filter Lookup (this loads the texture and does the elliptical filtering)
  • Texture Remap (this modifies texture coordinates: tiling, offsets etc.); not strictly necessary but good for showing off the filtering
  • Texture Vector (this creates a texture coordinate space from UV coordinates)

Then you need to build a shader tree from those:

  1. Create a 'mental ray' material
  2. In the 'Surface' slot, insert a 'Texture Filter Lookup' shader
  3. In that shader #2, set 'tex' to the bitmap file you want to use
  4. Still in shader #2 (Texture Filter Lookup), insert a Texture Remap shader into the coord slot
  5. In the Texture Remap shader, insert a Texture Vector shader into input
  6. Leave all the values of Texture Vector at zero but set project to 2 (in order to use UV coordinates)
  7. Go one up, back to Texture Remap shader and adjust the repeat value. (note: this seems to require a vector input, so you can't just enter a single number; but you can insert an Output map and set it to 40)
  8. Go up one level, to Texture Filter Lookup and drag the Texture Remap shader from the coord slot into the remap slot and create an instance-copy of it.

Now you can create a plane and apply that material to it and render.


External links

  • Mental Ray Sampling
Retrieved from "http://mymentalray.com/wiki/index.php/Anti-aliasing"
Copyright © 2008 My Mental Ray Community. All Rights Reserved.
No part of this website may be reproduced unless for personal use without prior written permission from The My Mental Ray Community.