PDA

View Full Version : Texturing Workshop Part 6


leigh
07-08-2003, 04:38 PM
PHOTOREALISTIC TEXTURING FOR DUMMIES
Part 6
Translucency, Transparency and Refraction

Foreword

Sorry that it has been so long since the last Dummies tutorial, but, as many of you know, I have been very busy writing a book on texturing for LightWave. I’ve received a lot of emails asking if these Dummies articles/tutorials are going to be in that book, and the answer is…no. These little articles I write are purely for giving people a grounding and basic understanding of these texturing principles and concepts. The book I am writing is a lot more detailed and practical. A lot of people have been disappointed that I am writing a LW-specific texturing book as I received many, many requests to do a “Texturing For Dummies” type book, but when my LW book is done I want to do one on painting textures in Photoshop, so hang in there…
Well, I hope that you all enjoy this latest installment! I kinda knocked it up pretty quickly this morning when I suddenly had the urge to do something nice for the community again.
I’ll put together a PDF version of this as soon as I can.


What is Translucency

Yes, what is it? Translucency, simply put, is the ability for an object to have light travel through it, or into it to a certain degree, resulting in it appearing to be backlit (in the case of a curtain or sheet), or to appear to have some faint luminous quality of its own (as seen particularly in skin).

As we know, when light hits surfaces, it is bounced (reflected) back off the surface. Well, in the case of translucent surfaces, some of that light travels through the surface as well. This phenomenon occurs in most substances in this world, except metals and most woods.

Imagine a theatre stage with its curtains drawn. If you were to place strong lighting from the back of the stage, you would be able to discern shapes behind the curtain without actually being able to see any real details in those shapes. It’s almost as if you can see the shadowy outlines of things. That is an example of translucency, as the material that the stage curtains are made of is translucent, allowing you to be able to see shapes through it when properly lit.

Take a look at the following image. This is my own hurriedly put-together theatre simulation experience involving a bunch of Lord Of The Rings action figures and a piece of paper.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_01.jpg

This is different to transparency because the surface is not see through as such, and so you can’t actually see things in as much clarity and detail as you would when looking through glass. This is because you are predominantly seeing the shadows of those objects behind the curtains being projected onto them. If the curtains were made out of metal or wood, which are not translucent, we wouldn’t be able to see them. Apart from the shadows, you can also sometimes make out the faint colours of things through the curtains, especially if those objects are fairly close behind the curtain.

Another great example of translucency is when you shine a very strong light under your hand when it is dark, and you can make out faint details beneath the skin. This is because your skin is quite translucent.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_02.jpg

Notice how the veins appear darker in the photo, because they interrupt the travel of light through the surface. If the light was stronger, you would also be able to see the outlines of the bones, because the bones would also interrupt the light.

Using translucency in your surfaces

Okay, so now that we know what translucency is, just how do we go about making textures that make our surfaces behave in this way?

Well, one way would simply be to go to your material editor and increase its translucency amount. By default, your translucent value would be 0 in all packages, since this one is not a universal surface property. Obviously increasing this value makes your surface more and more translucent, allowing more and more light to travel through it.

Note: To my knowledge, most (if not all) of the major 3D packages have translucency included these days in their surface editors, so just look for it and you’ll find it somewhere. In the case of programs like Max that separate raytracing surfaces from normal scanline ones, you might have to look in your advanced (ray traced) surfaces panels for a translucency channel.

Simply altering this overall value can be cool for quickly establishing a decent translucency for the surface as a whole, when it is applied to a surface that doesn’t really have major variations in this surface attribute, such as really basic clothing, curtaining, flags, candles… you get the picture. Although these could have extra details added by creating an actual texture map for it, you could still get away with just altering the overall amount in these cases.

But, of course, my favourite way of using translucency is to paint a nice translucency map! Aaaah, nothing beats a nice detailed map with little veins and things in it.

