GIG reference manual
TextureEditor tutorial
____________________________________________________________________________________
See also the Maps tutorial.
Tutorial 1: create your own adjustable two color mixer
- Select a cube from solid construct.
- size the cube by 2.5.
- tag cube "mycube".
- Set zoom to "2.5" in camera menu.
- Select TextureEditor from the tools menu.
- Select "diffuse" from the textures listbox and place it in the Texture Frame.
- Change "Add 3 parameters to the diffuse texture: "colorA", "colorB" and "m".
- Select "mu" from the maps listbox and plug it into the "m" parameter.
- Change contents of "colorA" parameter to "(1,0,0)" , change contents of "colorB" parameter to "(0,1,0)", and change contents of "diff_col" parameter to "m*colorA + (1-m)*colorB".
- Select "specular" from the textures listbox and plug it into the "diffuse" texture.
- Switch "colorA" and "colorB" to sliders. Mark parameter "m" for collapsing and collapse the "diffuse" texture.
The texture is now ready for adjustments.
Select "mycube" from the tag list and perform put tag texture. render the result.









____________________________________________________________________________________
Tutorial 2: create your own adjustable diffuse-reflective-specular texture
- Select a ball from solid construct.
- size the ball by 2.5.
- tag ball "myball".
- Set zoom to "5" in camera menu.
- Set environment color in render options submenu to "wolk()". render texted from render menu to "mytexted".
- Select TextureEditor from the tools menu.
- Select samplefile "mytexted" from files under preview window.
- Select "diffuse" from the textures listbox and place it in the Texture Frame.
- Change color of "diff_col" to for example red.
- Select "specular" from the textures listbox and plug it into the "diffuse" texture.
- Select "reflect" from the textures listbox and plug it into the "diffuse" texture.
- Add parameter "diff_refl".
- Switch "diff_val" from slider to input box. Change contents of "diff_val" to "diff_refl".
- Switch "refl_val" from slider to input box. Change contents of "diff_val" to "1-diff_refl".
- Switch "diff_refl" to slider and try to change it.
The texture is now ready for adjustments.
Select "myball" from the tag list and perform put tag texture. render the result.









____________________________________________________________________________________
Tutorial 3: create your own adjustable diffuse-specular-bump texture
- Select a ball from solid construct.
- size the ball by 2.5.
- tag ball "myball".
- Set zoom to "5" in camera menu.
- Select TextureEditor from the tools menu.
- Select "diffuse" from the textures listbox and place it in the Texture Frame. Select "bump" from the the textures listbox and plug it into the texture "diffuse".
- Add 2 parameters "b" and "bump_value".
- Select "fracbump" from the maps listbox and plug it into the parameter "b". Change the contents of "bump" to "bump_val*b". Adjust the limits of "bump_val" to new low limit: 0, new high limit: 5 (keep it as linear).
- Switch "bump_val" to slider and try to change the value.
- Select specular from the textures listbox and plug it into texture "diffuse". Mark "bump" and "b" for collapsing and collapse the texture "diffuse".
The texture is now ready for adjustments.
Select "myball" from the tag list and perform put tag texture. render the result.









____________________________________________________________________________________
Tutorial 4: create and visualize a glass-specular texture
- Select a ball from solid construct.
- size the ball by 2.5.
- tag ball "myball"
- Set zoom to "5" in camera menu.
- Select TextureEditor from the tools menu
- Double click on the texture "glass" in the textures listbox. It will be placed automatically in the Texture Frame.
- Select "specular" from the textures listbox and plug it into the "glass" texture.
- Change the input box "spec_index" to a slider and change the value to aproximately 200
- Select intercol maps
- Input as map text: "wolk()" and as map name: "mycloud". Perform 'create map'.
- "mycloud" will now apear in the texture sheet.
- Activate 'reflection map' from the "mycloud" map. This colormap will now be used as a reflection map in the TextureEditor.
- Go to intercol maps again and enter as map text: "hsvmap(noise(),fracint(),fracint())" and as map name: "mybackground". Perform 'create map'. This map will also appear in the texture sheet.
- Activate 'transparency map' from the "mycloud" map. This colormap will now be used as the default background for transparent textures
- Change the glass_index slider to a value of 1.4.
- Also try to change "glass_refl", the glass tran color "glass_tran".
- The thickness of the previewed glass texture can be changed by the transp thickness variable from the options menu.
The texture is now ready for adjustments.
Select "myball" from the tag list and perform put tag texture. render the result. Be aware of the fact that the reflection- and transparency maps of the TextureEditor have nothing to do with the render options submenu values of background and environment.









