View Full Version : mia_material_roundc - cutout opacity
djx 12 December 2006, 03:07 AM Im trying to get a cleaner looking edge on a hole made with mapping the mia_material_roundC shader's cutout opacity with a file texture. It looks like a sampling problem, but I havent been able to fix it so far. Any ideas?
http://www.animagrafx.com.au/clients/david/miaCutoutProblem.jpg
|
|
djx
12 December 2006, 01:43 PM
I think I figured out a few things. Maybe this will help someone else - or maybe you can correct me if I got it wrong. Mostly it was trial and error.
I wanted to map the Cutout Opacity attribute with a file texture to cut out holes in the surface (not like glass windows, but empty holes).
http://djx.com.au/cgtalk/cutOutOpacityTest00.jpg
Notice the jagged looking hole edge, even though this was rendered at production quality.
I discovered that if I set the fileTexture filter type to "off", then the edge becomes nice and smooth. (Its still not perfect if you get it close, but certainly usable)
http://djx.com.au/cgtalk/cutOutOpacityTest01.jpg
Well that file texture was an anti-aliassed solid black shape on a white bgnd. Next I tried a blurred version (blurred in photoshop). Now I get a wierd shading at the edge of the hole (even with filter=off).
http://djx.com.au/cgtalk/cutOutOpacityTest02.jpg
But if I turn off reflectivety it looks correct.
http://djx.com.au/cgtalk/cutOutOpacityTest03.jpg
So my conclusion so far is that reflection only works correctly with solid black or white values for cutout opacity. Greys cause problems. Maya's file-texture filtering creates problems, because it introduces more grey-values.
(I havent tried refraction yet).
Another discovery was that shadows ignore the cutout opacity holes inless you add a shadow shader. And for this sphere I would need a shadow trace depth of 3 for shadows to work correctly.
http://djx.com.au/cgtalk/cutOutOpacityTest04.jpg
Ok thats it for now.
Exo7
12 December 2006, 03:47 PM
When it comes to use maya render nodes with mental ray, most of the time you will want to set filter to 0 and use filter offset instead.
djx
12 December 2006, 12:59 PM
(Its not like Im obsessed or anything)
Mapping cutout opacity on a mia_material results in reflection problems for mid range opacity, which can be seen in this example where I have a used a blurred polka-dot fileTexture to cut holes in a sphere...
http://djx.com.au/cgtalk/cutOutOpacityTestC00.jpg
A better way to do this is to use the mib_opacity shader instead, as you can see here...
http://djx.com.au/cgtalk/cutOutOpacityTestC01.jpg
And then fileTexture filtering also works with no jaggy artifacts (although I agree with Exo7 that alot of the time you would probably turn off filtering - for one thing its faster).
Here's an example with an un-blurred polka-dot fileTexture using quartic filtering=1
http://djx.com.au/cgtalk/cutOutOpacityTestC02.jpg
MasterZap
01 January 2007, 03:10 PM
Thanks for reporting this, seems to be a bug.
It would be good if you could officialy report it at the Autodesk bug report page.
/Z
CGTalk Moderation
01 January 2007, 03:10 PM
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.