Thread: glass
View Single Post
# 4 06-12-2010 , 05:48 PM
Nilla's Avatar
Administrator
Join Date: Jun 2009
Location: Prague
Posts: 827
You're welcome 3dStudent, I made that tutorial because I had a lot of problems with glass when i started rendering in Maya. I think you've succeeded in getting glass, there's enough light in that scene and it's refracting quite well. Getting glass to look good in essence comes down to one thing which is having enough light and creating some sort of realistic reflections. It's the same for metals and any highly reflective material, you need the reflections to work and the rest after that just comes down to minor tweaks. This is why things like cars, metallic and glass objects in isolation are commonly lit with Image Based Lighting, you just need to find a good HDR probe that works. I have not been able to get glass that can compete with something that uses mia_material_x and IBL.

For refraction & reflection limits they need to be counted and they are controlled in the render settings and on the shader itself if you use something like blinn because rendering refractions & reflections takes such an incredible amount of time. I was rendering an interior scene a while back and after I added glass on the table the rendering time went from 1 to 8 minutes(!). Because your raytracing the camera shoots out rays that calculate the surface and if you have one glass in front of the other you'd need a minimum of eight and so on, I usually count surfaces while Dave likes to crank it up from the start doesn't really make a difference in most cases(we're always having childish competitons about who gets the best render in the end whatever we're lightinguser added image). When you adjust these limits there's also the trace depth which determines how far into a surface you go, if this attribute is not adjusted up as well you'll get problems of this kind where the surface is not transparent enough and you get black areas occuring in your glass. I've forgotten this myself numerous times and been sitting there trying to figure out what went wrong, so this would be my guess for why you're having problems, different types of geometry would respond differently to trace depth being set too low try adjusting it and see what happens.

For the right hand glass it looks like some sort of very strange refraction or reflection. I find that sometimes I sit around and wonder what on earth is causing a weird patch until I reallise it's a reflection. You train your eye gradually to recognize reflections, and I can't figure out where that red patch is coming from. You're using the environment chrome texture which does play tricks sometimes, disconnect it from the shader and go search for an image on google instead can be anything and connect that into the reflected color instead and see what happens.

One thing to keep in mind as well when you set a refractive index is that there isn't a fixed value, for glass it would range between 1.4 - 1.8 normally, but the best glass render I ever got in Maya software with a blinn used a IOR of 1.2 so if it doesn't look right don't be afraid to change it.

For procedural wood we have several you can download and see how they're built they'll be on the site again in two days when we get the resources section up. What you use is a ramp and blend color node on a reflective material. Because you have a poly plane there you don't need to worry about UV's so you can go to cgtextures.com and try a bitmap instead, they've got great wood textures.

Hope that helps,
Nilla