Okay, so let’s imagine that you have to make a texture for a dinosaur-like creatures wing. You could paint some really cool colour maps and whatnot for it and get it looking okay, but think about it – the membranes of the wings would be pretty translucent, wouldn’t they? Well, the arm bits of the wings would be translucent too, but lets not worry too much about those in this case.
So, to make all the little veins in the translucency map so that they will show up when the light is hitting the wing from behind, we would do something like the example below.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_03.jpg

As you can see, it’s actually pretty simple. Make lighter shades of gray where you want the light to shine through nicely, and “block” the translucency by adding any darker areas, such as the veins.

I keep hearing about this thing called Sub Surface Scattering – what is it??

Okay, now onto sub surface scattering. Where we have any degree of translucency, we find the phenomenon known as sub surface scattering, more commonly referred to as SSS.
I don’t have lots of time to really go into detail about this now, but very simply put, SSS is when light rays penetrate a surface at a particular angle, and then kinda bounce around a bit inside the surface and then leave it at a different angle to that which it entered at, which causes the surface to appear as if it has some illumination of its own. Using this effect can give a lot of substance to an otherwise really flat looking surface, which is particularly useful for substances like skin, milk, wax, etc.

These days, SSS is usually implemented by using special renderers or plugins. Most of the major 3D applications have a plugin available for this, or some form of implementation.

Since I do not have any SSS plugins of my own right now, I cannot give you any examples here… boohoo. But I suggest doing a bit of research on it on your own – go to Google.com and do a search on it. There are lots of interesting articles about it on the Internet.

And that pretty much sums up the basics of translucency!

leigh
07-08-2003, 04:41 PM
Transparency

Right, we all know what transparency is, so no in depth explanations are really required here. Transparency is the quality whereby a surface is “see through”. Glass, Perspex, water (actually most liquids really), some plastics, etc are all examples of transparency in the real world.

Using transparency

Rule number one of transparency: if your surface isn’t looking correct, DON’T go and make it blue. This is something that we see all the time with beginners. When people who are new to 3D want to make glass objects, for some bizarre reason you often see them giving the surface a certain degree of transparency, and then… making it blue. Why this is, I don’t know, but don’t do it. It looks crap.

Okay, so sometimes transparent objects do have a colour of their own, but setting up colour for them often requires a bit of effort, depending on what software you are using.

Now, for starters, let’s quickly deal with transparent surfaces such as clear glass that have no colour of their own. To get the best results, take the transparency all the way to somewhere between 95% and 100% (don’t worry, your object won’t disappear) and make it a bit specular and reflective. Ideally you want to implement the Fresnel Effect into this. If you don’t know what that is, here is a quick recap from Texturing For Dummies Part 5:
The Fresnel Effect - in reality, the angle between you and the surface of the object that you are looking at affects the amount of light that is reflected and refracted that you can see. This effect is particularly important when dealing with surfaces which are transparent. For example, if you look at a lake from a far-off distance, it will appear almost completely mirror-like, yet, as you get closer, and the angle at which you are seeing the water widens, the water appears less reflective and more transparent. This is called the Fresnel Effect (pronounced "fre-nel" - the "s" is silent), an effect which gets its name from the French physicist Augustin-Jean Fresnel, who first documented it.
Remember, that in order for a reflective surface to work properly, you have to give it something to reflect. This could be an actual modeled environment around the object, or an image environment such as an HDR image. Pretty much anything that is transparent is also reflective, so setting up your reflection correctly is pretty important.

Right, all that understood? Cool, let’s continue…

Now, take the surfaces diffusion value down to 0%. This is because we don’t want any colour in this particular surface.

This should give you a decent looking glass, such as in the image below.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_04.jpg

Now, if you want to give some colour to this glass, you obviously have to give it some diffusion again. Then, give it some colour. The problem with giving colour to glass though, is that it often tends to look washed out, and unintentionally there. Ideally to get the colour looking right, you need to look at whatever special options your software has for transparent surfaces. In LW (which is what I use), we have colour tinting and colour highlights options, which work really well to make the colour stronger and more solid in transparent surfaces. Try and keep your diffuse value as low as possible to help prevent the colour from becoming washed out.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_05.jpg

