View Full Version : MR Refraction Problems - Solution MR Custom Shader?
03-13-2004, 11:46 PM
i wrote a similar post on that topic some time ago. This time i set up a scene for a glass of water with grey ground and background and a half sphere for mapping reflections to the glass. I am using the dielectric material of MR so i canīt use GI_Joe this time to fake GI.
The problem is: The spehere used for reflections is fully visible in the refractions of the glass as you can see in the image below: (visible in refractions is turned off of course ;)
Someone told me i have to use mental ray environments to avoid this effect. I put a mib_lookup_spherical to the environment shader slot of the blinnSG. But here i ended up with error messages! I donīt know what to put into the tex slot of the mib_lookup_spherical.
I hope someone can help me!
Or someone could tell me a way to get nearly same results without using MR and dielectric.
03-14-2004, 10:51 AM
The MR environment will give you exactly the same results you are getting now. (The tex slot is for the environment texture file which must be created as a custom MR texture (render globals custom entities)).
Anyway you can avoid this problem by using the Ray Type shader (download from here: http://www.impresszio.hu/szabolcs/)
This will allow you to determine what each ray type will see.
For example; set up a surface shader and assign to the sphere. Plug the raytype node into the out colour of the Surface Shader. Set the eye rays colour to gray (this will be your background colour) enable the reflection ray type and connect a HDRI file (this will only be seen by reflected rays). Don't enable the refracted/transparency ray type. then render your scene and you should have what you want.
Raytype is very useful and can control lots of different parameters. Another great usage is with HDRI lighting and reflection where you can have a high res sharp HDRI for reflections and a low res blurred HDRI for final gather lighting.
03-14-2004, 04:03 PM
thank you very much. I havenīt tested it yet but i think thats exact what i need. thanx!
09-27-2005, 12:56 AM
would you have a few minutes to elborate slightly more on
"Raytype is very useful and can control lots of different parameters. Another great usage is with HDRI lighting and reflection where you can have a high res sharp HDRI for reflections and a low res blurred HDRI for final gather lighting."
as this sounds very interesting...
09-27-2005, 09:36 AM
Well, basically raytype lets you use a different shader for each ray type. In the example I gave it means that I can use a completely different colour/shader/texture for final gather and reflection. The benefit is that I can have a super hi res reflection map for good sharp reflections and a low res blurry fg map which gives better results. I can also have a different colour/shader/texture for my refraction rays. Its very simple to use with just a slot for each ray type that you can plugin to. I ssuggest you download it and try it out.
09-27-2005, 11:32 AM
Thanks, I will certainly be having a look, Ive used a similar setup in Rman, ( however most of the hardwork was done by a TD ) Thanks for pointing me in the right direction.
09-27-2005, 04:32 PM
So I downloaded the RatType shader/util. It seems to work ok in maya 7.0. I loaded the sample scene and had a look. So Ive got the basic concepts down.
What I want to try and do is have sharp raytraced reflections and a nice blurred final gather solution.
Where would I plug in a spherical hdr map? I think I can only create on IBL node in which case how do I plug the blurred version in?
does this make sense? im not sure what to map to each ray?
09-28-2005, 08:54 AM
09-28-2005, 09:15 AM
You will have to use geometry rather than the IBL node. So, create a low res poly sphere that surrounds your scene and assign a surface shader to it. Hook up a raytype node to the outcolor of the surface shader and just plug you texture files into the ray slots.
09-28-2005, 09:15 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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.