Tutorial: transparency
By olivS, dimanche 26 décembre 2004 à 20:15 :: Blender tutorials :: #7 :: rss :: PDF
Transparency and light refraction within a transparent material are key parameters in order to get a realistic rendering of a material like solid glass. This tutorial doesn't help with getting caustic spots, which is beyond the reach of the actual version of Blender (v2.36) without using an external renderer like Yafray.
File(s) Attached :
- No file available for download
For Blender: 2.32 - Version française disponible(
)
Preliminaries
As well as anything related to raytracing with Blender, because of the supplementary calculus time required by your computer, raytracing is only an option that you should feel free to activate and deactivate. This is done by the mean of the Scene menu (F10 key). The Render tab shows a button labeled Ray you will have to activate in order to use raytracing in your pictures.

Setting transparency
In the Shading menu (F5 key), you can define the color of your object within the Material tab thanks to four components; three of these components are for color (R, G, B resp. stand for Red, Green and Blue), and the last one is a component of transparency (A stands for Alpha). As with the color components, the transparency is set through the use of a slider, its value going from 0.000 (object totally invisible) to 1.000 (object totally visible). In other words, with an Alpha value of 0.250, at the point of observation, the object will have a mix of 75% [(1-Alpha) x 100 %] of the color of the background, and 25% [Alpha x 100 %] only of its own color.

Such a render will give you a ghostly material, which will be not enough if you want to achieve the same kind of results as a transparent material, like glass, that has a thickness and a density. In this case, it's the color of the background (defined in the World menu) which will be mixed with the color of the object, and not the colors of the other objects located behind the transparent object. The following picture clearly shows this kind of transparency, which is probably not the one you are after.

In order to correct this, we will jump to the Mirror Transp tab and simply activate the Ray Transp button. From now, the sphere will show the objects located behind it, and no more the background from the World menu.


Depth
This button lets you set the "depth" of the transparency, that is, the number of transparent surfaces "hidden" behind each other, and that will be effectively rendered as transparent materials. The transparent materials in excess of this treshold will be rendered plain and solid, according to their base shader.

Fresnel, Fac
By default, the material is rendered with a transparency level even on all its surface. By increasing the Fresnel value, you can artificially make the material more plain and solid on the outer edges, and using the Fac button, you can intensify the Fresnel effect.

Light refraction
You certainly have been surprised when looking through a drinking glass (or any other glass object, with curved surfaces) and when you saw a distortion of the objects located in the background of it. In fact, with transparent objects, like glass, the path of the light is no more linear, but is deviated according to the curvature of the object and its density. This phenomenon is called light refraction. You can simply reproduce it by activating, in the Mirror Transp tab, the Ray Transp button and by giving to the IOR slider (Index of Refraction) a value greater than 1.00 (1.50 in our example picture).

Of course, choosing the good value for the Index of Refraction is not easy, but you are not condamned to rely only on your artistic choice. There are many documents containing whole lists of materials with their associated IOR, based on the density of the material. One of these lists could be find on the following link: http://www.3d-designer.dk/resource/ior.html (thanks Modron for the link!). Here's a short abstract from it, with some common values.
Air 1.0002926
Alcohol 1.329
Amber 1.546
Amethyst 1.544
Diamond 2.417
Emerald 1.576
Glass 1.51714
Oxygen (gas) 1.000276
Oxygen (liq) 1.221
Plastic 1.460
Plexiglas 1.50
Quartz 1.544
Topaz 1.620
Turquoise 1.610
Water (gas) 1.000261
Water 100'C 1.31819
Water 20'C 1.33335
Water 35'C (Room temp) 1.33157
Shadows of tranparent objects::
Now we will delete the former texture from the ground, and locate the light source elsewhere so that we could watch the shadows of the objects in the foreground. We can see that the two objects, the solid crate as well as the transparent sphere, have solid shadows, while by carefully watching the shadow of a drinking glass, we can easily see that its shadow should be less solid.

Blender can easily take into account the transparency of the material during the rendering process of the shadow (and even give the shadow a hue according to the color of the object). To do that, you will have to update the shader of the object that should receive the semi-transparent shadow, and leave alone the shader of the object emitting the shadow (this is the only not obvious part of the tutorial). So we have to select the ground of our scene, then to jump to the Shading menu (F5 key) and its Shaders tab. We activate the TraShado button and then we can see the difference between the shadows of our two objects.










