Donations




All donations are greatly needed and appreciated.

They all go to the upkeep of PFD and PFD Delights

They can be set as a monthly donation or as you can give.

Click the button to be taken to Paypal.

Enter any size donation because they are all appreciated and welcome.

Thank you for your donation.



Members
Stats
  • Total Posts: 7128
  • Total Topics: 385
  • Online Today: 5
  • Online Ever: 83
  • (December 24, 2022, 03:52:45 PM)
Users Online
Users: 0
Guests: 1
Total: 1

Author Topic: What is texture and what maps do what?  (Read 149 times)

0 Members and 1 Guest are viewing this topic.

Offline fiona

  • Got There!
  • *****
  • Posts: 518
What is texture and what maps do what?
« on: May 08, 2015, 03:15:47 PM »
I am going to begin this far more simply than many by asking the question at the heart of it all.  "What is texture?"

Texture is peaks and valleys.  In a physical environment, we can feel texture.  But in a visual one, we need to have a way to perceive it.  Light and shadow are how our brains perceive texture.  What about color, you say?  Color has an inherent lightness and darkness, as well as greyness to it.  So color includes light and dark.  Color is part of texture.

In Daz studio, textures are handled through the "surfaces" tab, by "shaders"  But good textures are born long before we come to a rendering program.  Textures are born when a modeler loves what they are making so much, that they take the time to sculpt details, and bake normal, bump, displacement, and reflection maps off of the fully realized, sculpted creation.  What do I mean by "baking a texture?"

Let's say that Hedd models a piece of apple pie with a lattice top, crystals of sugar, a lovely crimped edge, and a whopping dollop of whipped cream.  If he does a good job, at the highest level of detail (LOD), even without a material map, you ought to be able to see every little crystal of sugar, every drip of juice that bubbled up and crisped on the lattice,and be able to tell whether that dollop on top was Cool Whip or home made whipped cream by how much it holds its form or sags.  To do so, he had to follow several steps. He made the model, perhaps a simple triangular thing that somewhat resembles pie, and then added what we call a "subdivision".  Say the original model had 1000 polys (little four sided pieces).  Each subdivision quadruples the number of polys because it cuts each piece in four.  Why do this?  It allows him to stop modelling (building poly by poly, connecting dots, tedious work) and start sculpting (using tools to mold the form). Some people never model in the first place, and simply start with a square and sculpt that.. but in any case, each time he adds a subdivision, the level of detail gets higher and higher.  And your render time gets longer and longer!

And so, our average human figure has approximately 20-40,000 polys.  But a piece of pie sculpted so that you can see the sugar crystals likely has 3 million.  My computer crashes and burns at 2 million in Blender, for reference.  With the new HD, Daz is able to handle level of detail on a pixel level, without crashing.  How does it do so?  That's where those maps and baking comes in!

Every type of map except displacement is a cheat.  That's why using displacements makes renders take longer!  But how exactly are normal maps, bump maps, specular maps and reflection maps etc "cheats"?  A good product maker has both a low poly and a high poly version of the thing he is making.  He sets up lights, just like we do when rendering.  It is very important how he sets up the lights...  they cannot shine directly down into the valley or you will not be able to see the difference between the depth and the height.  The must hit slightly from the side, creating light at the height, and shadow in the valley. But not so much to the side that it will contradict lighting information given later, at render time.  Lights are brought in to light it to the best of his ability to make it work in all lighting scenarios.  This takes skill!

He then takes a picture... makes a render...of the high poly model, and "bakes the texture" onto the low poly model in one of many ways.  In this way the texture details of the high poly model are preserved while the benefits of the low poly model are retained.  We see the results of these "baking" efforts as maps given to us by the product maker.  One thing to note... sometimes a product maker will give more maps than they use in the default set up of the product!  It is important to check the file folders to see that everything given is being applied. 

The one exception is the displacement map... that is indeed the high poly model.  Very taxing on the computer.  If you want to see the details of the displacement map, it is best to turn the level of sub-d up under the parameters tab.  The one time it is important to actually use a displacement map is when you are going to see a model in silouhette.  Since the displacement is the only map that actually creates bumpiness, if you are going to see a texture from the side, you need a displacement map, or else you will have some thing that is painted to have bumpy texture without being raised, and that would be odd!

The map people are most comfortable with is the diffuse, which is simply a map of the colors.  Since color has lightness and darkness to it, the color map will give some information about the texture.  But if the diffuse map is the only map that is used, everything will appear flat and lifeless in the render.  Even when it is too far away to see the details, light hits fuzzy sweaters differently than jeans, frilly bows differently than crocodile leather shoes. And from ten feet away you can tell a real piece of pie from a plastic one... the brain is very perceptive of subtlety.

