banner



How To Animate The Population Of Spheres Using Xgen In Maya

Scene formed of XGen 'annal' cube primitives. A texture map drives the 'length' aspect, and an expression drives the 'twist' attribute.

XGen is a powerful tool that offers many creative opportunities for positioning an capricious number of primitives either randomly or uniformly placed. You can use texture maps in combination 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 yous how you can very hands employ a texture map to 'bulldoze' the length of an XGen archaic. These primitives tin can range from spheres, splines or as in the case beneath, cube geometry that has been exported as an archive. We volition and then use the $frame expression to animate the length of the archives. Finally, we will talk about how to batch render the blitheness using XGen and MtoA.

A video tutorial that goes through this procedure can be found here.

Archaic Annal

  • Commencement off by creating the polygon cube that you want to use equally the XGen archive. Leave the cube's scale at ane,one,one. We will adjust this afterwards with the XGen Sizeattribute.

  • With the cube selected go to Generate > Export Selection as Archive(due south)...

  • Rename theAnnal Nameto cube and choose where you desire to save the archive file.

XGen Description

  • Create a polygon plane. We will utilize this plane to assign the XGen description. If you desire the germination of the XGen primitives to exist round, so brand sure the Subdivisions Width  and Subdivisions Height are set to 1. If you desire the formation to be foursquare, and then increase the Subdivisions Width  and Subdivisions Height to 10. In this case, we have set up them to ane.

  • Select the polygon plane and become to Generate> Create Description . This will open upward the Create XGen Clarification beneath.
  • Cull Custom Geometry/ Athenaeum . Leave the other default settings alone and click on Create .

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

Twist Expression

  • NetherPrimitive Attributes, click on the downward pointing arrow  to the right of the Twist slider control.

  • Select the post-obit from the bill of fare:

Load Expression>samples>Geometry>flatten_Room

Y'all should see Width  and Depth  attributes announced underTwist.Increase the Twist Width to at to the lowest degree 200.

Density

You may need to change theDensityvalue depending on the values that yous take used in the Expression Editor. If the cube archives are too densely packed together, yous may want to reduce theDensityvalue. Conversely, if the cubes are too far apart, yous may demand to either increment the density or decrease the maximum width size.The images below show the effect that increasing the Density has on the number of primitives created by XGen.

Density 35000.0

  • Doubling theDensityvalue to 70000.0 produces the image below.

Density 70000.0

Length

Nosotros tin control the length (height) of the cubes using a combination of texture maps and expressions. We will start off by creating a texture map to control their length.

  • Click on the downward pointing pointer  to the correct of Length. Select Create Map... (it is important to note that this volition only work if the plane has a Maya shader assigned to information technology).

  • 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 usinghigh-resolution textures, apply larger Map Resolution values. After you have done that, click on Create.

Create a texture map

Now we want to add our texture map. Click on the pigment icon to the correct of the slider control . You lot should come across in the Hypershade and Node Editor windows that a file texture has been connected to the plane.

  • Select the file texture and open up the texture map that you want to use to bulldoze the length of the cube primitives. Make sure to choose a texture map that has a lot of contrast and whose features are recognizable fifty-fifty at a small size. Too much incidental detail in the paradigm will not transfer across well to the cubes.

Black and white texture used to drive 'length' of cube athenaeum (map used for top folio image).

  • Before nosotros render the scene nosotros must first tell XGen to update the file texture. Do this by clicking on the  disk icon for each length, width and depth attribute. Create a low-cal and render the scene.

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

Length Expression

  • Adjacent, click on theExpression icon  to the correct of the Length slider control.

  • You should see the following length  expression text in theExpression Editor.In theExpression Text Fieldyou lot should meet the following text:
$a=map('${DESC}/paintmaps/length');#3dpaint,200.0                      

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

  • Add the following line in theExpression Editor.

...where 20 is the maximum length of the cube annal and i is the minimum size. Your length Expression Editor should look similar the following image. Re-create the expression text. Click Accept when yous are done.

  • Paste the aforementioned expression that nosotros used for thelength here. Practise the same for theDepthattribute.

Animation

We tin use the $frame expression to add some blitheness to thelengthaspect of the XGen cube archive.

  • Open up the Expression Editor for the length aspect and add the following in the Editor window:
$a=map('${DESC}/paintmaps/length1');#3dpaint,200.0
$a=xx*$a+$frame+1;
$a
  • You may want to increase 20 to a higher value such as 40 in club to increase the size of the length attribute. Click on Accept. You should see that a slider called Framehas been created.
  • Go to frame i in the Fourth dimension Slider. Right click on Frame and choose Fix Primal. You may need to utilise a negative value so that the cubes start off with nada length.
  • Become to the end frame (for example 100) and create another keyframe for Frame(something like 25). Scrub through the Time Slider to view the animation. You should encounter that the cubes seem to grow in length during the animation.
  • You can as well effort keyframing the Twist Widthattribute to encounter the cubes twist into interesting formations. The example below uses values between 200 and 600.

Batch Return

Remember to exercise the following steps before batch rendering otherwise the XGen description will not render:

  • Save the scene.
  • With the geometry and XGen clarification selected get to File>Export Patches for Batch Return from the XGen clarification menu. If the XGen description has animation, enable animation and choose the Frame Range.Ensure that you lot have the AbcExport.mll loaded in the Plug-in Director otherwise it won't export the animation properly.
  • Relieve the scene.
  • Once you are happy with how the animation looks, y'all are prepare to gear up off a batch render blitheness.

Conclusion

That concludes this tutorial on animative formations of XGen primitive archives with texture maps and expressions. This is just one example of what this powerful tool is capable of. Effort experimenting with different texture maps and primitive types such every bit splines and spheres. Below are some farther examples using diverse textures continued to the lengthaspect.

Thanks toPedro Fernando Gómez for his assistance with XGen.

Source: https://docs.arnoldrenderer.com/display/a5AFMUG/Animating+Abstract+Patterns+in+XGen

Posted by: wellshasurseen.blogspot.com

0 Response to "How To Animate The Population Of Spheres Using Xgen In Maya"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel