ZC
hi,peter!!

I found a strange phenomenon. The nComponent node has a property, it is called componentIndices, its data type is TdataCompound. But this property does not provide an interface. I tried to use the expression to connect to this property, the best failed. You can see it.

a.png 


It also has an output attribute, which is called outComponent, its data type is Nid. Fortunately, this maya api there is this data type. We can use it.



a1.png 
a2.png 


You can design a node. It is called arrayToNid. So that we can customize the required component constraints. It will change our workflow. Because the constraint is now procedural.


thank you,peter!!
Quote 0 0
pshipkov
People usually control nConstraints procedurally by manipulating their weights. The reason is that most of the time we need "soft" control, but not on-off switching.
Here is a video from the examples page: http://soup-dev.com/videos/nCloth2.mp4

Still, adding your request to the to-do list.
Quote 0 0
ZC
Yes, nCloth is usually used to control the weight of the constraints of the way. But nParticle and nHair can not do that This is why I would have an idea. I feel arrayToNid this node is great and let dynamicConstraint control get the greatest possibility. Program to operate it.

thank you  peter!!!
Quote 0 0
pshipkov
Not in front of Maya right now, but there is one nConstraint node that has different representations in the interface.
You can control its point weights regardless if the nConstraint is applied to nCloth, nParticles, nHair, etc.
What you are missing is the artisan paint interface. But that's a problem with Artisan - it does not work on curves.
If you dissect the example scene corresponding with the video i posted - you can apply the same technique to nHair.
Quote 0 0
ZC
I think I understand what you mean. I hope to be able to change the constraints of the component object at any time, not just viscosity, weight and other attributes. The arrayToNid node has some properties, which are called inputId, inputViscosoty, inputWeight, and so on. The most important thing is InputId. Because the nComponent node can not dynamically change the component's id. Of course, this node can choose a different component mode. Can be vertex, edge or face.

thank you  peter!!!
Quote 0 0
ZC
I have no way to dynamically change this property. I think only to re-design an arrayToNid node, with inputId to replace it, so you can dynamically change this property.
I can use arrayExpression and point node to control the value of inputId

thank you, peter
a3.png





Quote 0 0
pshipkov
Makes sense. Will do.
Quote 0 0
Nathan Srigley
Hi Guys,

I hope you don't mind me chiming in, but I'm quite interested in the topic, and I'm a bit confused reading this thread. To me, there appears to be two separate requests from ZC:

-One regarding componentIndices and being able to dynamically(procedurally) change the componentIndices list. 

-And a seperate request for an arrayToNid node.

...I dont see the correlation between the two


Regarding the Nid

I beleive that the 'outComponents' attribute may be named in a confusing way and give the indication that it can be related to the componentIndices, but this attribute seems to only hold the nucleusID, so I don't see how adjusting this ID can help with dynamically changing the componentIndices. Do you maybe plan to spoof nucleus into looking to a different node with a different componentIndices list by cloning the nucleusID inbetween evaluation steps?

If I'm way off point with that assessment, Peter, Z please shine some light on the strategy you have in mind for this. 


On Dynamically changing the componentIndices

Normally It seems we can make a plug from the multiAttributeTransfer to a multiAttribute(TdataCompound). But in the case of the the nComponent node the componentIndices (which returns type TdataCompound) seems to be restricted from allowing plugs.

I would suppose this was intentional to prevent instability in the nucleus system. In a previous thread Peter mentioned this issue: 
"What i see is that dynamically adjusting nComponents is unstable. I got some crashes and in general things freak out. I think we are better off slapping constraint to all points or the subset of points we are interested in and then adjust the constraint weights."

While generally I would agree with that statement, I can imagine some cases when dealing with dense meshes or curve sets, especially in a rig-build situation, the ability to pre-filter vertices dynamically from the component list can greatly improve the speed of the nucleus initialization. 



Peter, have you been able to dynamically change the componentIndices of an nComponent list? If so, what was your strategy?

Cheers, 
Nathan 

Quote 0 0
pshipkov
Hi Nathan,

it is actually very simple to control nComponents with SOuP.
Check the attached scene.
Notice where the group node is connected.

Everything you need to do is create nConstraints with the "use set" option turned on.
With this you bypass a whole new set of complexities and conform to a the "traditional" workflow of managing object groups and component lists.
Quote 0 0
Nathan Srigley
Hi Peter,

Thank you so much for this example! 

I must admit I completely overlooked the 'use sets' feature, and have been overcoming the issue with a script node.

I was able to reproduce this example, and it will be extremely helpful. 

I ran into one small issue, after creating the nConstraint with the 'use sets' feature enabled the connection from the group node to the mesh node was lost. Attempting to reconnect the two before synchronizing the Component Group Ids results in a fatal error. 

Thanks again!
Nathan
Quote 0 0
ZC
I am also, Maya will collapse.
Quote 0 0
Nathan Srigley
ZC, assuming its the same issue I encountered, try generating a unique component group id on the group node, and plugging this into the ncomponent before reattaching the group and mesh nodes.
Quote 0 0
pshipkov
Just reuse the existing groupId node and connect it to the group.groupId before connecting the rest of the attributes.
Quote 0 0
pshipkov
@Nathan

Cannot get it to disconnect.
Opened the scene i posted here.
Created few more constraints with "use sets" enabled - all seems to be good with the group node.

Can you be more specific ?
Quote 0 0
Nathan Srigley
Sorry Peter, 

Just to clarify, the scene you posted is perfecto.

I only encountered the issue when I attempted to reproduce it manually in a fresh Maya and not realizing the role of the 'Component Group Id'.

Here is the scene that exhibit the issue: after the constraint is created the groups outGeometry is disconnected. If you try to reconnect the group and mesh nodes here maya will have a fatal incident.

connectAttr -f group1.outGeometry pSphereShape1.inMesh;



Quote 0 0

Add a Website Forum to your website.