Вы находитесь на странице: 1из 10

PHOTOREALISTIC TEXTURING FOR DUMMIES

Part 5 : Specularity, Reflection and Gloss


THE NEED FOR SOME SHINE
Okay, before the debate begins to rage as to whether or not to actually use specularity, or just
stick to reflection mapping, lets first assess the necessity for shininess in the first place.
Basically, without shininess, an objects surface appears flat, and does not really react to the
light shining on it (of course, the fact that it has a colour means that is it reacting in some way to the
light, but Im talking more in terms of visible highlights or hotspots here).

Without some kind of shininess, this metal and leather would appear extremely dull and flat.
Highlights on a surface give us an idea of how the surface feels whether it is smooth or coarse
(not in terms of the objects topography, which is generally defined by the bump map), whether it is
hard or soft, dry or wet, old or new, greasy or slimy, and so on and so forth.
Another extremely important thing detail it relays to us is the objects everyday interaction with
the world by altering and breaking up the reflection of light on its surface, we can get clues as to how
the object is handled by people, or how it is used in the world. In other words, it shows us how the
world and its inhabitants have left their mark on it, so to speak. For instance, a wineglass is never
really 100% squeaky clean look closely at it, and you will see oily fingerprints, faint grime from
general handling, smears from the last time it was washed, and an entire host of other greasy
smudges, abrasions and dusty marks. These all affect the shininess of the object by lessening them.
On the other hand, interactions can increase the shininess for instance, an apple that has just been
polished, will have brighter, shinier spots where it has been polished harder.
I think that we can all agree that the surface definitely does need some attribute to show the way
in which these sort of things affect and wear an objects surface over time.
Finally, the most obvious need for this shininess is to show that the way in which local lightsources are affecting it. Of course, this is where the debate begins does one use specularity, or
reflection?
To add more substance to that question, here is a little refresher course on light:
As we all know, we are able to see things because of the way that light is reflected off things
around us the reflected rays shoot into our eyes, bounce around a complex setup of lenses and
things inside our eyeballs, thus enabling us to see this wondrous world around us.

So, basically, when setting up textures in CG, we have to bear in mind that we are dealing with
reflection of light, and therefore creating the instructions for how the light should be reflected off the
objects surface by creating texture maps, right?
Every detail we see on a surface is there for us to see because light has bounced off it and into
our eyes, showing us what the surface looks like.
To sum it all up shininess is the reflection of light the stronger the reflection, the shinier the
object.
So, how do we set that up?
This brings us back to the question do we set this up using specularity? Or reflection??
To fully illustrate both sides of this question, lets look a little more closely at these two
options

SPECULARITY - THE BIG FAKE


Okay, so what exactly is specularity?? In reality, the effect known as specularity in CG is
actually called specular reflection. A dictionary definition would describe specular as a mirror-like
quality.
However, unlike its real-life equivalent, the effect of specularity in its 3D package incarnation, as
we are familiar with, is actually quite different from the reflection option in any surface editor.
Specularity is basically a way of faking the reflection of light on the objects surface.
Let me explain.
Technically speaking, when you see a highlight on an objects surface, it is actually a reflection of
all local light-sources. For instance, if you place a fairly shiny plastic cup onto a table in a room that is
lit by a single lightbulb, you will notice highlights all along the surface of the cup (and the table too,
obviously, but we are concentrating on the cup in this particular example). Now, if you look really,
really, really closely at these highlights, you will discover that in actual fact they are reflections of the
lightbulb itself.
Obviously lots of surfaces dont have very tight, defined hotspots which are as clear as they
would be on a plastic cup, but all that has happened is that the reflection has become more spreadout, a property which is controlled by the gloss amount, which will discussed a little later on.
So, having said that, you may be wondering why I said that specularity is fake.
Specularity is fake because it doesnt actually reflect the light-source in the same way that the
surface would in reality, instead it just gives the illusion that the surface is reflecting light.
In other words, it shows highlights simply because there is light shining on it. It isnt actually
reflecting anything as such. You could, for instance, shine a spotlight onto the object, and when it
renders, you will see a round hotspot on the surface, not an actual reflection of the spotlight itself.
Basically, specularity gives you round hotspots, that you can break up a bit using specular
maps.

Figure B Specularity creates round hotspots on your surfaces

REFLECTION - THE REAL DEAL


Fake not good enough for you? Well, reflection is pretty self-explanatory. Using reflection on the
surface will obviously allow the object to reflect its surroundings and local light-sources correctly. No
need for any in-depth explanations here, as we are all aware of what reflection is and what it looks
like.

Figure C Using reflection allows the surface to reflect its surroundings like a mirror

THE BIG SHOWDOWN - SPECULARITY vs REFLECTION


Right, now that we understand what specularity is and what reflection is, we can look at the
argument as to whether to employ one or both in a surface.
Why use specularity if it is fake?
A fair question. I guess there are 2 immediate answers to that question:
Firstly, specularity renders faster than reflection. Accurate reflections require complex
raytracing which takes a lot longer to render that specularity. In order to utilise reflection in most
software, one has to activate a reflection option in the rendering settings, which adds time to the
render in order to calculate the reflections. And we all hate waiting for renders.
Secondly, reflection almost always makes objects begin to appear mirror-like. To go back
to our earlier example of a plastic cup, if I want to make a plastic cup that should be realistic, using

reflection instead of specularity is more than likely going to make the cup look unnecessarily mirrorlike.
Perhaps plastic isnt the best example here, as it usually is a bit reflective as well as shiny, so let
me give another example wood. Wood that has no varnish on it, and is fairly dull, and really doesnt
appear reflective at all, will nevertheless have a hotspot (however faint and spread-out it might be) on
it if you shine a light directly onto it. Giving the wooden surface a certain amount of specularity will
allow this hotspot to show on the surface without it reflecting like a mirror, which is what would happen
were you to use reflection instead.
The same goes for cloth. Look at the clothes you are wearing light is creating highlights on
your clothes these highlights are especially noticeable on folds in the fabric, where it is catching the
light. Fabric, however, is most certainly not reflective in the sense of reflecting objects around it. So
using specularity instead of reflection in this case is more feasible too.
All this is rather mind boggling when you consider the fact that the reason that objects appear
shiny in the first place is because they are, technically, reflecting light.
So even fabric is technically reflecting light. So is dull wood. Its just that using reflection is CG
tends to makes these surfaces look too mirror-like.
On the other hand, if you are wanting to recreate reality perfectly, then it would make sense to
use reflection, as this is the physically correct method.
AAAARRRRGGGHHH!!!!
So, which one do you use????
I guess this is the bit where I am going to tell you to use basically whatever you think looks
good. This argument can go on and on, but in the end I always think that if it looks good, use it.
Yes, reflection IS the more realistic way of doing it, in terms of physics. That is easy enough to
understand. Its just that, more often than not, the results of doing it like this tend to end up looking
wrong.
What do I use? I tend to use a little bit of both. I have always used specularity, and I use
reflection to enhance my specularity. However, I have seen some great work done without any
specularity whatsoever. I guess it really comes down to individual methods of doing things.

Figure D our trusty sphere with both specularity and reflection applied
Having said all this, the cool thing is that making maps for specularity and reflection is exactly
the same, as they are logically doing the same thing defining the shiny areas.

SO, HOW ABOUT SOME TIPS FOR USING THIS STUFF?


Here are some useful tips and trivia for making specularity and reflection maps, and working
with these attributes when texturing:
Variation! No surface in reality has a perfect, consistent shininess. Everything has been
touched in some way by something whether by people, animals, the weather, or anything else.
These things will leave fingerprints, smudges, scratches and other artefacts that will lessen the
shininess of the objects surface. It is important to include details like this, as even if they may be really
small and almost indistinguishable, they are nevertheless essential details for realistic real-world
surfaces.
Show some weathering. The weather, as I mentioned above, leaves obvious marking on
surfaces. These sorts of marks include drips, stains, drying, damp and that sort of thing on items.
Remember that this sort of damage should also be included in your colour and diffuse maps, and are
further enhanced by including them into your specularity/reflection maps as well.
For instance, the paint on a house will, over years, begin to show weathering from rain and sun
in terms of damp gathering in corners, streaky drips down walls, and drying out and cracking where
it has been faced by too many hours in the sun. Obviously these details will go into the aforementioned colour and diffusion maps, but altering the specular/ reflection maps will add more detail to
these effects in terms of the dried, flaky paint will have a broader, less strong shine too it than areas
which are in constant shadow, and have become damp.

Figure E add some variation and weathering to your reflection and specularity
For human skin - look carefully at a face. Notice how the shininess of skin is uneven. A classic
example of how shininess differs in skin is to look at the area of skin where the nostril meets the cheek
on the face. Almost always, the skin in this area is drier and ever-so-slightly rougher, causing it to be a
lot duller than the cheek. The tip of the nose is almost always rather shiny too.
If you have any scars, you will see that scar tissue is much shinier and more reflective than
normal skin too. Also look closely into the wrinkles on the joints on your fingers, and you will see that
the skin there is smoother and shinier. Also, on the fingers, the bit of skin just above the cuticles and
along the sides of the fingertips tends to be very shiny and smooth.
If you are texturing skin that has any tattoos on it, you should note that tattooed skin is also
much shinier, as it is technically also scar tissue.
Surfaces that are scratched remember that with abrasions and scratches, the shininess
tends to change. For instance, if you have a piece of metal that is painted, the paint will have a certain
shininess. But where there are scratches in the paint, the metal beneath will show through, and the
metal will have a different shininess to the paint.

