PDA

View Full Version : Help needed using the mip_render_subset shader effectively


LinchpinZA
03-10-2009, 03:23 PM
Hello everyone :)


I was wondering if any great mental ray minds out there could help me with this little problem.

I have managed to get the mip_render_subset shader working perfectly in my lens shader stack allowing me to separately render out the objects I need on a black background.
So the shader is working 100% no problems there.

The problem I'm having is to do with the premultiplying that's happening between the edges of my separately rendered objects and the background color of the mip_render_subset shader.

The edges of the objects now rendered out separately are premultiplied with a 'hidden' alpha on the black background color in the mip_render_subset shader attributes , which makes it tough to re-composite on top of my original render as there are traces of black within the anti-aliasing part of the newly rendered objects.

Obviously the next step was to try render out an un-premultiplied version along with the alpha of just those mip_render_subset objects and composite it using an over operation, multiplying the un-premultiplied render by its alpha. This would eliminate any traces of black in the anti-aliasing. However this doesn't seem possible.

Un-ticking the premultiply option in the render globals had no effect on the objects because it seems the mip_render_subset shader's alpha it uses is hidden from the user and you get the same pre-multiplied result whether premultiply is enabled or disabled in your render globals.

Is there a way to un-premultiply the render that the mip_render_subset shader creates? Is there maybe another shader that I can use to do this or is there something I'm misunderstanding with the mip_render_subset shader?

Any help will be greatly appreciated :bowdown:

-Chris.

Eshta
01-05-2010, 04:37 PM
Did you find a way for this ?

CGTalk Moderation
01-05-2010, 04:37 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.