Frequently Asked Questions about XGen

 
 
 

What is Normal Compensation?
The generation of primitives occurs in the parametric patch space and not Euclidean (XYZ) space. For this reason, the distribution of primitives assumes a square patch to match up with the square parametric space. Normal compensation attempts to compensate for non-square patch distribution.

To compensate for non-square distribution, XGen finds the ratio of U and V iso-lines. For example, if a patch is twice as wide as it is tall, shape compensation adjusts the hair density so half as much hair is produced along the height. Basically, the compensation modifies the parametric space to match the Euclidean space, and then culls any points outside of the parametric domain.

What is the Parameterization Compensation?
As stated above. primitive generation occurs in the parametric space of the patch and not Euclidean (XYZ) space. For this reason, the primitive distribution assumes that the uniform parametric space matches the uniform surface area on the patch. Parameterization compensation corrects for any patches where the parametric spacing of iso-lines is not uniform.

An example of this is where you have a square patch, making Normals compensation unneeded, but the iso-lines contort so in Euclidean space, the center of the patch has a much smaller area than other similar parametric ranges in another location on the patch. This difference causes the primitives to appear very dense in the smaller area region and less dense in the large area region.

XGen compensates for this by finding an array of surface areas based on uniform parametric spacing. These areas are then compared and scaled to produce density compensation maps, which tell the generator to produce more primitives in regions of the patch that have greater area and produce fewer primitives where the area is less.

How do I regenerate my Parameterization compensation maps?
For optimization purposes, If a map exists for the patch it will be reused, XGen does not check for a change in the geometry. This is important since the Parameterization compensation maps should be generated on the patch-referenced model. To regenerate a map, click the Generate button next to Compensation.
NoteXGen does not automatically generate a map, so you must generate one.. You should only need to do this if there is a topology change or a change to the base model.
The Guide Renderer and Guide Generator seem misnamed
At first glance, the Guide Renderer and Guide Generator generator seem to be wrongly named. The Guide Renderer creates new guides. Remember that the generation process is what you would normally use for preview/render. It is the result that is different, which is not a primitive in the interactive display, or a primitive in the rendered image: it is a new guide.

The Guide Generator is used when you want to render primitives only where guides exist, as the Guide Generator only renders/previews the guides while not generating new primitives. The Guide Generator renders normally, produces an image or an interactive display. The generation process that is overridden so the primitives being generated are at the location of the guides, instead of a random location.

Why do primitives pop in and out when I animate my model?
The patch area is calculated at the binding time and then cached. A patch is considered bound when:
  • You manually bind it
  • It is loaded through a Maya scene
  • It is imported

Since rendering involves a description import, the patch is bound and the area calculated at that time. During a render, the patch can have a different area, due to deformation, per frame. This often results in varying numbers of primitives being generated. So, it is a good idea to use a patch-referenced model.

Why does my patch-referenced model still pop when I render?
A patch-referenced model is bound at the same time as the model geometry. If you load a scene and there is no patch reference, then it is not bound. If you then create a patch reference, XGen is not aware of it and it is not used. Therefore, if you create the patch reference after loading the scene, save and reload the scene so that XGen can bind the patch-referenced model properly.
How do I preview selected XGen patches or descriptions?
To Preview Selected, select one of the following:
  • a piece of geometry
  • an XGen patch
  • a description
  • a guide
Then choose one of the preview types for Selected objects. For example, choose “Selected: Current Description” to limit the preview to the faces related to the current selection and bound to the current description.
How do I set debug and statistics levels?
You can set debug levels two ways, based on how you use XGen.

Use the following command in the XGen Expression Editor:

xgmMessage -d <debuglevel> -s <statlevel> -w <warninglevel>
You can set the debug level by using the Debug modifier. See (Debug) for more .You can also set debug levels from the Log menu in the XGen window.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License