The main benefit is a cleaner looking connection graph in the hypergraph. With clusters you have groupParts, groupIDs, the cluster and the clusterHandle and the whole thing graphs out looking like a staircase as you’re looking at a full construction history on the curve. However if you use decomposeMatrix you have a much clearer relationship between the curve and what’s driving it.
:¬)
connecting to curve control points
totally agree. Also i dont see why i have to use a deformer like clusters when cna be easily done with cleaner way .
Hi guys, I’ve got these warnings here :
// Warning: file: Cannot add the following items to the set since the set has restrictions on membership: charNameSpline_crv.ep[4] //
// Warning: file: None of the items can be added to the set //
Which are slowing down my script a lot… any ideas ?
Cheers
It’s hard to know where these warnings are coming from without any context. Could you elaborate?
:¬)
Yes sure.
Basically here’s a chunk of code:
for ($counter = 1; $counter < ($NumberOfCV - 1); $counter++) { select -r ($ii + ".ep[" + $x + "] "); string $TempCluster_[] = `cluster -n TempCluster`; float $clusterxyz[] = `xform -q -rp $TempCluster_[1]`; float $jointX = $clusterxyz[0]; float $jointY = $clusterxyz[1]; float $jointZ = $clusterxyz[2];
If you replace .ep with .cv I don’t get those warnings anymore, there must be something related to the clusters or the type of selections…
Hope it’s clearer …
I know but the number and the position of the objects that I get is not what I want with the cv…
So do you want to build a curve from the position of some transforms but also have the curve fit those nodes?
If so, you might have some luck by building a degree 1 curve from the transforms, connecting them to the CVs (through a decomposeMatrix for example) and then doing a fitBspline on it.
:¬)
I recently came across the Point On Curve Deformer. It may be a good alternative for you. It only creates two nodes, a locator (which you could use, or replace the shape node of the locator with a curve shape if that’s preferred), and one other node called ‘leastSquaresModifier’. Ok, there’s another hidden object that is created, because this is a deformer, the original shape is stored and becomes an intermediate object. The great thing about it is that when you move the locator, the curve always ‘sticks’ to it, unlike the results when moving a CV.
[ol]
[li]Create a curve.[/li][li]Select an EP (not a CV). Or, select all of your EPs, the deformer will create one locator for each EP.[/li][li]Go to Animation>Create Deformers>Point On Curve.[/li][li]Select the newly created Locator(s) and Modify>Center Pivot. (The pivot is at the origin by default)[/li][/ol]
Hello Mats, Brad and everyone
Just a quick tip:

My first try , when I wanted to simplify my network( apart from creating asset container )was to use the locator shape worldPosition attribute. If the driven curve is parented to a group with inherits transform off and don’t move it’s fine but ( a fool proof ) more solid approach is to include the parent transform with a pointMatrixMult node

The next step was to compact these point/matrix multiplication into a python node(a really simple exercice, but fun nonetheless).

Why duplicating node to retrieve a position in world space? The last step was to use a regular transform worldMatrix as an incoming information.
For your curve that pass through a set of points and are not interpolated between them , maya lets you do this with an editpoint curve:
The same functionality is exposed in the API:
- curve creation with cv position and knotVector list
- or just edit point position…
a python node that feed a regular nurbsCurve

This node gather a list of point position and ouput curve data, you can control the curve degree with a simple int attribute. It works but the curve tangent are not controllable with this method: this is the same behavior with maya leastSquare node.
you can grab a zip archive with this 3 node here: http://circecharacterworks.files.wordpress.com/2012/04/cv_driver_tools.pdf ( dont forget to replace ‘.pdf’ by ‘.zip’ )
@ giordi: yeah the 3 nodes have input array attribute of type double3.
Conceptually having each cv separated with different nodes doesn’t trigger all the output information but even with 150 element and a python node this type of computation remains fast.
One possible extension to this concept is to write a transform node where we can directly plug a matrix attribute and perhaps choose what transformation is active
yeah that would be cool .
If i get it right your node output is just the result out of MFnNurbsCurve create method right?
yes, with the simplest method : createWithEditPoint: you dont have to build a knot vector list which is dependent on the curve degree just pass an MPointArray and its done
with typed attribute like mesh , curve kdoubleArray etc we use a MFn_yourdatatypeData function to hold the data and ultimately we pass an MOject to the output attribute
I think you could achieve the same thing without code (or with to automate it) using the fitBspline method I mentioned above. I’ve attached an example setup.
:¬)
Sweet example Brad…
Much more stable to use.:
Yeah my curve node is not really useful as is, just to illustrate that you can bake your own tool quite easily.( maya as already a huge set of node ready to be tweak mix/ match but sometime wrapping something more personal is more fun )
The cMuscleSpline node is also interesting though not super easy to hack, especially the relative tangent mode.
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.