Monday, 25 July 2011

Day 43 -- 25/7/2011 Monday

I wanted to add reflection properties into the shader. I had advice from Steven and an intern that adding reflection will help to build a contrast and don't make the cube look flat. I carried on with the building of the shader. It took me a good 3 hours to finally fix the problem and a few ways to add the reflection. Below, I will be explaining what I did from the beginning.

First Try:
I went to add a reflective node and multiply it with the rest. This was the result.


After seeing that the black stuff at the top was a similar problem I had during the initial stage of building the shader, I apply the max node, a node which takes the higher value and use that value, also acts like constant. It's kind of remove the black stuff, but it still feels weird.




Second Try:
I seek help from JB since he had experience in shading work. He copied the "reflective-properties" nodes from mantraSurface and paste it to my shader's network. From there he tweak the necessary parameter. It took us somewhere about 40 minutes to troubleshoot. It got the reflective properties and had a blurred reflection but the rendering time was thrice as long as the first try.




Third Try:
I went back to the first try and noticed that "what if I put here instead" and hey, It works. The result was not bad, fast and clear. Instead of putting the reflection end result straight to multiply, why don't I put it in the add node. BAM!!! Nice, the result was clear and good.




Forth Try:
I after analyzing both ways of doing, I asked Charles, for opinion and was there any other ways to do it. He said that the third try was more efficient and fast and the result was quite good. I asked what if I want the blur reflection, he tried the raytrace node but was very slow and suspected that the rays entered around the corner. He also tried just a single surface model node with only reflection properties on. It was much faster and got the result I wanted.



I learned quite a lot from building this shader. I can switched between cleared reflection or blurred reflection.

No comments:

Post a Comment