leigh
07-08-2003, 04:43 PM
Right, now that we have dealt with simple examples of transparency, let’s quickly take a look at some slightly more involved ones.
Not all transparent surfaces are nice and clean and shiny and perfect like the two previous examples. Some of them can be icky and filthy. Like a window that doesn’t get washed too often. The corners of windows often tend to gather dust and grime, and if we were to create a texture for that sort of thing, we would have to somehow make sure that the grime affects the transparency of the window correctly, right? Take a look at the following image.

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_06.jpg

Pretty gross, eh? Trust me, it was like that when I moved into the place…
Okay, so if we were to recreate that in CG, and wanted to make sure that the glass texture looked right, we would have to take into account the fact that the grime on the window would affect its transparency, because logically where there are dirty areas or grime, those areas would lessen the transparency, because they are interfering with the travel of light through the transparent surfaces, just like we saw in the translucency example.

So if I was to paint a transparency map for that part of the window, it would looking something like the following image (bearing in mind that this texture map would only be applied to the glass part of the surface).

http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_07.jpg

Remember that you would make sure that all your other texture maps for this window would correspond correctly with this map. In other words, you would include the colouring for the grime in the colour map, as well as assign different diffuse and specular and bump values for it as well.

When working with transparency, it’s best to use double-sided surfaces, or to create both sides of the surface in the actual model. If you use normal one-sided polys you tend to lose all illusion of volume which ends up looking fake.

And what about refraction?

Any surface that has any amount of transparency on it, also has a level of refraction. Refraction is basically the phenomenon of light bending through surfaces. You know how when you look through a piece of glass, things appear to be slight shifted or even somewhat distorted? That is from refraction.

Take a look at the following image. Looking at the wireframe, we guess that we should technically be able to see the glass in the background through the one in the foreground, but when we look at the render, we cannot. This is because of the refraction in the glass, which causes the view through it to shift, resulting in us not being able to see the other glass.
http://leigh.cgcommunity.com/site_images/dummies/part6/pt6_08.jpg

The amount of refraction is determined by the surfaces refraction index, which is most commonly a number between 0 and 2, although some substances can exceed 2. Some common refraction indexes:

Alcohol - 1.329
Crystal - 2.00
Emerald - 1.576
Glass - 1.51714
Glass, Albite - 1.4890
Glass, Crown -1.520
Glass, Crown, Zinc - 1.517
Glass, Flint, Dense - 1.66
Glass, Flint, Heaviest - 1.89
Glass, Flint, Heavy - 1.65548
Glass, Flint, Lanthanum - 1.80
Glass, Flint, Light - 1.58038
Glass, Flint, Medium - 1.62725
Ice - 1.309
Mercury - 1.62
Plastic - 1.460
Ruby - 1.760
Water (gas) - 1.000261
Water 100'C - 1.31819
Water 20'C - 1.33335
Water 35'C (Room temp) - 1.33157

That’s all folks!

And that pretty much wraps up another chapter of Texturing For Dummies! As usual, please feel free to add your own tips and tricks and information to this thread. The other bunch of dummies threads have turned into goldmines of info so let’s keep up the tradition and make this thread a nice big hoard of information too!

elvis75k
07-08-2003, 04:52 PM
thanks :thumbsup:

CGmonkey
07-08-2003, 04:56 PM
*Reading* Reeally great Leigh!

ThirdEye
07-08-2003, 04:57 PM
Really interesting Leigh, i have to say i enjoyed it a lot.

Dreamwave
07-08-2003, 04:57 PM
wow great! many thanks!!!!

NowhereMan
07-08-2003, 05:01 PM
Thanks Leaf, u are truly helping others out with this stuff! :love:

