Monday 2 May 2011

Glass/ Dielectric Material

When working on Chris’s scene, which included the glass, I realized the importance of Hdri mapping as well as a sky dome. We tried to render realistic glass using a dielectric material. However, when we initially rendered the scene without a sky dome the glass appeared very dark, almost opaque. This was due to two reasons. The first was the fact that we had not created a sky dome, which would help reflect light back to the glass. In Maya when you render a scene everything outside the scene is rendered as black. So we needed some kind of surface or HDRI, which reflected some colour back. This would solve part of the issue. Another technique was to change the ray tracing values so that they could pass through multiple surfaces allowing the majority of the glass to be illuminated causing refractions of light needed for caustics.

Following some newly acquired tutorials we rectified the problem of the glass appearing opaque. However when we rendered the scene a weird oval shape appeared at the bottom of the glass, which looked very wrong indeed. I suggested that Chris change the camera angle as this issue could have been caused by the refractions within the glass at that particular angle. We rendered the scene again and this seemed to do the trick. There are a few more issues that need addressing as the render is far from perfect. However, I am confident that these minor issues can be dealt with in post. Currently there are strong reflections on the surface of the table that look unrealistic in context with the actual illumination in the scene.

When creating Chris's glass scene we wanted the shot to look as appealing and as realistic as possible. The glass material needed to have that transparent quality, while still allowing refraction to take place. We also wanted to replicate caustics, an effect that occurs in reality when light rays pass through glass and are refracted. Refraction is caused by the change in density between air and glass. This effect also causes patterns to form as the light is reflected and refracted inside the glass. Creating this effect in maya can be achieved, however, I needed some tutorials to point me in the right direction.I found a tutorial that showed me how to create a glass ornament using mia’s dialectric material that simulates the refractive qualities of thick glass which is what Chris wanted.

Although the tutorial dealt with a different shaped glass than the one we wanted to use the principles were still the same. At this point in time I was unaware of what material I should be using to create a glass material. I started out by creating a plane that would form the ground plane. I then create the simple glass ornament that was suspended by a tripod. I began following the tutorial rigorously to create the glass material. Initially I applied a blinn to the object that would eventually be the glass. I then opened up the blinns output settings and changed them to a dielectric material that would simulate glass. I rendered the scene but realised that there was no light and no caustics.

Caustics is a way in which Maya simulates the way in which light passes through a glass object and refracts onto a surface. This can be seen when a glass material is light and forms light patterns beneath the glass. To create this effect I needed to flood the scene with photons, which simulate realistic light rays that will help create the caustics effect. First I created a simple area light that will create my primary and only light source. Once the light was in place I created an additional light that would produce the photons necessary for caustics. I then configured all the necessary render settings to render the glass. I was amazed at the result. The photons simulated real refraction perfectly. If we could get the glass in our scene to look this good it would be an achievement. I did realise that the glass did not seem to reflect the white light source. An object that is reflective should show indications of where the light is coming from as bright highlights. I could not understand why this was happening. But I had an idea.

I proposed to render exactly the same scene but changing the glass material to a reflective metal of some kind. By doing this I could acquire some realistic reflections that I could lay over the glass material in Photoshop by compositing individual layers. I did three passes, which included cpolour, occlusion and reflection. Although the renders collectively consumed one day the results acquire would be more than satisfactory. I have discovered that rendering glass with GI and caustics takes considerable amounts of time to render. This is due to the way in which Maya has to do many calculations in order to simulate real lighting. It has to consider material density, reflection, and refraction as well a bounce light. All these attributed increase render time dramatically. Unfortunately I do not posses a desktop computer, which would have sped up the render process. However, the technique proved to be quite effective and the result was very impressive. I will now apply what I have learnt in this tutorial to our scene and adhering to all the necessary render settings and lighting setup to make this render work.

Below are some glass render tests as well as a render for a shot in Chris's film. I was very happy with the results as I had created some very realistic effects. Considering I had no knowledge in creating glass prior to these tests I think I have shown tremendous determination in overcoming these technical obstacles.





No comments:

Post a Comment