You are on page 1of 9

Material(shader) and texture documentation. (work in progress...

)
We will explain Fluffo's texture and shaders workflow and rules to serve as guideline for the creation of future
avatars or customization of exiting ones.
First of all, a photo documentation of a red panda was used to identify the features that can be
anthropomorphized in order to make the avatar more expressive. This step is not mandatory but definitely makes
the difference between believable or less believable.
After that, a 3D model was created. You can do the same by using any 3D modeling software you feel
comfortable or efficient as long as the end product meets the parameters described in the technical
documentation we provide regarding modeling and animation.

With the model finished, a texture mapping layout was created for each distinct feature: the face, eyes, eye
lashes, eye shade, mouth interior, goggles, body and bandana.
Each of these elements received one material (shader). A shader is a script containing instructions of how to
properly use the information stored in a number of bitmaps(textures) or model vertex color (each vertex of a
model contains color information in every one of the four channels: RGB and Alpha). The shader is meant to
mimic a real life material (ranging from skin and bone to metal, cloth and fur).

Textures used by shaders are bitmaps in *.tga file format with alpha channel. Texture size should be power of
two (16/16,32/32,64/64,128/128,256/256,512/512,1024/1024 pixels etc.).
Naming conventions used for textures should follow these rules:
First of all, do not use spaces in names, only short and meaningful words with emphasis on short :-).
avatarName+_+shaderName+_+textureType.tga
avatarName = Avatar name you consider appropriate.
shaderName = AvatarBodyPart name ex. :body, head, arms, goggles, Etc. the same used to name the
material on the 3Dmodel.
textureType =
d for diffuse textures.
b for normal map textures.
b1 for additional animated normal map textures
b2 for additional animated normal map textures
b3 for additional animated normal map textures
b4 for additional animated normal map textures
s for specular textures.
s2 additional specular texture.
sc for skin scatter textures.
ao for ambient occlusion textures.
m for fur mask textures
cm for color mask textures
iristext_d used only by sht_eye template for iris phenomena representation and properties.
raotext_d used only by sht_eye template to mimic a faked ambient and specular occlusion on
the eye ball.
For instance a texture named fluffo_face_d.tga represents:
fluffo avatarName
face shader name
d texture type, in this case diffuse texture

For props prefix avatar shouldn't be present.


The number of materials (shaders) used on a model it's recommended to be bellow 10.
Procedural texture maps will not work. Neither procedural block color. All shader input data should be texture
maps or geometry.
One avatar can use many(<=10) shaders, each with it's own material destination, for example some are used
specifically for skin while others for metal and cloth. The difference between such shaders consists in the
number and content of the textures, model's vertex color and the shader type.
For now we use a limited number of shader types and each is targeted towards a specific material.
sht_physfurnormals"
sht_furnonormals"
sht_furnormals"
sht_skinblendn"
sht_skinnoan"
sht_teethblendn"
sht_eye"
sht_hair"
sht_metalcloth"
sht_prelit"
We can conclude for now that for a certain avatar you have to produce a mapped and skinned 3D model with
assigned materials, and bitmap files corresponding to needed material types (shaders). Additional rules for
naming and technical parameters of these files are found in :FacerigModelDocumentation.doc
For an easier understanding we'll exemplify what texture or vertex color each of these templates require to
properly function.Lets start with the frequent ones, using Fluffo's showcase. Fluffo uses 10 Shaders(materials),
some of those shaders use the same shader type.

Shader Types:
1. sht_furnormals: Used in shaders for Fluffo's head and body, it is specific for furred or hairy surfaces. The
head and body uses distinct shaders, textures and vertex color but the same shader type is used.
To exemplify, will use the face shader.
It needs 7 textures and vertex color information in all four channels.
Here are specifications about vertex color content; RGB channels are used to specify the direction in which the
fur is growing and Alpha channel gives the fur length (0 value means no fur, 255 value for full fur length).Further
explanation about vertex color and how it can be obtain will be available later on, as soon as we overcame some
technical issues.

Textures are:

1. Diffuse texture:d
Represents the diffuse color of the object stored in RGB channels. Alpha channel is used to specify
transparency, 0(black)areas for full transparency and towards 255 (white) surfaces get increasingly opaque.
2. Normal map textures: b
Because a low poly-count model has to be used in application for increased frame rate, normal map textures are
used to compensate the absence of geometric detail and surface smoothness.
For this template we need one texture for a relaxed muscles shape of the avatar and another for tensed
muscles.
In case you do not know how to generate such textures, a file (in the above mentioned format) can be used as
default as long as it have RGB values of 127 127 255 and 255(white) in alpha channel.

3. Specular texture:s
RGB

ALPHA CHANNEL