Comments
1. On vendredi 28 janvier 2005 à 03:29, by Angry!
2. On vendredi 28 janvier 2005 à 12:06, by OlivS
3. On dimanche 30 janvier 2005 à 03:49, by DedKnightmare
4. On jeudi 3 février 2005 à 10:50, by complex
5. On jeudi 3 février 2005 à 17:04, by Graphics Newbie
6. On dimanche 13 février 2005 à 15:01, by Andrecito
7. On jeudi 17 février 2005 à 18:28, by Kai
8. On vendredi 18 février 2005 à 10:20, by olivS
9. On vendredi 25 février 2005 à 10:03, by Hugues
10. On dimanche 13 mars 2005 à 22:22, by emagist
11. On dimanche 13 mars 2005 à 22:28, by emagist
12. On lundi 14 mars 2005 à 09:20, by olivS
13. On lundi 14 mars 2005 à 11:26, by woja
14. On mercredi 16 mars 2005 à 00:06, by emagist
15. On dimanche 20 mars 2005 à 20:51, by doctor faustus
16. On dimanche 10 avril 2005 à 15:57, by Sphynx
17. On mercredi 4 mai 2005 à 13:08, by Tiggs
18. On mardi 21 juin 2005 à 19:02, by Blurr
19. On mercredi 22 juin 2005 à 06:07, by LoneStar
20. On vendredi 24 juin 2005 à 23:58, by Felipe
21. On mardi 28 juin 2005 à 20:15, by !Rocky
22. On lundi 25 juillet 2005 à 19:36, by yves
23. On mardi 2 août 2005 à 07:05, by Fang
24. On jeudi 1 septembre 2005 à 14:59, by Green Rabbit
25. On vendredi 2 septembre 2005 à 12:27, by olivs
26. On mardi 20 septembre 2005 à 13:43, by DezaTur
27. On jeudi 29 septembre 2005 à 07:57, by Servs
28. On vendredi 30 septembre 2005 à 05:16, by Jing Li
29. On samedi 29 octobre 2005 à 00:01, by Kamran
30. On jeudi 24 novembre 2005 à 03:51, by D_structorr
31. On samedi 26 novembre 2005 à 08:04, by Craigo
32. On lundi 5 décembre 2005 à 05:47, by Seferis
33. On vendredi 16 décembre 2005 à 17:41, by Chad
34. On vendredi 30 décembre 2005 à 00:04, by Irony
35. On mercredi 1 mars 2006 à 01:58, by kurt
36. On jeudi 16 mars 2006 à 04:19, by Shar
37. On lundi 20 mars 2006 à 04:17, by erehwon
38. On lundi 3 avril 2006 à 17:36, by james
39. On mardi 4 avril 2006 à 08:18, by olivS
40. On jeudi 6 avril 2006 à 12:56, by jon
41. On mercredi 3 mai 2006 à 19:50, by djaquay
42. On jeudi 16 novembre 2006 à 19:29, by dpetty43
43. On jeudi 14 décembre 2006 à 19:24, by Lucid
44. On samedi 23 décembre 2006 à 14:00, by vr@ude
45. On dimanche 25 février 2007 à 16:18, by matt
46. On mardi 20 mars 2007 à 23:24, by teeloke
47. On jeudi 12 avril 2007 à 02:39, by Neopraxus
48. On dimanche 15 avril 2007 à 19:47, by the kid
49. On mercredi 18 avril 2007 à 21:26, by olivS
50. On samedi 12 mai 2007 à 15:34, by JaYbOc
51. On vendredi 22 juin 2007 à 05:31, by TheManCarl
52. On lundi 6 août 2007 à 05:46, by Nilupul
53. On jeudi 9 août 2007 à 18:59, by Shaunak
54. On mardi 4 septembre 2007 à 08:36, by Javier
55. On mercredi 7 novembre 2007 à 01:17, by coolbuddy
56. On mercredi 19 décembre 2007 à 13:04, by Treva
57. On jeudi 3 janvier 2008 à 13:12, by chapel
Réponse de olivS le samedi 5 janvier 2008 à 17:47
58. On lundi 7 janvier 2008 à 13:10, by 007
Add a comment