Page Information

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Center

 

In this tutorial, you are going to regress to a fun part of your childhood when you may have enjoyed playing with toy soldiers. Unlike your childhood, you will be using XGen to arrange the soldiers into interesting formations using expressions and texture maps as masks. We will also cover ways to add color to the individual soldiers using expressions and texture maps. For some real world inspiration, you should also look at some of the work by this artist and also this artist. Both artists use toy soldiers, among other things, to create interesting works of art.

...

    • It is good practice to lower the Percent value in the Preview/Output tab before continuing. If the Percent value is too high, you may find that your computer will stall due to the a large number of primitives generated.

...

  • MtoA will not gamma correct the Ai UserData Color node, therefore you . Therefore you will need to add a Maya Gamma Correct node in-between the Ai UserData Color node and the Color attribute of the Standard Surface shader as shown below. Change the Gamma RGB values to 0.454.

...

  • In the Name text field, type the same name that was used for the Color Attr Name with the Ai UserData Color node. In this case, we used the word 'color'. Click on float and change it to Color because this is the attribute that we want to change.

...

$border = 0.1150;
$u > $border && $u < (1-$border) && $v > $border && $v < (1-$border)

With each face, you can get the UV coordinates with $u and $v. With this expression, you only populate places where U is greater than 0.2, and less than 0.8 and V is greater than 0.2 and less than 0.8. This way we are getting a square in the middle of each face of the polygon plane.

...

  • The Map Name should say 'mask'. Increase the Map Resolution to around 200. This sets the resolution of the PTEX map in texels per-face. When using high-resolution textures, use larger Map Resolution values. After you have done that, click on Create.  

...

  • If we invert the map used for the mask, we can get transparency in the white areas used for the color map.

...

The map used for the mask is inverted, and therefore soldiers do not appear in the black areas.

...