The type of map we are most used to for texture is the bump map.  This map is grey, and in Daz, 50% grey is no movement up or down.  What do I mean by "up" and "down"?  Each of those polys in a model has a direction that it faces.  On the side that faces out, you can see it in a render.  From the reverse, it is invisible.  We don't see it as invisible in our render program because someone did us the favor of making it look two sided.  When a poly has 4 sides, but not all of them are telling the renderer the same information about which side is out, and which is in, it creates a hole in the"mesh".  The directionality of the polys is called "normals".  All the normals need to go the same way for the model to "work". They need to face out.

What a bump map does is pretend to move the poly perpendicular (out or in) to the normal.  White is "up" or "out" and black is "down" or "in".  Most bump maps seem very grey, it can be almost hard to tell there is anything there from far away.  That is because a little bit of difference from that 50% grey creates a lot of movement, it does not take much.  It doesn't actually move them, it just creates the shadows in the valleys and lights on the peaks as if it has.  Pretty nice way to cheat!  In Daz, you can control how much it moves "up" and "down" under the surfaces tab, with the "positive" and "negative" settings.  The default for many things is .15 and -.15.  (I find this to be way too much for children's skin, sometimes as little as .01 is all that is needed, depending on how much contrast the bump map has) The influence of the entire map can be adjusted with the strength setting.

Well, what then is that weird blue map called a "normal map?"  If you look close, it is not really blue at all. It is a bunch of teeny, tiny dots in red, blue and green.  Do those colors sound familiar?  They are the colors of the x, z, and y axis.  The normal map is a picture that a modelling program will create to tell the rendering program like Daz not just "in" or "out" from the normal, but how the poly is tipped and rotated in 3-d space.  When you plug that map in, Daz takes the information and uses it to make it look like the areas were angled, without actually angling them.  Normal maps are often used for more extreme changes in direction, where the shape or dimensionality created is important.  An example would be eyebrows.  The angle at which that little caterpillar begins to pull off the browline is important. Using a bump map would be not enough, a nice division is created with a normal map.  But too much detail would seem silly- a displacement map to model out every hair would make it look too much like fur!  Therefor we use the color map, the diffuse, to paint in lines, and the normal map, to give us the illusion that they have dimension off the brow, and the bump map to tell us how far out each hair lies.  Another example for the use of normal maps for referencing scale to the overall scale of the item would be tread on tires, buttons, pocket and seam lines on clothes, and the lattice on the pie. 

Another important map is a reflection map.  This is important in areas of high shine, like a new car hood, but also on fuzzy textures that have a bit of sparkle, like a sparkly sweater, or beaded trim, or the glints of light on a sugar crystals on pie. As expected, this map "bakes" the areas of brights.  What is cool these days about reflection maps is that the we can put an image of what our ceiling looks like in the little picture window. The reflection map is creating a reflection of "something" not just light from anywhere.  This adds a level of realism to renders, when the reflection matches the environment, when you can see a bulb dangling from the ceiling in the reflection on an upturned glass, for example. 

Notice that I skipped specular and chose reflection instead.  Specular 1 and Specular 2 are beyond cheats... they are interpolations of data.  They are leftover from the good old days. It is almost always more realistic to use reflection instead of specular for highlights as it takes the real lighting environment for the data about the light, as opposed to a set of mathematical principles. 

Many times we are not offered specular maps at all, but instead forced to rely on simply plugging in a "color" and hoping that one color works for all highlights... Or are we?  One way to do better than this, I have found, is to take the diffuse map that comes with the product, into photoshop.  I then make a very very contrasty, bright, version of it, and plug that into the specular 1 map slot.  Red hair, for example... if you shine light on the lightest hairs, it is a crazy bright orange, but the darker hairs, more of a bright brown.  Putting a map that approximates this in the specular slot is far better than the crazy rule someone once wrote that "specular highlights should be cool, a light blue"... you have no idea how ridiculous blue highlights look on red hair until you have been a new Daz user, not sure what all the dials meant, and took some very generalized advice.  When in doubt, a bright version of the diffuse will likely at least match the color scheme!  ;-)

Continuing to use the hair example, the specular one highlight is usually the bright, tighter highlight while the specular 2 highlight is softer.  The technicalities of why are not important.. but for Specular 2, I usually use a map between the two in brightness and contrast and make it softer and more spread out. Having two degrees of highlights adds realism.

There are of course, other maps, dials, and widgets.  One map that I like which Daz does not often use is "ambient occlusion".  Ambient, as in ambient light, the light around that doesn't have a direct light source, and occlusion, or shadows.  An ambient occlusion map creates a degree of sharpness because it tells you where the ambient light cant get to.  I am sure if I made my own shader there would be an option to include AO.

