Lets dream for a moment

First of all - thank you Alias for M7.

Am i the only guy who has the feeling that, how Maya handles the attribute data is not good ? Lets take a look at the overall picture:
only predefined tools are weights paintable - usually deformers, cloth and particles. Maya is totally closed system when it comes to ability to create, share and manage attributes of type multi.
To create, paint and manage my own multiAttributes i need to compile a plug-ins where to store the attribute data and to manipulate it. Why that ? Why not all the multiAattributes to be stored as additional data directly in the geometry components ( points particles, paintFX strokes, etc ) ? This will make them immediatelly accessible for every tool in Maya. In this case i can create and paint whatever attribute i want. I want the ability to create “sets” of paintable attribute data inside evry geometry shape node.
The second part of the game is the weightable nodes ( deformers, particles, etc. ). Whould be really nice if they can access these attribute “set”. Just a simple field in the UI to can tell the node which set to use. Why not actually to havemultiple fields where i can define multiple “attributeSets” and to can blend between them. This will bring bunch of usefull features, for example - i can have many skinWeight sets and i can define which one of them to be used in a specific shots, or to blend between them. Or, i can do the same, but with my collision or cloth data.
I hope that this XSI thing called GATOR will spread around the idea for attribute management ( originally created by SESI ). I’m pretty sure that people fastly will realise the power of this conception.
Maya 7 offers bunch of tools for attribute transfer - topology propagation, smoothSkin/blendShape weights transferring, hair implanting, etc. But they are isolated each other. Why not to have unified interface for generic attribute manupulation ? To can “read” everything and to can transfer, blend, propagate it to everywhere, based on proximity, raydirection, etc, etc. ?
In addition Artisan’s paintScriptTool will be a lot more generic - will not be needed every time to write my scripts to can paint actually custom attribs. Believe me or not, but this is pain in the butt.
The color sets are pretty mutch what i’m dreaming for - sets of paintable data. Would be really nice if all the weightable nodes can access this stuff,
Would be so nice if we have a nodes which manipulate the attribute data on fly - for example - create a renderSphere, make it to change attribute “set” called “skinWeights” and then animate it to penetrate with the clustered geometry - and you can change the clusterWeights, or can transfer data from another cluster or just “set”.
It is pretty mutch what Maya7 offers with those paintFX primitives for local control. Pretty mutch tools, iterating through the painted components, collecting the needed data and bring it to the user ( in readable format ) or piping it to another nodes.

Why not smoothSkinCluster to have ability to operate with sliding, relax, jiggle, etc., in addition to the default skinWeights ?

Why not the rest of the deformers to be weightPaintable also ? I really cant see the reason why ?

ok, enough dreaming, lets back to work.

Well you CAN acces multi data with getAttr, make multiAttrs with addAttr and set them with setAtt. And yes that means you could push the data elsewhere and blend it. Not totaly optimal but its damn close enough. BUt yeah it would be better if the data was stored in the object structure itself.

And yes you can make yur own attributes painttable wherer they are (take a look at the mel command fle for makePainttable how to paint particle attrs and own custom ones). And no you dont need to amke a cirpt for all you cuutom apps separately. What you do is serialize the script so much that you can easily pick what you wnat to paoint trough the gui!

But yes that means you can (easily) transfer data from skinweights to particlke data for example, or vertex color or whatever.

The real problem of this storage modell becomes evident only if you delete componenets to create a reduced area but want to use the same binding now you need to start deleting those damn weights manualy. Its not a aterribly big deal to handle tough but still pain in the butt.

And yes all the nodes that have per point weighting available can be painted. Wich after maya 7 finaly includes also the blend shape.

Ok so let me demonstreate (dont be afraid of script ist NOT tedious ist just a matter of building a gui and tehn using it forever, after all maya gui IS mainly script), this is there for those of you who want to get jumpstarted TODAY and not wait for maya XXXXXX wich may never come.

to create a multi attribute, let us do following:

addAttr -longName weightTest -shortName wt -at compound -numberOfChildren 1 -multi nurbsSphere1;
addAttr -longName weights -shortName w -attributeType double -multi -parent weightTest;