Basic human interaction with objects leaves very specific and identifiable marks particularly
from fingerprints. Our fingertips are very oily, and tend to leave visible residue on everything we touch.
For example, if you handle a wine glass, you will definitely leave fingerprints on it, that will alter the
reflections in the glass in other words, where the fingerprints are, you will not see as much reflection
as in the untouched areas.
Tip: An easy way of adding these to your maps is to make a bunch of custom brushes in
Photoshop, which are the shape of fingerprints. You can make prints from your own fingers and scan
them in, make selections from them and define brushes from those selections so that you can literally
just paint fingerprints onto your maps. Be sure to have a couple of different ones though, of varying
sizes and patterns, for added realism.
Another example of how human interaction alters surfaces is to look at things that have been
used frequently, such as your computer mouse. Look at the buttons of your mouse years of clicking
away at them tends to wear the plastic down so that it is smoother, and very slightly shinier, since your
fingers have essentially been polishing this area (unless, of course, you havent cleaned your mouse
recently, and instead of it being smoother and shinier, its just a bit grimy, in which case the shininess
would actually be less).
When dealing with specularity and reflection, its extremely important to have a good
understanding of where the object has been, and how it is used.
Blur your reflections if your software has the option of blurred reflections, for heavens sake
use it! Unless you are texturing a perfectly clean mirror, most reflective surfaces have a certain degree
of blurring to them. Even just slight blurring can help to get rid of that nasty CG look.
Specular blooms blooming is basically an effect from very, very bright highlights, where the
highlight almost seems to glow. This is very noticeable on things that have been covered in some sort
of lacquer such as car paint. The finish on car paint often tends to give off extremely bright highlights
when the car is in the sun. Looking at these spots usually gives you mild retina-burn Im sure you all
know the effect Im talking about. Its almost like a mini-lensflare, in that it is sparkly, and has lots of
little streaks coming out of it. Most software has some kind of bloom effect, in the form of an extra
shader, or specular parameter. If you are working with surfaces that are coated in very reflective
substances, then adding a bloom can give it a nice touch.
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 mirrorlike, 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 wich gets its name from the French physicist Augustin-Jean Fresnel, who first
documented it.

Figure F the Fresnel effect in action. As the sphere curves away from the glancing angle, the
reflectivity of the surfaces increases
You can implement this effect in one of two ways:
Firstly, by using a Fresnel shader (such as the one that comes with Lightwave). The shader
pretty much creates the
effect for you, just leaving you to adjust it the way you want. A Fresnel shaders effect is
generally controlled by adjusting the glancing angle for the specular, reflection and transparency
amounts (some shaders offer controls for other attributes such as luminosity, diffuse, and translucency
as well, but these are, in my opinion, better controlled by gradients).
The glancing angle is measured from the surface normal, thus 0 degrees is any surface normal
that points directly at the camera, and 90 degrees refers to any surface normal that is perpendicular to
the camera.
So basically, you set the minimum glancing angle and enter in the amount of reflection,
specularity and transparency that will be visible at that angle (generally speaking, the lower the angle,
the lower the amount of reflection, and the higher the amount of transparency, if the object is
transparent), and as the angle increases, the amount of reflectivity will increase.
The second way of creating the Fresnel effect is by faking it with gradients (ramps). Basically,
this involves putting gradients into your reflection channel (as well as a gradient of opposing values
into your transparency channel, if the object is transparent), that are controlled by incidence angles.
In other words, you create an incidence-angle gradient going straight from dark to light, and you
put it into your reflection and specular channels, so that when you look straight at the object, it isnt
reflective, but as the surface slopes away from you, it becomes shinier and more reflective.
Lets say, for instance that I am texturing a chrome sphere (and for the sake of this example, let
us assume that this chrome sphere is absolutely perfect in terms of being perfectly 100% reflective).
I would place an incidence-angle gradient into its reflection channel, going from 100% black to
100% white.
The effect that this gradient will have is basically 0% reflection when looking perfectly level at
the object (0 degrees glancing angle), going to 100% reflective at any part of the object that is viewed
at an angle of 90 degrees from the same point in other words, the front bit of the sphere that I am
looking straight at will appear absolutely 0% reflective, while the very edges of it will be 100%
reflective.

Figure G a light incidence gradient that will be 0% reflective at a glancing angle of 0 degrees,
and 100% reflective at an angle of 90 degrees.
The same technique would apply for a transparent bubble. Now that you understand the basic
principle of the Fresnel effect, you should know that if you were to create a bubble floating in the air, if
you point a camera straight at it, the bit facing directly level at the camera would appear more
transparent than the edges, which would ideally appear more reflective.
This effect would be achieved by placing gradients of opposing values into the reflection and
transparency channels.
In other words, you would place a gradient going from black to white (as in the previous
example) into the reflection channel, so that the reflection would be 0% when looking at it straight on.
Then, you would place a gradient into the transparency channel that goes from white to black, so that
where it is 0% reflective, the bubble will be 100% transparent, and where it is 100% reflective, it will
appear 0% transparent. Make sense? Good!
Remember that this is actually a real world effect, so you should try and utilise it.
Tip: Gradients/Ramps are really excellent things to use in texturing. All too often their usefulness
is overlooked, when in fact they are absolutely essential for creating certain effects, such as I have
explained here. They are also great to use as alpha channels for image maps or procedurals that you
may also be using. I highly recommend checking out how the application you use implements them,
and start using them! You will most likely find them invaluable once you see how incredibly useful they
are, especially for controlling the visibility and placement of other maps and effects in multi-layer
texturing.
BRDF aaah, the most impressively named effect in texturing - the bi-directional reflectance
distribution function. Complicated sounding name, fairly simple effect (in terms of execution). It is
generally implemented into 3D software as an extra shader. Im not sure which applications apart from
Lightwave have this function, so I will leave it up to you to find that out.
For people who like to sound like physicists, here is an extremely technical explanation of BRDF
for you to try and memorise:
The bi-directional reflectance distribution function gives the reflectance of a target as a function
of illumination geometry and viewing geometry. The BRDF depends on wavelength and is determined
by the structural and optical properties of the surface, such as shadow-casting, mutiple scattering,

mutual shadowing, transmission, reflection, absorption and emission by surface elements, facet
orientation distribution and facet density.
Hmmm. That didnt make a whole lot of sense to me.
Simply put, BRDF basically describes what we all observe every day - that the surfaces of
objects look different when viewed from different angles, and when illuminated from different
directions. Its to do with the directional scattering of lightrays from an objects surface (as well as the
bouncing of light within an object, known as sub-surface scattering, which is something that I will deal
with at a later stage, when I do the workshop on Translucency).
Not to be confused with the Fresnel effect, as this is quite different, the implementation of BDRF
in 3D software is basically to add detail to the specularity it allows for the effect of anisotropic
specular reflection.
Anisotropic specularity is basically specularity with a grain in it. A distortion. It can be used to
create what is often called a brushed-metal look.
Basically what it does it create the illusion of tiny grooves on the surface, which then reflect the
light in different directions, depending on the way in which the grooves run along the surface. You can
also use the shader to determine which lights affect the surface, and are thereby scattered by these
grooves. This results in a broader, softer specular highlight (as in Figure H).

Figure H BRDF shader with anisotropic specularity


Another thing that (LWs) BDRF shader does is allow you to add multiple layers of specularity.
This is really awesome for when you are texturing something that is coated with varnish or any other
lacquer. For instance, if you are texturing a car a cars surface is covered in paint, which is then
coated in a clear seal. These two substances (the paint and the coating) each have a different
specular amount, which you can use this shader to set. Pretty nifty.

Figure I BRDF shader with 2 levels of specularity. The lower layer has a tighter highlight while
the top layer has a broader highlight
Lastly, the most important tip of all DONT OVERDO IT!! One of the worst mistakes made
in texturing is the tendency of individuals (especially beginners) to completely overdo reflection, and
make everything look perfectly mirrorlike. This is a dead giveaway that the object if computer
generated. Apart from that, it also looks a bit yucky. So just use it in moderation study your
references for the object you are texturing, and make sure that its reflection/specularity matches. You
will see that cars in the real world are not 100% reflective, and neither are chrome teapots (although
those are very reflective, just not 100%).

UMMM.... WASN'T THIS WORKSHOP ALSO SUPPOSED TO BE ABOUT


GLOSS???
Well, I left glossiness to until the end because there isnt all the much to explain - basically, the
gloss amount in your surface editor controls how spread out the specular highlights are. The higher
the gloss amount, the tighter the highlights.
For example plastic tends to have a fairly high glossiness, whereas fabric such as cotton has
practically no glossiness. Pretty simple.
Usually you have to have some amount of specularity on a surface to use glossiness, or else the
gloss amount wont actually have any effect, because it works hand-in-hand with specularity.
And thats about it!s
If you wish to respond to this article, or add anything to it, go here - you will need to register with
CG Talk if you are not
already a member. All additions, comments and contributions are more than welcome.

By Leigh van der Byl / http://leigh.cgcommunity.com/

Вам также может понравиться