A basic (rivet inspired) map spreader for arbitrary poly surfaces.
Places maya hair follicles (Maya Unlimed only) where ground objects texture is white or grey (treshold) and none where it is black. Constraints an instace of teh poly objects to each follicle.
Ground surface can still be changed (i.e. smoothed) after spreading.Install:
- Put ks_mapSpreadInstances.mel in you script directory.
- Start the GUI by typing "ks_mapSpreadInstances" in the script editor.
- Spreads und constrains instances of a poly objects on a poly ground object.
- Ground object UVs must be non-overlapping and in 0-1 range.
1) Place hair follicles:
Select ground object. Assign a texture to the color channel of a maya shader (no mentalray shaders supported yet). The black and white values of your texture determinated object density. Choose UV-range and grid density and hit "Place follicles on selected". Repeat until you like the density.
- "Treshold" and "Falloff" control the placement of objects in grey areas.
If "Randomize Placement" is off follicles are set in a regular grid.
The best way to get random placement is to add several different grid densities with high random values.
2) Place spread poly objects:
Select object to spread. Make sure pivot is set correctly.
Choose to use all follicles (pick object to spread only) or selected only (pick object to spread last). Hit "place geometry".
This will place an instance of the object at follicles in the scene.
Set the up-axis and random scale and rotation for the spread objects.
To do: still a lot (check if objects intersect, better random placement, handle UVs outside 0 to 1, make Nurbs ground planes work etc)
If you use this for a project please drop me a line.