View Full Version : Renderman Glass Shader

01 January 2011, 04:20 PM
I am trying to render a bottle of rum for my short film. I am using raytrace shadows to achieve this affect and I am using refraction. With or without refraction the render time for one bottle is two minutes. This would be reasonable usually but I have to render a pile of bottles for my opening shot, I mean a lot of bottles. Its a nice shot so I really would like the stuff to look like glass I just can't seem to get renderman to be reasonable with the render times on transparent objects.

Does anyone know their way around Renderman. There really isn't much documentation out there regarding this stuff and if I reduce the shading rate anymore on the object the bottle will look like plastic. I am required to use Renderman for this project and my renders shouldn't exceed any longer then 10 minutes per frame.

If I could use Mental Ray I would but we don't have access to it here on the render farm.

Thank you in advance guys, I hope to get this issue solved so I can actually get my piece rendered in time.

01 January 2011, 06:24 PM
Ooooh ouch. Is there really no way you can use another renderer? If it was just a single bottle there are effective cheats you can do to fake the refraction as a post-process, but for a pile of bottles like that it's not so easy.

I think you're going to have to forget about refraction because there is no way prman is going to raytrace that in under 10 minutes a frame.

So. First things first. Lighting. Find a nice HDRI to reflect. There are some few studio HDRIs out there on the internet (there a several links on this forum and others). Reflections are going to be your friend here.

You want to setup a shader for the bottle that has a dark brown diffuse color, has a mirror-like specular reflection, and its opacity is controlled by fresnel with an IOR of about 1.5. Remap the fresnel so the lowest point is more opaque (so you don't see through the bottle as much).

Find a nice camera angle on your bottle pile. Low down with a wide angle lens would probably be a good idea. Stick your hdri in an environment light and rotate it round the scene until you find some cool-looking reflections. Make sure to attenuate with reflection occlusion.

When you have a pattern of reflections you like, add some diffuse-only spotlights to match the light sources in the hdri.

Job done.

01 January 2011, 02:34 AM
You might also want to try using 2 different shaders for the bottles. One with refractions ON for the bottles immediately visible on the front and another without refractions for the bottles which are behind other bottles. Even if this is not physically correct you might be able to get away with it without having to full-on refract every single bottle. You could also consider using deep shadow maps since your shadow ray limit would have to be pretty high to actually penetrate all those bottles.

Good luck!

CGTalk Moderation
01 January 2011, 02:34 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.