.......... / shader / multichannel tutorial / STEP 2

Small multichannel rendering tutorial | Realsoft 3D 4.5

INTRO
STEP 1 [setup the channels]
STEP 2 [the fun of masks]
STEP 3 [specularity]
STEP 4 [the reflection]
STEP 5 [the depth]
STEP 6 [lets render]
STEP 7 [post editing]

STEP 2 [the fun of masks]
Ball mask

ground grid mask


Now we have to fill the channels with data. The simplest ones are the mask channels so we will start with them:

Select the material of the ball (metallic02) and open the 'properties window'. In the 'Surface properties shader' create a new 'constant' with value = 1 and output = surface: Alpha_ball [fig 05]. With this constant you assign the value 1 to this surface (which means white) while the other surfaces in the scene which doesn't have this constant will appear with the value 0 in this channel (which means black).



Now repeat the step for the other materials and mask channels:
  • Select the 'finished_wood02' material - add a constant in surface properties shader with value = 1 and output = surface: Alpha_woodthing
  • Select the 'ground' material - add a constant in surface properties shader with value = 1 and output = surface: Alpha_ground
You can also use the object properties window to assign a value to a channel:
  • Select the mesh in the 'mesh5+parallel Mapping11(..)' Level
  • Open the properties window and go the 'Col' tab
  • In the 'Attribute' drop down select the 'Alpha_oldthing' channel and change the value to 1
Now a little bit more tricky one: the mask for the grid of the ground [fig 06]:
  • Select the 'ground' material
  • In surface 'surface properties shader' add a color variable and name it 'Mask_Grid'
  • Duplicate the existing 'Texture(map coords)' object and change the output to 'surface: Mask_Grid'
  • Add a 'operation' object change the type to '1-p1' (invert the value) and change input = 'surface: Mask_Grid' and output = 'surface: Alpha_ground_grid'
  • So we get a mask channel of the grid pattern


faded channel


If you want to mask the walls you can use the build in default alpha channel. Just select the walls, open the properties window, go to col tab and select alpha in the drop down. Change the value from 0 to 1 and they will appear white in the default alpha channel.

We should be ready with the masks channels now. Just Imagine what properties you can mask. Labels, parts of surfaces and so on.

If you want to mask faded or transparent objects not with solid but with a semitransparent masks just use a 'copy' object to fill the channel. For example 'copy' with input 'surface: fade' and output 'surface: my_mask_channel'.
Maybe you want invert this value to get a 100% mask where the object is solid and a 0% mask where the object is clear, then you can use an 'operation' object (type 1-p1) instead of the 'copy' object.

For example [fig 07]: 'operation', 'type=1-p1', input='surface: fade', output='surface: my_mask_channel'



Continue to STEP 3 ...


www.bt-3d.de
© BT-GRAFIK 
info@bt-grafik.de