juanjgon
07-08-2003, 05:30 PM
Thank you Leigh ... i cant wait for your book ... :applause:

KOlson
07-08-2003, 05:47 PM
Great job! Thanks Leigh! :D

animalunae
07-08-2003, 05:49 PM
I was looking forward to this one, I hope some day, I'll learn about sss in human skin some more from you!

klingspor
07-08-2003, 05:58 PM
Thanks a lot Leigh, your tutorials are always insightful as well as entertaining!

eagleice
07-08-2003, 06:13 PM
great as always
thx for sharing your knowledge and experience with us :beer:

Berserker
07-08-2003, 06:16 PM
Leigh, if I clean your windows, would you post part 7!? :p

(That was the clearest explaination of translucency I've read yet, thank you!)

HapZungLam
07-08-2003, 06:31 PM
more more plz. i learned everytime i read your tutorials.

illicit
07-08-2003, 06:46 PM
Originally posted by Berserker

(That was the clearest explaination of translucency I've read yet, thank you!)


Wheres the guy doing rim-shots when you need him??


Leigh, when is your book coming out? And can I pre-order now to speed things up??

:love:

The-3D-Data-Labs-Guy
07-08-2003, 06:47 PM
wow Leigh, you're doing a wonderful job here. Thanks for those valuable tutorials u posted here.

:love: :love: :love:

cbutlerc
07-08-2003, 07:01 PM
Shes at it again.
Another great lesson, for us dummies.

Awesome Job!!!!
Thank You for all of your hard work you put into it, always helps out.

Sieb
07-08-2003, 07:30 PM
Woot! free stuff! Nice read. Good job!

HapZungLam
07-08-2003, 07:46 PM
Leigh, i always have some confusion on refractions.

Alright, for a cup or a glass ball or somehting goes around circular is very easy to see the result of refraction.

However, a plain glass because of its flattness will not able to see the result. If i put some value in it. It will make the glass looks like magnefying glass which will blow up the back ground image onto the glass surface.

Of cuz, i don't wanta see that, but if i don't put any refraction value in it. the glass will just look fake. How to solve it and how will you deal with such flat glass?

katon
07-08-2003, 08:00 PM
This is great info.
I was wondering does anyone have links to the other texturing for dummies threads. I wouls love to see them, i dont know how i have past this up. Great work Leigh. Thanks

Katon

loked
07-08-2003, 08:12 PM
Hey Leigh,

Really great tutorial. Thanks!! :thumbsup:

Katon: Here is the link

Texturing for Dummies - Leigh (http://www.cgtalk.com/forumdisplay.php?s=&forumid=46)

later:wavey:
loked

Whyyyd
07-08-2003, 08:44 PM
Really nice job Leigh!

Memodin
07-08-2003, 08:51 PM
Woaw... its realy a good tutorial. Thanks very much... Nice job !:applause:

katon
07-08-2003, 09:01 PM
Sorry guys for the silly question abot where are the rest of the threads. Then i went and looked in the texturing section and "wa laa" there it is. Where else would it be. DOH:banghead:

peace

brunner
07-08-2003, 09:10 PM
Sooo much good info...
soo little time to translate it..

great work!

ChewyPixels
07-08-2003, 09:27 PM
Great info Leigh. :drool: Can't wait for your book. PLEAZE let us know when it's supposed to come out!

ninjacore
07-08-2003, 10:39 PM
my goodness. what a great read. thank you for providing all this information. i just downloaded parts 1-5, which i will print out and read!

One thing that has me puzzled is diffuse values. i use max, and in the material editor, the diffuse is only ever shown as a colour swatch, whereas things like reflection and transparency can be used as a value slider or a colour swatch! does anyone know what max users must do here? because usually, i just set the diffuse to white, which works, but i want to be fancy and use numbers!:scream:

friendlymike
07-08-2003, 11:08 PM
great stuff :blush:

leigh
07-08-2003, 11:15 PM
Wow, what a great response :D Thanks for all the comments everyone, I'm so glad to hear that you guys are enjoying this!

To answer questions:

My book is only going to be out at the end of the year (at the earliest!). I have absolutely no idea about pre-ordering and stuff, as my publisher organises all of that.
But I'll be sure to let everyone know closer to the time ;)

HapZungLam - glass is always refractive, even when flat. Sometimes I find myself adjusting the refraction index to get the result I want though. If you hold up a sheet of flat glass, look towards the edges of it and you will see distortion.

ninjacore - instead of using white, try using a shade of gray. In Photoshop, when you open up the Colour Picker, you can see what the brightness value of gray is by looking at the HSB values - the B value is the brightness value. If this value is, for example, 63, then applying that to your diffuse swatch should give you 63% diffuse :)

Grugi
07-08-2003, 11:15 PM
In 3dsmax5, there is a new translucency shader. Here you can adjust the diffuse-level from 0-400 .. 100 is set by default.
If you´re using max4 then you have to use the diffusion-colorswatch in the raytrace-mat. White is then 100% and black 0%.

Hope that helps :)

@ leigh: Very nice explantation of these surface-properties. I always learn a lot from your "tutorials" :D

Keep on writing your book :)