Each RGB channel has different information.


Red channel gives information about the Glossiness factor >1 for rough surfaces 255 for shiny ones.
Between 1 to 5 for rough surfaces, 5 to 12 for a very little shine and increasingly shiner towards 255.
Green channel used to set values for different materials, from 0 for hair and cloth, to 255 for other
material types (metal, plastic, etc).
Blue channel: Emissive channel, is used to specify areas of object that remains unaffected by lighting
resulting in a light emitting effect when placed in the shadow (glow in the dark effect), 0 for non emissive and 255
for full emissivity.
Alpha channel gives information about the Specular Power 0 for no specular 255 full specular.
4. Fur mask texture:m
RGB

ALPHA CHANNEL

Green channel: Fur or hair transparency. We want the fur or hair to be transparent to see skin in areas

with a lot of information from normal maps, such as the face. 255 for full fur or hair,0 for no fur or hair.
Blue channel: Skin specular intensity.0 for no specular on skin (recommended for fur or hair areas), 255
for full specular on skin (good for skin, tongue, teeth, nails).
Red channel: Skin specular behavior(anisotropy). 255 values mean skin specular behaves like very
short fur or hair. 0 values mean skin specular behaves like normal specular.
Alpha channel: fur or hair clump distribution, 0 values for short hair and 255 for long hair.
5. Ambient Occlusion texture:ao
RGB

ALPHA CHANNEL

Red channel should hold the PPAO(Per Pixel Ambient Occlusion) information for tensed muscles.
Green channel should hold the directional attenuation information for relaxed muscles.
Direct light Attenuation 0 means no direct light (only ambient and radiosity) 255 full direct light intensity.
Blue channel should hold the directional attenuation information for tensed muscles.
Direct light Attenuation 0 means no direct light (only ambient and radiosity) 255 full direct light intensity.
Alpha channel should hold the PPAO information for relaxed muscles.
6. Colorize mask texture:cm
RGB

ALPHA CHANNEL

For color customization, a texture file is used to hold information about which areas of the model receives new
colors.
Texture areas filled with 0 (black) will allow color change and those filled with 255(white) will reject color change.
Areas ranging from 0 to 255 will also allow color change but it will be more obvious as they are closer to 0 value.
You can use RGB and Alpha channel and have 2 distinct color option and complex patterns.
2.sht_furnonormals" Has the same characteristics as sht_furnormals" except the animated normals feature,
uses one normal map texture.
3.sht_physfurnormals" Has the same characteristics as sht_furnormals" and features a physics
determinate movement of the fur
4.sht_metalcloth :Used on Fluffo's goggles and bandana.
Shader type targeted towards metal and cloth material representation, uses 9 textures.
Textures used:
1. Diffuse texture:d Same characteristics
2. Specular texture:s Same characteristics
3. Specular texture nr 2:s2
RGB contains general color tint of the specular
Alpha channel contains anisotropic specular intensity mask : 0 for normal specular 255 for anisotropic
specular.
4. Normal map textures:b One default normal map texture and 3 additional normal map textures used for
animated normals.
5. Ambient Occlusion texture:ao Each channel has AO information corresponding with normal maps textures:
Red channel: PPAO corespondent to normal map nr. 1
Green channel: PPAO corespondent to normal map nr. 2
Blue channel: PPAO corespondent to normal map nr. 3
Alpha channel: PPAO corespondent to default normal map.
6. Colorize mask texture:cm Same characteristics

5.sht_eye": Every avatar has to have no more no less then 2 eyes, each eye uses one shader. Uses 6
textures.
Textures used:
1. Diffuse texture: Same characteristics with one important limitation the center of the iris must be placed
precisely in the middle of the texture with no or minimal stretching.
2. Normal map texture: Same characteristics
3. Normal map texture nr2 : used to for TBD
4. Specular texture: Same characteristics
5. Iris texture:ristext_d Used for iris phenomena representation and properties.
The alpha channel holds the distance from the outer shape to the iris. Should be 0 outside the iris area
and 255 in the center of the iris area resulting gradient falloff should describe a dome.
The RGB (grayscale) defines the area affected by Pupil Dilation. 0 No effect, 255 max effect. Should be 0
outside the iris and 255 throughout the black area in the middle of the pupil. The gradient variation between that
0 and that 255 controls how realistic the iris stretch looks.
6. raotext_d: Environment reflexion and specular sharp occlusion mask and colorized ambient occlusion.
RGB holds Soft Colorized Ambient occlusion mask information. RGB 0 for maximum ambient occlusion
255 no occlusion.
Alpha channel holds environment reflexion and specular sharp occlusion mask. Alpha 0 for maximum
specular and environment occlusion and 255 for no occlusion.