Very popular maps today are "SSS"  Sub surface scattering.  What exactly is it?  The best example I heard was what happens when you hold your fingers up in front of a very bright light source, such as the sun.  You can almost see right through them!  This is a great photo from wikipedia:http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Skin_Subsurface_Scattering.jpg/1024px-Skin_Subsurface_Scattering.jpg I love this: "many materials are slightly translucent: light enters the surface; is absorbed, scattered and re-emitted."  What we as artists do when rendering towards realism is try to tell the computer to do what we see being done in life. We have the option of telling it how much red green and blue light is absorbed, or does not ever escape out to be seen, and how much is reflected, does not ever get into the object to bounce around on the inside.  Often when I am trying to set up lights, I set the SSS absorb and scatter to be the same for all numbers, knowing I can set it back to defaults later.  Why?  It is often difficult to tell which colors are coming from the SSS settings, and which from the lights.  Turning the SSS settings to the same number makes them a neutral grey and thus helps me see where my lights are hitting more accurately.

Everyone seems to love SSS these days!  However, one caveat.  The more SSS percentage goes up, the more the ability to see details like pores and freckles goes down.  So sometimes it is important to decide which is more important.  A face set with diffuse to 100% and no SSS will look as hard as rock... but one with too much SSS will look like a washed out, squishy wax model.  Balance is the key.

This brings us back around to where we began- texture is perceived by lights and darks.  Peaks and valleys.  This be very careful of using colored lights when setting up the initial lighting scenario, particularly when rendering skin details.  A pink light will wash out the pinks on the diffuse map and cause the loss of visible details.  Likewise, be very cautious when plugging a color into the color option of diffuse or ambient maps. A pink color in the diffuse setting will have exactly the same "washing out" effect that a pink light would have.

Notice that I have completely disregarded the ambient map.  Why?  Because I hardly use it. Sometimes I add the diffuse map to it's slot, just for good measure.  The only uses for it I have found is if you are in a room that is low lit, and lights are not working to convey the dark color of the room.  In which case you could make the room seem darker by putting a darker color in the ambient color channel for the walls, floor, etc.  Also, if you wanted to use Om arealight base to make a light out of an object, you can override the 100% of the ambient under the limits gear dial, and allow it to be a light emitter.   

I know that this is a lot of information!  I hope that by explaining why, and how, maps are created, it would lead to an understanding of which maps are best for which situations.  Notice I didn't talk about creating textures in a 2-d program.  Doing so is a whole different world of techniques, programs, and lessons that many here are far better able to discuss than I.  If I had my choice, I would ALWAYS make all my texture maps in 3d modelling programs.  I would even include painting diffuse textures directly on the model...  but I have yet to find a free program to do so.  Maybe I will get realllllly lucky some day!

I often refer to Omnifreakers Ubersurface2 guide for help with his settings:
http://omnifreaker.com/index.php?title=UberSurface
BUT, I have found that anything with the word "Uber" in slows my render times.  How to improve render times is a subject for another tutorial, though!

However, whenever possible I prefer to use Age of Armors shaders.  They work faster, and for some materials like glass, give more settings and options, etc.
http://www.ageofarmour.com/3d/tutorials/AoA_subsurface_shader_help.html

Switching shaders is easy...  under the surfaces tab, select the object, which should highlight all the material groups.  Hold the control key down.. very important!!! dont ever forget to hold the control key down!  And double click on the shader you want to used from your contents pane.  Select "ignore" so it does not remove your maps.  And voila... new shader applied!  Often changing the shader will improve the way things look, particularly for reflective surfaces, Age of Armor is the better choice in my experience.

I consider this a WIP, and feedback on how to improve would be appreciated.  I hope people find it useful.

Offline sanbie

  • HEAD HONCHO
  • *FOUNDER*
  • Got There!
  • *
  • Posts: 16380
  • Life is a camera,What you focus on will develop
Re: What is texture and what maps do what?
« Reply #1 on: May 08, 2015, 07:02:06 PM »
 :bravo12: Very informative fiona  :yes: :thup:

Offline RLSprouse

  • Knocking at the door
  • *
  • Posts: 1
Re: What is texture and what maps do what?
« Reply #2 on: December 26, 2015, 03:36:48 AM »
Wow, I was so lucky to stumble on to this today - a late Christmas present.   :presents2:

This is a brilliant treatise! Thank you, fiona! How I wish I had seen this when I first started trying to learn all this 3D stuff.

Offline sanbie

  • HEAD HONCHO
  • *FOUNDER*
  • Got There!
  • *
  • Posts: 16380
  • Life is a camera,What you focus on will develop
Re: What is texture and what maps do what?
« Reply #3 on: December 26, 2015, 09:07:49 AM »
So glad you found something that could help you RLS...and welcome to the forum  :yes:

 :well: