Making glass with p_MegaTK




Making simple glass

1. Create simple scene with sphere and light

2. Check normal direction of your glass object. p_MegaTK is sensitive to normal during computing reflect/refract.

3. Assign p_MegaTK to sphere

simple_scene
Simple Scene


4. Set following attributes in p_MegaTK shader:
      - 'Use Reflection' = On
      - 'Coefficient Reflection' = 1
      - 'Use Refraction' = On
      - 'Coefficient Refraction' = 1

And check 'Fresnel' value should be 1(by default)


5. Set appropriate IORs. For example for glass it should be 'IOR_in' = 1.5 and 'IOR_out' = 1.0

6. Open Render Settings and set followed parameters in Raytracing tab:
      - 'Reflection' = 3
      - 'Refraction' = 3
      - 'Max Trace Depth' = 5
      - 'Shadow' = 3

7. Glass have no diffuse component and we may disable 'Use Simple Diffuse' and 'Use Indirect Illumination', because it really not needed.


8. Now we'll tune Specular... For glass recommended 'Blinn' or 'Wet' specular models. Select specular likely for you (don't forget to disable 'Phong' specular, it enabled by default).

For 'Blinn' model set:
      - 'Eccentricity' = 0.05
      - 'Specular Roll Off' = 3.0

For 'Wet' model just use it with default settings

If you really don't need specular for optimize rendering you may diable all specular and diffuse models, it will slightly increase rendering speed.

9. Render...

simple_glass
Simple Glass


10. We have black solid shadow now. For getting trasparency shadow we should use shadow shader.
You may just connect p_MegaTK 'Shadow Shader' slot.
Or if you need more control for shadow you may use p_shadow_transparency shader (or any other).

simple_glass_shadow
Simple Glass with shadow shader

Shadow shader compute not physicaly correct shadow. If you need physical correct shadow you should connect Photon shader, for example dielectric_material_photon and enable Caustics.

simple_glass_men
Simple Glass Men model with shadow shader





Making combined glass


1. Create model like on image:
The model should be consist of 3 objects:

bokal_model
Glass Model


2. Check normals of you objects. Normal should be like on image:

bokal_normal_direction
Normal Direction on Glass Model


3. Create and assign p_MegaTK shader for 'yellow' object. Set followed attributes:
      - 'Use Reflection' = On
      - 'Coefficient Reflection' = 1
      - 'Use Refraction' = On
      - 'Coefficient Refraction' = 1
      - 'IOR_In' = 1.5
      - 'IOR_Out' = 1.0
      - 'Absorption In' = 0.4 0.8 0.4
      - 'Absorption Out' = 1.0 1.0 1.0

4. Create and assign p_MegaTK shader for 'red' object. Set followed attributes:
      - 'Use Reflection' = On
      - 'Coefficient Reflection' = 1
      - 'Use Refraction' = On
      - 'Coefficient Refraction' = 1
      - 'IOR_In' = 1.333
      - 'IOR_Out' = 1.0
      - 'Absorption In' = 0.8 0.24 0.33
      - 'Absorption Out' = 1.0 1.0 1.0

5. Create and assign p_MegaTK shader for 'blue' object. Set followed attributes:
      - 'Use Reflection' = On
      - 'Coefficient Reflection' = 1
      - 'Use Refraction' = On
      - 'Coefficient Refraction' = 1
      - 'IOR_In' = 1.333
      - 'IOR_Out' = 1.5
      - 'Absorption In' = 0.8 0.24 0.33
      - 'Absorption Out' = 0.4 0.8 0.4

6. Open Render Settings and set followed parameters in Raytracing tab:
      - 'Reflection' = 4
      - 'Refraction' = 5
      - 'Max Trace Depth' = 8
      - 'Shadow' = 3

7. Render...

bokal_glass_combined
Glass Render


bokal_glass_combined
Glass Render