mage111
07-08-2003, 11:44 PM
wow

i love that leigh, thankyou so much

bookmarked :-)

visualboo
07-09-2003, 01:21 AM
hehe... that hand looks like one of those "still on the inside" baby shots ;)

verbal007
07-09-2003, 01:30 AM
Awesome! Just in time. This will help me out a ton.

Thanks

- Jeremy

markbones
07-09-2003, 01:30 AM
Thanks again Leigh, fantastic as usual.

Now, about your window: some Windex, a scouring pad, and some white paint will do wonders...

:thumbsup:

DogBreath
07-09-2003, 01:44 AM
Thanks for the new tutorial Leigh - as always you even get right into the grimy corners and explain everything in easy to understand terms.

BiTMAP
07-09-2003, 03:41 AM
it would be nice to get full PDF versions of all of the tuts...

mixtus
07-09-2003, 05:06 AM
hi Leigh,

I am always excited to see you write something new on texturing. It’s obvious that you have an extreme passion for understanding the nature of real world surfaces. I teach a few Maya courses and I always tell my students to check out your website. I think you have an excellent talent for understanding and explaining how to reproduce surfaces in a 3D environment. Just wanted to give you props – and tell you to keep up the good work. I always look forward to your insightful articles and tutorials.

mixtus

NelsonInomvan
07-09-2003, 07:04 AM
Man i love that girl a just love her :rolleyes:

rasmusW
07-09-2003, 07:29 AM
mmm... love it:love:

just what a texturing dummie like me needs:)
i´ve always had trouble figuring out all these settings. so to me, to see it with pics really helps a lot.
give us more...

Dipesh (India)
07-09-2003, 08:44 AM
hey.. leigh really cool information..

thnks :beer: :applause:

shinjuku
07-09-2003, 08:54 AM
:thumbsup: :thumbsup: good to see that a local is ripping the art apart and helping the global become familiar...thanks for the info. when light hits an object, it also creates darkness...

taboo
07-09-2003, 04:00 PM
thank you very much for this helpfull tips.
:beer:

RudeYuut
07-09-2003, 06:54 PM
Awesome job as usual leigh. Any chance we'll see this in pdf format.

Rhino169
07-09-2003, 07:00 PM
Thanks for taking the time to produce this great information!
I will search for the previous work you have done, assuming since this is "6", there must be 5 others!

Keep it coming!:buttrock:

ASCIISkull
07-10-2003, 12:46 AM
One thing that lots of people forget with flat plates of glass is to create it as a 3d object with depth, and air surfaces. These are very important for making the refraction look correct. Also, if you look straight at a flat plane of glass, the distortion is much less than if you looked through it at an angle.

Kroax
07-11-2003, 01:02 PM
"air surfaces"? ... what do you mean?