6. sht_teethblendn Shader used for the interior of the mouth. Uses 11 textures.
1. Diffuse texture: Same characteristics
2. Specular texture:
Red channel gives information about the Glossiness factor >1 for rough surfaces 255 for shiny ones.
Between 1 to 5 for rough surfaces, 5 to 12 for a very little shine and increasingly shiner towards 255.
Green channel: PPAO corespondent to fully closed mouth.
Blue channel: Is used to specify areas of object that remains unaffected by lighting resulting in a light
emitting effect when placed in the shadow (glow in the dark effect), 0 for non emissive and 255 for full emissivity.
Alpha channel: Gives information about the Specular Power 0 no specular 255 full specular.
3. Scatter texture: sc Sub surface material properties.
Red channel: Range of sub surface scattering 0 for no sub surface scattering 255 max sub surface
scattering. Should fade towards 0 on mapping seams and on solid details such as piercings/jewelry.
Green channel: Direct light Attenuation 0 means no direct light (only ambient and radiosity) 255 full direct
light intensity.
Blue channel: Amount of diffuse light that scatters in the sub-surface vs the amount of light that bounces
right off. 0 means all light bounces right 255 all light scatters. A good default value would be 0.9 (229 229 229)
for fleshy areas. Should fade towards 0 on mapping seams and on solid details such as piercings/jewelry.
Alpha channel: Translucency intensity (ears, nostrils) 1 for no translucency 0 for max translucency.
4. Normal map textures: One default normal map texture and 4 additional normal map textures used for
animated normals.
5. Ambient Occlusion texture:
Red channel: PPAO corespondent to a normal opened mouth.
Green channel: PPAO corespondent to a fully closed mouth.
Blue channel: not used 255 default value.
Alpha channel: PPAO generated by a wide open mouth.
6. Colorize mask texture: Same characteristics
7. sht_hair" uses 4 textures.
1. Diffuse texture: Same characteristics
2. Normal map texture: Same characteristics
3. Specular texture: Used for ...TBD .
Red channel: Not used 255 default value.
4. Ambient Occlusion texture:
Red channel: Not used, 255 default value.
Green channel: Direct light Attenuation 0 means no direct light (only ambient and radiosity) 255 full
direct light intensity.
Blue channel: Not used, 255 default value.
Alpha channel: Base PPAO

8. sht_skinblendn" uses 10 textures. Especially designed for skin areas of the model.
1. Diffuse texture: Same characteristics
2. Normal map textures:b One default normal map texture and 4 additional normal map textures used for
animated normals.
3. Ambient Occlusion texture:ao Each channel has AO information corresponding with normal maps textures:
Red channel: PPAO corespondent to normal map nr. 1
Green channel: PPAO corespondent to normal map nr. 2
Blue channel: PPAO corespondent to normal map nr. 3
Alpha channel: PPAO corespondent to default normal map.
4. Specular texture:
Red channel gives information about the Glossiness factor >1 for rough surfaces 255 for shiny ones.
Between 1 to 5 for rough surfaces, 5 to 12 for a very little shine and increasingly shiner towards 255.
Green channel: PPAO corespondent to normal map nr. 4.
Blue channel: Is used to specify areas of object that remains unaffected by lighting resulting in a light
emitting effect when placed in the shadow (glow in the dark effect), 0 for non emissive and 255 for full emissivity.
Alpha channel: Gives information about the Specular Power 0 no specular 255 full specular.
5. Scatter texture: sc Sub surface material properties.
Red channel: Range of sub surface scattering 0 for no sub surface scattering 255 max sub surface
scattering. Should fade towards 0 on mapping seams and on solid details such as piercings/jewelry.
Green channel: Direct light Attenuation 0 means no direct light (only ambient and radiosity) 255 full direct
light intensity.
Blue channel: Amount of diffuse light that scatters in the sub-surface vs the amount of light that bounces
right off. 0 means all light bounces right 255 all light scatters. A good default value would be 0.9 (229 229 229)
for fleshy areas. Should fade towards 0 on mapping seams and on solid details such as piercings/jewelry.
Alpha channel: Translucency intensity (ears, nostrils) 1 for no translucency 0 for max translucency.
6. Colorize mask texture: Same characteristics
9.sht_skinnoan" Has the same characteristics as sht_skinblendn" except the animated normals feature, uses
one normal map texture.
10.sht_prelit" uses 1 texture and vertex color information. It is needed to map a small geometry ring around
the eye globes and eye lids to simulate eye shadow.
1. Diffuse texture: Small 64/64 pixels texture with RGB value of 128 and 255 value in alpha.
It uses alpha vertex color values for transparency, 255 opaque 0 full transparency , and RGB values for overall
color.
To be continued :)

You might also like