now this is a multi compound containing a multiple entrys of double arrays. Now incidentaly this is exactly the same datatype as a skicluster uses to store wich means a sckincluster can connect it to thsi data. And it can be made painttable. NOw thees nothing that states a gui for this couldnt be done sure it can.

Now for blending wich is a bit trickyer, especialy if you want the blend to work in dag context (in wich case its api time, but only then) if not then ist pretty easy. Asuming theres 2 skincluters thst are identcal following applys:

$skinWeights1=getAttr skinCluster1.weightList[0:(getAttr("-s","skinCluster1.weightList")-1)].weights[0:(getAttr("-s","skinCluster1.weightList[0].weights")-1)]
$skinWeights2=getAttr skinCluster2.weightList[0:(getAttr("-s","skinCluster2.weightList")-1)].weights[0:(getAttr("-s","skinCluster2.weightList[0].weights")-1)]

now we have 2 ayyas containing all the weights. So now if you wanted to copy weight 1 to weight 2 youd:

$string="setAttr skinCluster2.weightList[0:70].weights[0:2] “;
//ive intentinaly expanded the ranges so it looks shorter theres no need to
for ($item in $skinWeights1)
$string+=($item+” ");
eval $string;

or blend the sets

$string="setAttr skinCluster2.weightList[0:70].weights[0:2] “;
$size=size($skinWeights1);
for ($i=0;$i<$size;$i++)
$string+=(($skinWeights1[$i]*0.3+$skinWeights2[$i]*0.7)+” ");
//0.3 and 0.7 are the weighted blends
eval $string;

Hope this helps your work! Ill leave you to experiment with the rest, the blend above works nice within a dragger context making it pssible for you to do the blend by sliding the mouse Now i leave thsi and make painttable for you to do for yourself.

hehe, man, dont make me laugh

Theoretically i can build whatever system i want, but honestly, tell me - do you think that what you said is usefull in real production ?

The makePaintable command only declares attribute as paintable, but you cant actually paint it, because the default artisan scripts dont know where to store the data. I need to compile a wightible node to can put the data there.
THEORETICALY i can build a MEL system to paint a vertexColors and to have additional artisanScript to dump the data somewhere on fly - at paint time - clumsy and slow.
My point is that attribute management in Maya becomes more or less outdated.

About your idea to transfer weights with MEL - there are guite a bit MEL tools doing this, in fact i’m developing every day stuff like that. They are customizable and some of them are really good, but cant cover all the weakness of Maya in this area.

Im not actualy against a overhaul im just pointing out that you are wrong about not being able to handle arrays. And yes artisan istelf is a bit outdated true but not obsolete.

Theoretically i can build whatever system i want, but
honestly, tell me - do you think that what you said is
usefull in real production ?

depends on what you consider production ready?

Its totaly production ready to tranfer data form one form or another in mel, it takes less than a second for a 10000 face poly to do the transfer from one bone to vertex colors or any other multi attr (all verts in one batch). Trick is not to let maya call getAttr and setAttr many times, but do it in one go (theres a speed advatage of 1 to 100). And no there arent realy many all that good transfer scripts from this computation point.

Now the most timeconsuming part in this operation goes into building the setAttr string. So if they changed setAttr to actualy eat Arrays in this context then the time would drop down by 80% meaning you could do the same in a second on a 50000 poly object (the overhead grtowth is linear)

Now it gets even faster for multiple uses if you store the data directly to a plug youve made with mel tough then you couldnt blend the result in any way.

Again the same applies to the api too, I mean mking a attribute painttable isnt all that hard, and after all the api is designed for freedom and unfortunately this translates to work. Also the lowlevel way c works is a problem here. Its more of what kind of multi purpose node to deign.

You could make your life easier and design a setArrayAttr command. Also see below for a nother idea to make your life a breeze (se intead of designng specific nodes design a few generic ones)

THEORETICALY i can build a MEL system to paint a
vertexColors and to have additional artisanScript to
dump the data somewhere on fly - at paint time - clumsy > and slow.

Edity i made a HUGE change onece i looked at my old notes:

No need for this! Make painttable is a bit tricky as its described a bit wrong in the manual. the name is for type of node. And yes if you use attr paint tool then it works.

paste in empty scene

polySphere -r 1 -sx 3 -sy 3 -ax 0 1 0 -tx 1 -ch 1;
addAttr -dt doubleArray -longName “dblArray” pSphereShape1;
//array shoukd be iinitialized or attr paint will do by adding
makePaintable -attrType “doubleArray” “mesh” “dblArray”;
//type is mesh!
ArtPaintAttrTool;
//paint

//chek the data!
getAttr pSphereShape1.dblArray

Now this works for all paint supported datatypes, as well as any ons you have in your own nodes even tough you didnt make special code for its execution. Any questions?

Note i editted my final aswer! becaus whiele the obe before thsi worked fine thsi ones more optimal

Being too late with my reply … anyway …

I didn’t tried your example, but i’m sure it will not work ( dont get it personal - i’m not trying to ignore you )

Seems to me that Alias pushes Maya in wrong direction.
Actually who knows, maybe i’m wrong, the time will show.

But it does noinetheless..

And offcourse they push it in the wrong direction when users ask for features that allready exsist.

Ps you almost got me conviced that i remebered wrong about the array attribs. BUt it took me a while to gat the stuff owrking as i knew that there was a catch to all of it.

And yes alias does fix stuff taht isnt broken on requests, and more than once theyve actyaly madea fix that was worse than the one they had to begin with. So its actualy dangerous to ask for fixes without pointing how the old syetm is worse.

And for the record i dont oppose myself for improvement as long as its well done. Its just that im not concerned with features of tomorrow but features of today.

I don’t mean to back up the statement that alias is pushing maya in the wrong direction, but I have recently been using version 7.0 and have found that my attributes for a file texture have changed quite considerably.

if you refer to my post in rendering and lighting where i cannot find the insert button for color remap, or the effects flyout node.

Any response from that would be greatly appreciated.

Joojaa i must apologize ( … well, … partially ).

I said that there is no way to create and paint custom multi attribs and that’s totally right for Maya6 or previous versions. At studio we are still using Maya6 ( some weird special build ).

These days i’m testing M7 and for my big surprise … it … just … works. I suppose a bug or whatever is the reason M6 to cant handle the situation we have talked about.

What is the version of Maya you are using ?

Man, Alias fixed a lot of trash in the 7th release.

Yes on 6 theres a few variables spooking around so the script paintter is trying to paint the worng attrib to start with but the same thing does indeed work in maya 6.01 (for me with certain small ammendments), i was under the impression you were on maya 7 tough.

so in 6 you need to add the following lines, wich should fix it unless your version indeed bugs as it does work on 6.01 (im keeping everything here for clarity of things):

CODE
polySphere -r 1 -sx 3 -sy 3 -ax 0 1 0 -tx 1 -ch 1;
addAttr -dt doubleArray -longName “dblArray” pSphereShape1;
//array shoukd be iinitialized or attr paint will do by adding
makePaintable -attrType “doubleArray” “mesh” “dblArray”;
//type is mesh!
ArtPaintAttrTool;
// added lines for initialisation of array and setting the right attrib to paint
setAttr -type “doubleArray” pSphereShape1.dblArray  8 0 0 0 0 0 0 0 0;
artSetToolAndSelectAttr( “artAttrCtx”, “mesh.|pSphere1|pSphereShape1.dblArray” );

I guess use MtoR… don worry a new wersion will be out soo i hear. This si actualy something thetes super usefull on mtor, as you might have known.

And ps yes i can rollback maya vesrrions to 6.01 back but beyond that im afraid id need to go hunting my tapes.

Sorr

QUOTE(Joojaa @ 09/05/05, 11:58 AM)
Sorr

hahaa found a new undocumented feature of how mel is parsed… wich would probably makes the transfer code above much faster (actualy 2 candidates). Or atleast loads prettier, but testing this is stil pending, till i get what i was tinkering with done.

Now this featurew should be expanded to variables too and maya would be much spiffyer to code. HOwever it might be possible to jig something up.

dont make me ask what are you talking about, just trow it here