illicit
07-11-2003, 01:39 PM
Whenever air meets glass or some other surface you get an air surface. If you are modeling and rendering a glass of water you have to have refraction values for the air, the water,and the glass. Refraction only happens when the material that light is passing through changes. If you are inside a solid block of glass you won't see any refraction, but when looking at light through glass, water, jello, or whatever the light bends to go through the new molecules...

Did that help?

~illicit

Kroax
07-11-2003, 08:07 PM
yes. i think i got the point :thumbsup:
thanks :)
i also found a nice tutorial (in german :hmm: )
which briefly handels air sufacves.

http://www.nanouniverse.de/www.rendering.de/philip_meyer/wie_man_eine_whiskey_flasche_erstellt/Whiskeyflasche.pdf (www.nanouniverse.de/www.rendering.de/philip_meyer/wie_man_eine_whiskey_flasche_erstellt/Whiskeyflasche.pdf)

Barbas
07-13-2003, 01:24 PM
Another great thank you to leigh!! :thumbsup:
Now go back and finish that LW book so you can start the PS one! plzzzzzzzzzzzzzzzzzzzzzzz

snot_nose
07-20-2003, 12:01 AM
illicit said:
If you are modeling and rendering a glass of water you have to have refraction values for the air, the water,and the glass.

how do you apply refraction for the air?
I mean if u have a glass with water you have 2 models. the glass and the water and both have refraction values applied.
but i never head about people modelling the air.
:shrug:

or is there away to calculate both the refraction of the glass and the air and to apply it to the glass model?

Kroax
07-20-2003, 12:49 AM
if i understood right the air surfice has to be the same shape as your glass object (but normals are fliped). then you need to say to your software not to render this surface(but still calculate the refraction of light caused by it) . in Lightwave this is done by clicking on "Unseen by Camera" in Object properties -> Rendering ...

Am i right?:shrug:

GatorNic
07-28-2003, 03:34 PM
There was .pdf files for the other Texturing Workshops(1-5). Anyone have one for this one?

thanks

CloakedThunder
02-18-2004, 08:40 PM
Thanks leigh! great tuts! Your avatar is visually pleasing to the eye too, ya cutie. Thx for the very professional information. :D

Emmortal1
02-19-2004, 10:42 PM
Heh, guess you put that last shot together with the two glasses a bit too hastely eh? :) You don't have enough light rays as the second glass is not showing through on the first one hehe.

Great tutorial none the less, thanks again!!

mikepolizos
02-21-2004, 10:24 AM
Cool_.
Thanks for the tips Leigh!
:beer:

deathburger_13
01-16-2005, 09:51 PM
Man lieigh u r the man and i agree very nice guy for writing this duwaz . Im skiming so i saved this as a bookmark for after skool later!! :buttrock:

Oh and thanx if there were only more people like u lol

THUNDER-STUDIO
01-18-2005, 03:38 PM
really nice!! keep in on !

Cameo
01-19-2005, 01:22 AM
Also, if you look straight at a flat plane of glass, the distortion is much less than if you looked through it at an angle.


Yea you can achieve this in Maya using the facing ratio node along with a few sampler infos piped into the specular, transparency and reflection attributes of the shader. Works pretty well from what I remember. Was a tut on the old Alias site but Im not sure if it survived the update. I'll try and dig it out and post it because it was quite elegant I seem to remember.

Y0da
02-14-2005, 10:45 AM
At last I understand texturing. Thank you Leigh, you have explained everything so briliant that a complete novice such as myself could understand it. I always thought texturing an object correctly was a complicated and sort of mysterious process. But not anymore!

Brainex
04-04-2005, 06:08 PM
Finally! Thank you so much...

I am a newbie in 3d graphics and just started and found a lot of tutorials for the modelling process but i had huge problems finding a texturing tutorial... thats the first i found and now i dont need another

thanks :thumbsup:

CGTalk Moderation
04-04-2005, 06:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.