Monday 25 September 2017

Experiments in creating organic shapes from particle motion and curves

  1. Particle set up for testing
SETUP_NPARTICAL_MOVE

2. Turn these particles into curves. There are two ways to do this.

The first way involves expressions which allow the curves to be draw in real time. 3D Splanchnic has a tutorial showing what to put where. Watch it HERE.
code for expressions:
mel_Parts_to_curve
(update: if ( frame%10 == 0)  is simpler)
The second is a script. Bryan Woodward’s 'ParticletoTube' Script for Maya makes tubes out of particles by first creating curves. The first part of the script loops through the timeline frames for "theParticle" and then uses a nested loop to capture each "particlesPosition" and draws each curve form the "pointList". Read about the script HERE:.

Code:
partsToCurvesScript

Now curves can be generated from the particle positions:
CurvesFromParticles02

nParticles_plus_mash.jpg

3. Finally a script is needed to turn these curves into organic looking geometry. Andrew Tubelli has a nice script for doing just that. Download it from his site HERE. The code simplifies what would be an annoying task by adding a UI with a few friendly sliders:
coral2

Completing the process via the Maya UI instead of the script:
nParticles_to_poly_old_way

The code rebuilds the curves based on "arcLen", creates nParticles for the curves and evaluates a mel command to create polygons with the ability to set attributes Via a UI.


curveToGeoScript
Note: Some variable Changes are occasionally needed. For example the  curves generated by particles can be excessive - Try changing the (arcLen)*5 to say (arcLen)/5 or adding it into the UI.
I also needed to up the '.maxTriangleResolution' count.

Example:


4. A few shapes generated by moving a  passive collider around so as to alter the particle motion..
 
5. Now an experiment just from wires. I used a skull I previously modeled to draw curves on and then turned the curves into geometry.

 

Preiew render experiment
Some paint effect brushes added:

No comments:

Post a Comment