How to actually get scatter points on the curve itself and not the CVs?
Quote 0 0
I think the requirements are light enough and can be easily achieved by a pointOnCurveInfo node in a loop.
Or you need a true procedural solution ?
This can be scripted very easily with any one of these: arrayExpression, pyExpression or point nodes.
Quote 0 0
Quote 0 0
Another way is to extrude the curve into very thin poly strip and scatter there.
Quote 0 0
I was experimenting with a couple ways to do that, along the lines of what Peter mentioned. So I thought I'd post it here.

Using the pointOnCurveInfo and a Python function that builds a new position array each frame. For an example of that, open ma scatterOnCurve__      

And then run this function in the script editor.

import maya.cmds as mc
import pymel.core as pm
def buildCurve():
    scatterCount = 50  # number of points to scatter/sample
    posArray = []    
    for i in range(scatterCount):
      et = 100.0/scatterCount*i
      v = mc.keyframe('distribCurve',t=(et,et),q=True,eval=True)
      pm.setAttr('pointOnCurveInfo1.parameter', v[0])
      p = pm.getAttr('pointOnCurveInfo1.position')
      pm.setAttr('pointCloudToCurve1.inArray', posArray, type="vectorArray")

An expression in the scene calls buildCurve every frame. You can set the number of points to distribute on the curve with the scatterCount variable. And the animation curve in the scene called distribCurve can have keys added to it to shift the density of points along the curve.
Quote 0 0

Add a Website Forum to your website.