Upload
phamtram
View
220
Download
1
Embed Size (px)
Citation preview
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
1
CREATING TEXTURE MAPS IN GIMP HOW TO CREATE DIFFUSE, NORMAL AND SPECULAR MAPS FROM A PHOTO IN VIEW OF ADDING MATERIALS IN SECOND LIFE®.
1. WHAT ARE TEXTURE MAPS?
Texture mapping is a method for adding detail, surface texture (a bitmap or raster image), or color
to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by
Edwin Catmull in 1974. A texture map is applied (mapped) to the surface of a shape or polygon. This
process is akin to applying patterned paper to a plain white box. 1
1.1 WHICH TEXTURE MAPS SHOULD BE CREATED FOR SECOND LIFE®?
1. The diffuse map or what used to be called a ‘texture’ in Second Life®. 2. The normal map created from the diffuse map also called bump map. 3. The specular map created from the diffuse map.
1.1.1 SEAMLESS DIFFUSE MAP
Textures applied in Second Life® are seamless.
The original texture is a photo cut out to:
1024 x 1024 - 512 x 512 - 256 x 256
1 http://en.wikipedia.org/wiki/Texture_mapping
Figure 1- Normal, specular, diffuse maps or materials
Why should we make the textures seamless before being applied to a prim?
When a texture is not seamless and it is applied
to a prim it will look like individual rectangles
that are tiled. When a texture is made seamless
the applied tiled texture looks smooth without
transistions.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
2
1.1.2 NORMAL MAP
In 3D computer graphics, normal mapping, or "Dot3 bump mapping", is a technique used for faking
the lighting of bumps and dents – an implementation of bump mapping. It is used to add details
without using more polygons. A common use of this technique is to greatly enhance the appearance
and details of a low polygon model by generating a normal map from a high polygon model or height
map. Normal maps are commonly stored as regular RGB images where the RGB components
correspond to the X, Y, and Z coordinates, respectively, of the surface normal.2
1.1.3 SPECULAR MAP
In computer graphics, it means the quantity used in three-dimensional (3D) rendering which
represents the amount of reflectivity a surface has. It is a key component in determining the
brightness of specular highlights, along with shininess to determine the size of the highlights.3
Read More on http://blog.digitaltutors.com/understanding-difference-texture-maps/
2 REQUIREMENTS BEFORE STARTING THIS TUTORIAL
2.1 SEAMLESS TEXTURE MADE FROM A PHOTO
We are working with a photo in this tutorial. Use one of your own texture photos or download from
a reputable source and check the licensing as some graphics suppliers do not allow to upload their
textures, even if manipulated, to Second Life
2.2 INSTALLING GIMP + THE NORMAL MAP PLUGIN
• GIMP install link http://www.gimp.org/downloads/
2 http://en.wikipedia.org/wiki/Normal_mapping 3 http://en.wikipedia.org/wiki/Specularity
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
3
• GIMP normal map plugin install link https://code.google.com/archive/p/gimp-
normalmap/downloads - Download and unzip this folder.
• GIMP Plugin folder content:
• There are three DLL files and one EXE file.
• Copy the files as explained in the readme.txt:
1. To install, extract the normalmap.exe file to your GIMP plugins directory. This directory is
usually located at: C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins
2. Then extract the 3 DLL files to your GIMP bin directory. This directory is usually located at:
C:\Program Files\GIMP 2\bin
2.3 BASIC KNOWLEDGE OF GIMP – OR ANY GRAPHICS APPLICATION
• This is not a beginner’s course and each participant should have basic knowledge of a
graphics application.
• Participants should be able to:
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
4
o Create a new art board
o Open new images
o Scale images and crop images
o Export images as PNG
o Create layers and duplicate layers
o Add alpha channels
3 OVERVIEW AND THE PROCESS OF CREATING MAPS IN GIMP
1. Cropping the original texture image to 1024 x 1024.
2. Making the original photo seamless in GIMP.
3. Creating the normal map – (turns into a blue texture)
a. Desaturate
b. Adjust colour curves
c. Create normal –bumpy blue - map
4. Creating the specular map – (turns into a black/white texture)
a. Desaturate
b. Adjust colour levels
3.1 WORKING ON THE DIFFUSE MAP: CUTTING OUT, MAKING IT SEAMLESS & ADDING AN ALPHA CHANNEL
3.1.1 Cutting out 1024 x 1024: Select the crop tool and cut out 1024 x 1024 rectangle of
the image. Press enter and ‘Export’ with a new name which includes the letters
‘DIFF’.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
5
3.1.2 Making image seamless: In the GIMP menu go to ‘Filters / Map / Make Seamless’
and save.
Work on
adjusting the brightness
and contrast levels after
making the image
seamless as making an
image seamless can
leave some unevenness
behind.
3.1.3 Adding the alpha channel: In the Layers panel, right-click on the active layer, in the
menu choose ‘Add alpha channel’.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
6
In
the channels panels you should now
see the alpha channel under the red,
green, blue channels.
3.2 CREATING THE NORMAL MAP
3.2.1 In the Layers panel duplicate the current layer and rename with DIFF at the end.
3.2.2 Untick the current layer to work only on the new layer and rename with NRML at
the end.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
7
3.2.3 Select the duplicated layer, then go the GIMP menu to ‘Colour / Desaturate’ and
click OK with the ‘Lightness’ radio box ticked.
3.2.4 In the GIMP menu go to ‘Color / Curves’.
Move the curves as shown in the image to create a contrasting black and white
image. To get this part right takes a bit of practise; in the next step when you
actually create the normal map you can see how the ‘bumps’ are created.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
8
3.2.5 In the GIMP menu go to ‘Filters / Map / Normal Map’.
3.2.6 Now click on the 3D Preview to see the bump details. Then use the rotate object
round tool to rotate the 3D preview quad sideways.
3.2.7 Now click on the drop down menu for ‘filter’ and try each type of filter: 4 sample,
Sobel 3 x 3, Sobel 5 x 5, Prewitt 3 x 3 . . . and choose what most suit your texture.
Again choosing the right filter is a matter of trial and error and practise until you get
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
9
the right effect for your texture map.
The 3D preview shows clearly how the bumps will be formed; work on the effect until you
are happy with the result.
Play with the Minimum Z, Scale and height source to see how it affects the 3D preview.
3.2.8 In the ‘Normalmap – 3D preview’ select the actual texture so that you view the
bump map and the texture at the same time.
3.2.9 In Layers make sure that the normal map is visible and the original layer not ticked.
In the GIMP menu go to ‘File / Export As’ save it to a folder with the same name as
the texture name, fi.
‘WoodplanksClean’ then export
the normal map as
‘WoodPlanksCleanNRML’ where
NRML stands for ‘Normal Map’.
Exporting should save it as a JPG.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
10
3.3 CREATING THE SPECULAR MAP
3.3.1 In the Layers panel copy the
original layer and place it above
or below the normal map layer,
it doesn’t matter where.
3.3.2 Now ‘desaturate’ this layer as you did with the normal map layer.
3.3.3 Next in GIMP menu go to ‘Color / Levels’ and move the levels arrows to the middle
thus creating a contrast with the black (no light reflection) and white (full light
reflection) depending on the type of material and how much light it reflects.
Note: It is good practise to look at real life reflections of our daily objects; I found myself doing just that and realising that some materials that seemingly in my unobservant mind did not reflect light in fact they did reflect a lot of light.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
11
APPLYING WHAT YOU SEE IN REAL LIFE TO YOUR 3D ASSETS MAKES YOUR OBJECTS MORE BELIEVABLE.
IN THE LAYERS PANEL UNTICK ALL LAYERS EXCEPT THE NEW ‘SPECULAR’ LAYER AND EXPORT IT AS ‘WOODPLANKSCLEANSPEC’ WHERE SPEC STANDS FOR ‘SPECULAR MAP’.
3.4 Go to ‘File/Export As’, click on the + sign at the bottom of the window and choose JPG in
the list.
Note : Saving as PNG is not suitable for textures that do not contain any transparent areas,
especially for assets that have textures facing each other. When you use PNG textures they
can conteract with each other and give a very unnatural flip to the two facing textures, this
is something to avoid at all costs.
3.4.1 Save your XCF file for further use.
3.4.2 Save the top texture: with the original layer ticked export the ‘WoodPlanksCleanDIFF’ where DIFF stands for ‘diffuse Map’ or texture (the one on top of the normal map and the specular map) and ‘Export As’ JPG as well.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
12
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
13
4 APPLYING THE MAPS IN SECOND LIFE®
4.1 In SL™ create a new folder in your inventory with the name of the textures for instance
‘WoodPlanksClean’. Upload the 3 texture maps into Second Life and move these into the
newly made folder.
4.2 Slide each of the textures from your inventory into their corresponding texture slots.
4.3 You can use it as ‘Planar’ or ‘Default’ mapping, it depends what you are texturing but with three
textures layered on top of each other they need to be aligned to each other. If not the
underlying normal and specular map will look out of place.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. GIMP Tutorials by Martine Moeykens (Mizou Vavoom in Second Life®) -- Thursday, 21 May 2015-Review 2017 GIMP – Creating Texture Maps: diffuse, normal, specular maps
14
SOME EXAMPLES OF THE DIFFERENCE IN SL™ WITH THE TEXTURES IN PLACE
Examples 1, left wall has DIFF + NRML map, right wall has also the SPEC map.
Examples 2 - Light reflection on the stone wall and the wooden ceiling above
Examples 3 - Light reflection on the tiled floor.