____________________________________________________________________________________
- Select TextureEditor from the tools menu
- Select "diffuse" from the textures listbox and place the texture in the Texture Frame
- Select "specular" from the textures listbox and plug it onto the diffuse texture
- Select "reflect" from the textures listbox and plug it onto the diffuse texture
- Add 2 parameters "diff_refl" and "hue".
- Change diff_val into "1-diff_refl"
- Change diff_col into "[hue,0.444,0.81]"
- Change diff_amb into "[hue,1,0.25]"
- Change spec_col into "diff_col"
- Change spec_index into "2"
- Change refl_val into "diff_refl"
- Change refl_col into "[hue,0.241,0.87]"
- Switch diff_refl and hue to sliders
- Mark diff_val, diff_col, diff_amb, spec_val, spec_col, spec_index, refl_val and refl_col for collapsing
- collapse the texture
- Perform a save as on the texture with your favorite name for it.
The texture is now ready to use. Remember to use the "reflection map" variable to get the best preview result of the gold texture.









____________________________________________________________________________________
Tutorial 6: putting the sticker on the bottle
This example allows you to transform two maps independently from each
other, which might be usefull when you want to put a sticker (file map
1) on an object with another texture.
- Select "diffuse" from the textures listbox.
- Select four times "add parameter" with the following names:
- trf1, mask, map1, and map2
- Select "trf2" from the maps listbox and plug it into the trf1
parameter of the "diffuse" texture. New transform parameters are added.
- Select "mask" from the maps listbox and plug it into the mask
parameter of the "diffuse" texture. New mask parameters are added.
- Type "red" in the map1 parameter of the "diffuse" texture.
- Type "green" in the map2 parameter of the "diffuse" texture.
- Type "trf@maks*map1" in the diff_col parameter of the "diffuse"
texture. This allows you to transform the map1.
- Type "0.5" in the scx parameter of the transform parameter of the
"diffuse" texture.
- Type "0.5" in the scy parameter of the transform parameter of the
"diffuse" texture.
- Set the dx, dy, and rot parameters to scales and pull on the
sliders to see the effect.
- Type "trf@mask" in the diff_val parameter of the "diffuse" texture.
- Select "diffuse" from the textures listbox
and plug it into the "diffuse"
texture.
- Type "1-trf@mask" in the diff_val1 parameter of the "diffuse" texture.
- Type "map2" in the diff_col1 parameter of the "diffuse" texture.
With the dx, dy, rot, scx, and scy parameters you may position and
scale map1 on map2. In
the map1 and map2 parameters you might plug any color file map. That
means also scanned images. The effect is then more clearer.
You can also independently scale and rotate map2 from map1.
- Select "add parameter" with the name trf2.
- Select "trf2" from the maps listbox and plug it into the trf2
parameter of the "diffuse" texture. New transform parameters are added.
- Set the dx1, dy1, rot1, scx1, and scy1 parameters to scales and
pull on the sliders to see the effect.
This texture might be saved and used every time with different map1
and map2 to place maps on objects. The texture can be put on an object
of GIG by put tag texture. If it is an object in GIG that is rendered
with render texted than map1 might be interactively placed on the
object in the Preview Window when this file was selected.
Related topics










