GIG reference manual

GIG intercol maps tutorials

____________________________________________________________________________________

Section contents

____________________________________________________________________________________

The red and blue chessboard

A simple example of the conditional map.

  1. Click with the left mouse in the text box.
  2. Type in the text box:
    vchess(10,10) < 0.5 ? red : blue
  3. Type in the map name entry box a map name, for example chess.
  4. Select create map. A Map Frame with name chess is created.
  5. Select diffuse from the texture listbox.
  6. Click the map in the color field of the diffuse.
____________________________________________________________________________________

Conditional Maps

The chess map is used to combine two maps into one chessboard pattern.

  1. Click with the left mouse in the text box.
  2. Type in the text box:
    vchess(10,10) < 0.5 ? (ffract(10*mu())) : (ffract(10*(1-mu())))
  3. Type in the map name entry box a map name, for example morechess.
  4. Select create map. A Map Frame with name morechess is created.
  5. Select diffuse from the texture listbox.
  6. Click the map in the intensity field of the diffuse.
  7. If the map of the previous example was saved, click that map in the color field of the texture.

Another example:

  1. Click with the left mouse in the text box.
  2. Type in the text box:
    vchess(10,10) < 0.5 ? (noise(0.1)) : (sin(pi*4*mv()))
  3. Type in the map name entry box a map name, for example onemorechess.
  4. Select create map. A Map Frame with name onemorechess is created.
  5. Select diffuse from the texture listbox.
  6. Click the map in the intensity field of the diffuse.

____________________________________________________________________________________

Mathematics

In this example a sine function is used to create a wave pattern.

  1. Click with the left mouse in the text box.
  2. Type in the text box:
    bars = sin(10*pi*mv()) ; <enter>
    trfmap(bars,mu(),mv()+0.1*sin(mu()*2*pi))
  3. Type in the map name entry box a map name, for example waves.
  4. Select create map. A Map Frame with name waves is created.
  5. Select diffuse from the texture listbox.
  6. Click the map in the intensity field of the diffuse.
  7. Select a cube or plane from the files from the preview window.

____________________________________________________________________________________

The Japanese Flag

The following mathematical functions create all the same map.

  1. Click with the left mouse in the text box.
  2. Type in the text box one of the three functions below (all three will evaluate to the same map):
    (mu()-0.5)*(mu()-0.5)+(mv()-0.5)*(mv()-0.5)<0.25?red:white
    sqr(mu()-0.5)+sqr(mv()-0.5)<0.25?red:white
    hypot(mu()-0.5,mv()-0.5)<0.25?red:white
  3. Type in the map name entry box a map name, for example flag.
  4. Select create map. A Map Frame with name flag is created.
  5. Select diffuse from the texture listbox.
  6. Click the map in the color field of the diffuse.
  7. Select a cube or plane from the files from the preview window.
____________________________________________________________________________________

Nice Sky

Keep this one in mind as a nice background scene.

  1. Click with the left mouse in the text box.
  2. Type:
    rgbmap(noise(mv()),1,1)
  3. Type in the map name entry box a map name, for example clouds.
  4. Select create map. A Map Frame with name clouds is created.
  5. Select diffuse from the texture listbox.
  6. Select add parameter and give it name sky.
  7. Select add parameter and give it name clouds.
  8. Plug map clouds in parameter clouds.
  9. Select mv from the maps listbox and plug it into the parameter sky.
  10. Type in the color entry box clouds.
  11. Type in the intensity entry box 0.5 + (1-mv())/2.

____________________________________________________________________________________

Hello Krypton

Hope you're familiar with Superman.

  1. Click with the left mouse in the text box.
  2. Type:
    fracint()<0.5?blue:(fracint()<0.55:yellow:red)
  3. Type in the map name entry box a map name, for example kryp.
  4. Select create map. A Map Frame with name kryp is created.
  5. Select diffuse from the texture listbox.
  6. Plug map kryp in the color parameter.
  7. View the map on a ball.

____________________________________________________________________________________

Midnight Blues

A moonlit scene on a slightly cloudy night.

  1. Create a scene with a ball and a cube in front of the ball for the clouds.
  2. Go to solid construct, select ball
  3. Go to transform, select keyboard: size 14 <enter>
  4. Give it the tagname moon.
  5. Go to solid construct, select group, select cube
  6. Go to transform, select xyz size
    x:20 y:20 z:0 <enter>
    z position 45 <enter>
  7. Give it the tagname sky.
  8. Create a map for the clouds.
  9. Select intercol maps.
  10. Click with the left mouse in the text box.
  11. Type:
    mbound(fracint(),0.3,0.7)
  12. Type in the map name entry box a map name, for example clouds.
  13. Select create map. A Map Frame with name clouds is created.
  14. Select general.
  15. Select diffuse from the texture listbox.
  16. Select bumpnoise from the texture listbox and plug it in the diffuse.
  17. Type in the diff_val entry box 0.8.
  18. Type in the diff_col entry box (1,1,0.8).
  19. Type in the diff_amb entry box (0.5,0.5,0.4).
  20. Select moon in the tags listbox.
  21. Press put tag texture.
  22. Select refract from the texture listbox.
  23. Select sky (with side attribute number 0) in the tags listbox.
  24. Press put tag texture. The whole cube has become transparant now.
  25. Select diffuse from the texture listbox and plug it in the in the refract texture.
  26. Select add parameter of the refract texture and name it clouds.
  27. Plug the map clouds in the parameter clouds of the refract texture.
  28. Type in the refr_val clouds.
  29. Type in the diff_val 1-clouds.
  30. Select 6 times the sky attribute number in the tag listbox until the side attribute number of sky is 6.
  31. Press put tag texture. The refract texture is put on side number 6 of the cube.
  32. View the result in the RenderWindow.

____________________________________________________________________________________

Water

Animate water with a mapfunction.

  1. In 3DGO, create a cube and scale it to a convenient size.
  2. Water() needs an animation to run, so fix events for example on frame 0 and frame 100
  3. Go to attributes, add diffuse and click on bumpmap.
  4. In the bumpmap-intensitybox type: water(ripples,height,speed) For example: water(4,1,1)
  5. Render the animation
Remarks:

water() is an intercolfile in which 4 bumpwaves are animated towards a surface for simulation. This means that the number of ripples possibly can not exceed 20 because of unpredictable interference. The heigth is to be set between 0 and 1 The speed should be tested. The movement of the bumpwaves is towards the objects surface so it is possible to put the centre of one of them on the objects surface, which I think is an unwanted effect.

For an effective water-look it is best to reflect something in the water to avoid making oil.