Page Information

Versions Compared

Key

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

...

XGen is a powerful tool that offers many creative opportunities for positioning an arbitrary number of primitives either randomly or uniformly placed. You can use texture files with XGen Descriptions to specify the location and density of primitive generation as well as to control the number of primitive attributes. This tutorial will show you how you can very easily use a texture map to 'drive' the length, width, and depth of an XGen primitive. These primitives can range from spheres, splines or as in the example below, geometry that has been exported as an archive.

Center

Image rollover
0pyramids-render.jpg
1pyramids-maya.jpg

'Pyramid shape' archive distribution driven by a texture map (rollover image)

You are really only limited to your imagination as to what you can achieve using this method. Uses for this tutorial could range from using a map to drive the position of some trees on a landscape or as in this case, be used to create an odd looking face:

...

  • 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.

...

Warning

Ensure that the original Maya shader is assigned to the XGen description. Otherwise, otherwise this step will not work! After you have created the map, you can then convert it to a different shader.

...

  • The Map Name should say 'length'. 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.  

...

This is used to define the length attribute using the texture map, and 200 is the Map Resolution that we defined earlier.

...

  • Select the file texture and open the texture map that you want to use to drive the scale of the sphere primitives. Make sure to choose a texture map that has a lot of contrast and whose features are recognisable recognizable even at a small size. Too much incidental detail in the image will not transfer across well to the spheres. You can see in the example below, the effect that a grayscale ramp has on the length, width and depth scale of the sphere primitives:

...

Info

Remember to select the disk icon after updating the file texture used to define the primitive attributes. Otherwise, otherwise XGen will not update it, and the render will not change.

...