This is the model of the wine glass modelled by Jure Bralic and UVed by me in Silo. I have exported the model out of Silo and brought it into Maya. For transparent objects like glass and liquid, which I have never textured before, I decided to bring the model into Maya first and establish the shaders first. This way I could at least see how realistic it would look without any dirt on it.
However, the renders always show up like the above images, where certain part of the model seems to be working correctly while other parts do not. The caustic patterns seemed fine, and I have played around with the shader's settings a lot, still couldn't seem to fix it.
I then quickly applied a random gold texture, to see how a texture map would react with the glass at this state. Although the texture did show up in the render, but the reflection and refraction on the glass surface itself still seems to be inaccurate.
Thus I started some in-depth research concerning rendering caustic objects. I used one of Digital Tutor's Mental Ray tutorials regarding caustics. In order to eliminate the possibility of my settings being wrong, I decided to use the model provided by the Digital Tutors.
By increasing the amount of caustic photons casted by the light, I was able to determine how sharp or blurry I'd like my caustic patterns to be.
The tutorials taught me how to stop Maya from rebuilding the 'Photon Map' while rendering. This keeps the photons that were calculated during the previous render, so Maya could save time on recalculating the photons. However, since the photons were not recalculated in each frame, this method will not work with any moving objects in the scene. Because the photons will stay at the same place even after the object has moved. But for testing the look of objects, it does safe quite a bit of time.
By playing around with the settings, I was able to achieve some very interesting results with Mental Ray's 'dielectric material'.
The tutorial taught me how to create glassy objects using both 'mia_material' and 'dielectric_material', both could create realistic caustic patterns. The also showed me how to create realistic liquid from the container itself without any particle simulations. Everything is simply done by detaching bottom half of the inner layer model and cover the top with a Nurbs surface. Like the images shown below:
The amount of 'Photon Tracing' in the render globals are also very critical in determining how many surfaces are allowed for the light to pass through, reflect or refract. Notice the refraction that is added underneath the pitcher in the second and third images shown above.
I applied a Ramp node into the photonic material shader and created this effect
Notice the artifact at the bottom of the highball glass. This is created by an unrealistic shadow calculation.
Thus I increased the number of shadows allowed in the scene, but I also need to increase the 'Ray Depth Limit' of my area light.
The tutorials then taught me how to use a 'mib_shadow_transparency' to adjust the shadows independently from the scene. This requires plugging the node into 'Shadow Shader' slot.
Now I can create a realistic colour spill on the shadows without having the need of expensive rendering and heavy ray trace calculations.
Although I followed the tutorials until this step, I realised there was some strange artifacts showing up on my renders.
Tested that this could be fixed by increasing the 'Anti Aliasing Quality' in the render globals, which drastically increase the render time however. And even with a 'Max Sample Level' of 4, a bit of the rendering artifacts are still visible on a close up of the objects.
After I finished the tutorial, I decided to bring in the wine glass into the same scene for comparison sake. However the render still turned out strangely even with the exact same shader applied.
The tutorial however did mention that when it comes to the mental ray nodes, the model itself may be a concern as well. The normals need to be facing outward for an accurate calculation of raytracing. Also all the models provided by Digital Tutors were either modled with Nurbs or Subdivision surfaces. As a result, I converted the wine glass from a polygon to nurbs. Then it starts to look normal.
With the technique I learnt from the tutorial, I created some wine in the wine glass, too.
I applied the same texture map again, now the shaders are set correctly, in order to see what it would look like. The texture gave the glass a nice layer of yellow tint, but this is not a dirty look that I am trying to achieve.
Though the reflection and refraction seem to be correct, but the colour of the wine still seems very strange no matter how I change it.
Then I decided to check if the 'Normals' of the wine itself is facing the right way. Above image is what it looks like when the normals of the wine was reversed.
However, when I changed the model from polygon to nurbs, it has removed the UV layout, which I was not aware of.
As a test, I tried to change the nurbs model back to polygon again, but it completely messed up the typology and created strange results like this when rendered.
For comparison, I kept the converted polygon model on the left, and the nurbs model in the middle and reimported the wine glass again as polygon with UVs.
I converted the new polygon wine glass into a subdivision surface model, which gave a much better result, and also kept the UVs. However, the bottom bit of the subdivision glass now looks a bit strange.
So I double checked to make sure it's not the 'Normals' that's effecting it.
Normals of the wine facing inward.
Normals of the wine facing outwards.
I moved the wine into the subdivision glass to see if it would look the same. The result was good.




































No comments:
Post a Comment