Adverti horiz upsell

polyScatter -- Spread objects across a surface 1.0.0 for Maya (maya script)

The script focuses on scattering objects without any unnecessary cluttering or unwanted holes.

License
Button download
15,307 Downloads

Compatibility

  • 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 9.x, 2009, 2008, 8.x

Operating Systems

  • Mac
  • Windows

History

Created:07/05/2011
Last Modified:09/27/2016
File Size: 6.81 KB

Keywords

maya, mel, modeling, Tips

polyScatter is for distributing objects across a surface and yes, I am aware of the fact that there are already some (and quite useful) scripts available. But everything I tried didn’t give the expected results, no matter how the process worked. There are either scripts that emit particles based on textures, some that let the user paint objects on the surface and some that use some other random placement configuration. But the result is usually rather spotty, meaning that the distribution of objects shows either large gaps or the objects are very closely placed right next to each other. This might work in certain situations but I needed something more evenly spread out since I needed to create a large grass plane (without any use of hair or anything) and also trees, bushes and things like that.

So I came up with the idea of using the grid structure of the scatter surface to generate the objects, using the positions of the vertices. With an optional offset of the vertices the resulting placement is not visible as being based on a grid and still the copies will be evenly spread out without any particular gaps or clusters.

The script itself is pretty straight forward. The user can only do what he’s supposed to do and this should lead to less errors. All modifications are being made on a copy of the original surface leaving it untouched in the background.

 

Installation:

Just copy the script to any script directory that is accessed via maya. Run the script by executing “icPolyScatter” (without quotes) in the script editor. You may as well build a shelf button for easy access.

 

Parameters:

- Scatter Name: You must define a scatter name in order to access the functions. This name is added to all generated nodes and helps any naming problems.

- Vertices: The vertex count of the (reduced) scatter surface. Surfaces up to 1000 vertices should still perform fine. The higher the count the slower the script will execute it’s functions.

- Reduce %: The amount of poly reduction that is applied to the surface to reduce the density of vertices and to help with the distribution. Use the ‘Edit‘ button to adjust the poly reduce node.

- Max Face Area: Displays the maximum face area that will not be subdivided. This value is based on the average area of every 5th face. Higher values lead to less faces being subdivided when using the subdivision option.

- Random Offset: Defines the maximum offset for a vertex when displaced. The calculated value is a 3rd of the average edge length. This helps to beak up any regularity of dense scatterings.

- Subdivide: Subdivides any face which area is above the given ‘Max Face Area‘ value.

When applying the displacement any vertices that are generated by either the subdivision option or the poly reduction process will be conformed to match the height of the underlying original surface. This should prevent any positional offsets which can make the instances float above or below the surface.

- Position Offset: Offsets the instances to above or below the surface. This is only an offset and not an absolute value. The value can be interactively adjusted once the scattering is completed.

- Rotation Offset: The maximum amount in both directions that each instance gets rotated along the y axis. The value can be interactively adjusted once the scattering is completed. The attribute is not available after scattering when using the ‘Align To Surface Option‘, as the alignment is only calculated during the initial scattering. If another value is needed the scattering must first be undone.

- Tilt Offset: The maximum amount in both directions that each instance gets tilted along the x axis. The value can be interactively adjusted once the scattering is completed. The attribute is not available after scattering when using the ‘Align To Surface Option‘, as the alignment is only calculated during the initial scattering. If another value is needed the scattering must first be undone.

- Scale Offset: The maximum uniform scale amount that modifies the original scale of the scatter object. The value can be interactively adjusted once the scattering is completed.

- Min Distance: The minimum distance the instances should be apart from another. This is an additional function to help with any clustering of instances.

- Dropout %: Generates holes in the scatter. The higher the value the higher the chance that a vertex is skipped.

- Include Small Area Vertices: On: The dropout percentage is calculated from all vertices, including the vertices from small faces. This results in a little sparser scattering. Works only with the reduction feature.

- Assign IDs: Set to the amount of different objects to instance. Automatically assigns IDs to the instancer to randomly assign different scatter objects. The value can be interactively adjusted once the scattering is completed.

- Align To Surface: Rotates each instance to make it perpendicular to the surface.



Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • Craig Towsley
    Craig Towsley
  • trabi0
    trabi0
  • hk
    hk
  • david negra
    david negra
  • Liensch
    Liensch
  • Ivan Arsic
    Ivan Arsic
  • xtvjxk
    xtvjxk
  • Dmitry Shcherbakov
    Dmitry Shcherbakov