photorealistic texturing for dummies pt1

Upload: miroslav-mojic

Post on 05-Jul-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    1/6

    PHOTOREALISTIC TEXTURING FOR DUMMIES

    Part 1 : Introduction & Overview

    Introduction

    Hello everyone, and welcome to the first instalment of my workshop on advanced texturing.Before we go on, let me just point out that under absolutely no circumstances are you going to find anytutorials on how to make tacky chrome surfaces or light blue glass . There is quite enough of that out therealready. Not that I think there is anything wrong with those, it's just that those tutorials will only get you sofar, and when you are suddenly faced with the challenge of texturing a photorealistic shower attachmentor elephant's toenail, they are going to get you nowhere.

    What I intend to do is to illustrate exactly how to observe real life surfaces and recreate themdigitally. With all the frills. And that means absolutely no tiled texture maps.

    I am going to try and be as non-software-specific as I can, but I don't claim to know all the ins andouts of the surface editors of many high end 3D software packages, so I will leave it up to you on how to

    figure out the equivalents in the software that you use. However, I will try and use the most genericterminology I can think of, to avoid unnecessary confusion.

    Why Procedural Textures just don't work

    Now procedural textures are something that I am very passionately against. I know that they aregreat for when you need to create a certain look in a very short amount of time, but if you are wanting tocreate something which is believable, they are just not going to cut it. Procedural textures are fine forbeginners, and even some intermediate 3D artists, but there comes a time when you are going to have toleave them alone. Completely. Why is that? You may ask.

    Let me explain. You see, nothing in this world remains untouched – whether it is touched by the

    weather, by animals, or by man, the world is interacting with it in some sort of way. When you are texturingsomething, you have to start off by asking yourself a few questions – what is this object used for? Whereis it found? How do people interact with it?

    Now if you wish to make your textures absolutely believable, they are going to have to show howit is that the world is interacting with it on a regular basis. For instance, a childs toybox, would becomeworn in streaks below the lid where the child's hands drag as they reach to lift it (this would be mostnoticeable in the specular layer); an old telephone with one of those old dials would have oily fingermarksaround the little holes where your finger goes in to turn it; a computer mouse would also have oily streakson the buttons where your fingers slide up and down as you use it. These are all examples of ourinteraction with objects and the effect that these interactions on their surfaces.

    Now, to try and recreate these very specific, familiar day-to-day effects, you are going to have to

    ignore the very tempting Puffy Clouds and Fractal Noise procedurals, and actually make an effort to dothem yourself.

    Than means, painting your own textures.

    No amount of clever tweaking of a Hybrid Multi-Fractal combined with a Perlin Marble proceduralpattern is going to be able to recreate the scratches and worn paint around an old screw on a tractorwhich has been re-tightened, over and over again over the years, where the screwdriver always drags hitsand drags when the person holding the tool tries to get to the screw itself.

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    2/6

    There are, of course, a few exceptions to this. Liquid surfaces, for instance, can only really bemade and animated with procedural noise, if you have no access to a decent soft-body dynamics engine.They can also be useful for bumps maps for surfaces like skin, or cloth, that can have a very uniformbump across a large surface. However, they should never be used alone for things like these, as even asurface like skin changes in specific areas where it creases along joints or if there are any blemishes, andthese details should obviously be added using a unique painted image. But apart from instances likethese, the only way that you are ever going to achieve truly perfect and photorealistic surfaces is to paintthem yourself.

    What I am basically trying to say, is that if you are wishing to learn how the different aspects ofreal world surfaces behave, you will have to paint them yourself. I'm not saying that you can't use

     procedurals at all, I'm just saying that during the process of learning how these surface attributes work, itwould be beneficial to leave procedurals alone.

    When you get to a stage where you fully understand all the aspects of surfaces, then proceduralscan come back into play. But even then, procedural textures are tricky to work with, and have to be usedcorrectly. In other words, you should never just use, for example, a Fractal Noise texture, with nothingelse, as a colour map. It looks terrible. Procedurals are best controlled with grunge maps, and alphaimages.

    Observing the Aspects of Surfaces In Real Life

    If you wish to become a brilliant texturing artist, the first thing you are going to have to do is learnhow to properly observe surfaces in the world around you. You need to look at things and, in your mind,break the surface apart into it's different aspects. Look at a brick wall – study the variations in colour,notice how the light is broken up along it's surface, feel the groves, scratches and bumps on the bricksthemselves as well as the grain of the cement between them. Even take note of it's temperature – I knowthat sounds strange, but that can become very important when you are trying make people really believethat the surface exists. People looking at your textures must be able to imagine exactly how it feels totouch, and the temperature of the surface is definitely important, But that is a detail that I will go into depthat a later stage.

    You need to begin looking at the world around you in terms of the aspects that you will recreatedigitally. I know this may sound really bizarre, but when I am driving to work in the mornings (this usuallybeing the only time of day that I actually see the world outside…), I often find myself looking at an oldgarbage can on the side of the road, and thinking “hmmmm… that can has an awesome diffusion map onit” or looking at an old council truck and thinking “what a cool specularity map that has”. It is because Ithink like that, that when I sit down to work and am given something to texture, I can draw directly from mymemory and experience, because I do know offhand what the diffusion of metal looks like, or how to doreally great rusty streaks on the side of a truck.

    Make an effort to break up things you see into Colour, Diffuse, Luminosity, Specularity,Glossiness, Reflection, Transparency and Refraction, Translucency and Bump aspects. Some surfaceareas also include Displacement, which is basically a Bump map that actually alters the geometry, butbecause it is then, technically, a geometric property, I will not deal with it, as it doesn't really affect surface

    attributes as such. All these different surface properties are generally, across the board, incorporated intoyour software's surface editor, possibly with the exception of transparency (which is not the same asOpacity), and translucency. Observe how these different aspects interact with each other – for instance,very reflective transparent glass, isn't very reflective and is less transparent where it is scratched andwhere it has been dulled (by been handled or by being wiped by a dirty cloth).

    Of course, in order to begin observing all these aspects correctly, you need to have a very goodunderstanding of what each of these are.

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    3/6

     

    Real world surfaces aredirty and weathered! One ofthe biggest mistakes madeby beginners is making allsurfaces too clean.

    Please note: When I speak of procedural textures here, I am not referring to specialisedSHADERS written for Renderman, Lightwave, Maya etc. I am referring to the built in fractal-noise type

     procedurals. And before you begin posting complaints about these statements, please read the followingfew pages of discussion concerning this.

    The Different Aspects Of Real World Surfaces

    Of course fully explaining every one of these properties in great depth would take too much timeright now, so I am going to give a very brief explanation of each of them now, and then later on I will do aseparate workshop dealing with each of them individually. But, in the meantime, here is a quick rundown:

    Colour

    Well, I guess this one is pretty self-explanatory. All objects have colour. Although it is probably themost basic of the surface attributes that you will have to make when texturing something, it is by no meansan easy one to produce. Nothing in real life has a constant perfect colour. Any object has a colour which isuneven in places, even if only slightly. The colour map is usually the best one to start off with, whenbeginning to texture a new object, as it will give you an excellent starting point for the feel of the object.Colour maps are generally the only image maps that you will make that contain any actual colour, as theother surface properties are best created in shades of grey.

    Diffuse

    Okay, to all the Max users out there – diffuse is NOT colour. I've never fully understood why thecolour attribute in Max's material editor was named Diffuse, when Diffuse and Colour are actually two verydifferent things. Unfortunately for people who use Max, diffusion is not included in the material editor, infact, to my knowledge, the only medium to high end programs that do incorporate it in it's correct sense,are Lightwave, Maya and Softimage. This is a shame, because diffusion is actually a critically importantaspect of surface realism. Diffusion is the attribute of an object's surface that scatters light. It determinesthe actual amount of light that is reflected by the surface. In essence, it determines how much of thesurface's colour we'll see. By diffusing an object, you limit the amount of colour that is reflected back bythe light. This is completely different to simply darkening the surface of the object itself. If you were todarken the actual image used as a colour map, you would see only see a change in colour, but not colour

    depth. Colour depth is created by scattering light across an object's surface. Take a look at human skinand you'll notice that it has a density. The colour isn't a simple continuous shade but rather many similarshades, created by scattered light. This quality can not be made by a colour map alone, as a colour mapcannot give a surface the richness that a diffuse map can. Obviously, having said that, Diffuse and Colourgo hand in hand. I often find that the best way to start off a diffuse map is to take the colour map,desaturate it to grey and work from there. But, as I said previously, I will be going into much greater depthlater on as to how each of them are best produced.

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    4/6

    Luminosity

    This attribute determines whether or not an object has any self-illumination properties, and howstrong they are. This is only used for things like florescent lights, light bulbs, LED displays and so on. Aluminosity map works best in conjunction with a renderer which supports radiosity, so that the luminousvalue can become translated during the render process as a source of light, and will thus illuminateobjects around it slightly.

    Specularity

    My personal favourite surface property. It is a shame that this extremely important aspect of asurface is all too often overlooked. In fact, I would say that Colour and Specularity are the two mostimportant basic surface attributes. The specularity of an object determines how shiny it is and how light isbroken up by it's surface. Now, keeping in mind what I said earlier about being aware of how people andweather interact with and affect a surface, you make use of a specular image to show how the world has“made it's mark” on the object, so to speak. Things like smudges from a cloth, fingerprints, wetness,polishing, etc will all play a part in determining what goes into the main specular image. Specularity worksmost closely with three other surface properties – Glossiness, Bump and Reflection.

    Specularity in conjunction with Glossiness determines how spread out or how tight an area thelight's “hotspot” becomes when it come into contact with the surface. An object with only a small differencebetween the specularity amount and the glossiness amount have a very small “hotspot”, therefore theyappear plastic-like; whereas an object with a large difference between the two will spread the light out overa much wider area, therefore appearing more dull, like metal (except chrome-plated metal, of course).

    Bump works hand in hand with specularity in that generally parts of an object which protrude morebecome more worn. And depending on what the surface is, that will either increase or decrease thespecularity – wood, for instance, generally becomes shinier when it is rubbed a lot, whereas metal canbecome duller. Another way in which bump and specularity work together is in the case of scratches alonga surface – a scratch will tend to gather grime and dust, and will therefore become very dull after a while.

    The interaction between reflection and specularity is pretty obvious – where a reflective object has

    been, for instance, touched by a person, oil from the fingertips gets left behind, and makes the surfaceappear less reflective in that area. Another example would be if you had to texture a car's frontwindscreen, where it is a cold night and the driver has wiped a cloth along the glass to clear the mist on it,the cloth leaves lines in the direction it has been pulled across the surface – those streaks will make thesurface appear a lot less reflective than parts that weren't touched by the cloth. It is probably safe to saythat there exists no object in this world that is 100% reflective all over it's surface, because sooner or later,someone or something is going to touch it and affect it's specularity, thereby affecting it's reflection.

    You get two common kinds of specularity – normal specularity, and anistropic specularity. Normalis just plain straight specularity, whereas anistropic specularity is used for surfaces which has extremelytiny bumps along it's surface. But I will get more into detail about that when I deal with specularity at alater stage.

    Glossiness / Gloss

     As I explained above, Glossiness is the property that determines how widely light is spread out onan objects surface. The moment you add any specular amount to a surface, you must use glossiness toget the right balance of shininess. As previously mentioned, plastic objects have high gloss values,whereas untreated woods (like bark) and industrial metals have quite low gloss values (sometimes, inthese cases, no gloss at all).

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    5/6

     

    Figure A: The first sphere shows a settingwith a highspec setting and a low glosssetting, while the second sphere shows theresult of the amounts being closertogether. 

    Reflection

     Another pretty self explanatory property, reflection determines how reflective an object is and inwhat areas it is reflective. As previously mentioned in the paragraph on specularity, the reflection mapshould vary along the surface according to how it has been interacted with. This attribute is sadly oftenoverused – a huge giveaway that an object is cg is often due to the fact that the texture artist has made ittoo reflective. That is not to say that reflectivity is not a common property – in fact, most things which arein any way shiny, are slightly reflective too. Although reflectivity is not to be confused with the effect thatradiosity has on objects, where the surface of one object can pick up small traces of the coloursurrounding it due to bounced light. You should not attempt to create this effect with reflection, as yoursurfaces will just end up looking wrong.

    The kind of reflection that an object has also differs greatly – a mirror, for instance, produces a

    perfect reflection where it is clean, whereas steel, plastic, scratched Perspex, most liquids, etc, haveblurred reflections. A lot of software does have a blur option for reflection – if it's there, use it . All toooften, you see horrible renders of perfectly reflective kettles and such, when the reflection should havebeen blurred.

    Transparency and Refraction

    Transparency is not Opacity. It is, in fact, the opposite. Transparency determines how “see-through” an object is (whereas Opacity determines how opaque it is. An object which is 0% percentopaque will disappear out of a scene, whereas an object with 100% transparency will just be completelysee-through, yet still visible). Obviously, things like glass, Perspex, liquids, crystal, etc have varyingdegrees of transparency.

    Transparency is also affected quite a bit by the specularity of an object – especially in the case ofoily fingerprints left on a surface – obviously these areas are not going to be as transparent as thesurrounding areas that have not been touched.

    Most substances which are transparent, refract light. Refraction is the bending of light throughtransparent bodies. This causes the effect of, for instance, if you have a scene with a glass of water in it,when you look at objects through the glass of water the objects you see are warped. Different substanceshave different refraction amounts, and a table of these amounts can be obtained almost anywhere – froma science textbook, to the manual that came with your software, to going to Google.com and typing in“refraction index”. The higher the refraction amount, the more light is bent as it travels through it.Refraction amounts in reality do not exceed 2.0.

    Figure B The first sphere has norefraction, while the second one has arefraction index of 1.175  

  • 8/16/2019 Photorealistic Texturing for Dummies Pt1

    6/6

    Translucency

    This property, like Diffuse, is not included in all software. Translucency is the ability for an objectto be backlit without being transparent. Take for instance, a curtain – when a light is shone through it, youcan see things moving behind it, even though it is not transparent. In reality, just about everything, with theexception of metal and wood, has some degree of translucency. This property can be extremely useful forskin, in particular, so that if a bright light is shone onto it, you can catch a glimpse of the veins which run

     just below the surface. Translucency works best when combined with a calculation called Sub SurfaceScattering, which is a property that basically allows light to enter the surface of an object, bounce aroundinside the surface, and then leave it at a different angle to that in which it entered. This can usually beimplemented with the use of a BSSRDF shader – Bidirectional Surface Scattering Reflectance DistributionFunction. Big name, cool effect. I'll deal more with that later on though. Translucency and Sub SurfaceScattering are extremely important, especially for surfaces such as skin and fabric, where they shouldalways be used.

    Bump

    The most common attribute next to Colour. Everyone knows what a bump map is. Although, Imust stress that a bump map should never be used as a compromise for necessary geometry. Bump

    maps should only be used for minor things like scratches, small dents, grooves, small carvings, minorvariations in relief, and grain. Never ever use a bump to create something that should actually bemodelled. The reason for this is that as soon as you get close to a bump map, it becomes obvious that theobjects surface relief is actually flat.

    A Note On Making Your Own Texture Maps

    Something that is extremely important when making your own texture maps, is the size of theactual image you make. In order to determine what size you should make it, you need to know what thefinal rendered frame size of the animation is going to be.

    Once you know what the final size is, then you can work out the size of your texture map as

    follows:

    Take the maximum width that the texture map can appear on the screen (in pixels) and multiply itby two. Use this pixel size as the size of your image map, if you want to ensure that your textures do notbecome blurry or pixellated when viewed up close.

    For example, the most common frame size when rendering for television is 720 pixels X 576pixels (PAL D1), so if you were to make a texture image for an object that will be viewed right up close inthe frame, then the width of your texture map should not be less than 1440 pixels. I usually work withsquare images, as I almost always work with UV Unwrapping, so my images are generally at least 1440 x1440 pixels. It's usually safe to leave the image at 72 Dpi, as this is the resolution that monitors andtelevisions display at. Of course, the drawback to this is that these kinds of file sizes for image maps doslow down the rendering process quite a bit, but on the other hand, you know they will hold close-up. So if

    you have a job that is going to end up on IMAX, you had better make sure your computer can handle 4000x 4000 pixel images….

    That's it for this round. I'll be putting together the chapters on the individual surface attributes,which will include picture examples, soon, and will be posting them as they are done.

    I hope that this was informative, and that it made sense. Please feel free to post comments orquestions. Or, I have made a mistake, don't hesitate to let me know.

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

    http://leigh.cgcommunity.com/http://leigh.cgcommunity.com/