Unai

Hi! First post here, I've been using SOuP for a little while now and have to say, it's amazing.

So here's the thing: I have a point cloud I want to make Cocoon-nections (sorry) on based on a value other than the point positions. So say I have an array that assigns a float value to each point, much like their ID but customizable. Then Cocoon would connect points 1 and 2, 2 and 3 and so on, or perhaps 1,2 and 3… Independently of where they are, only based on proximity to this custom value.

So far I've converted that custom array to point positions in X and set the Y and Z to 0, so I can control which points get connected in Cocoon based on their distance to each other. I've also passed the original positions into Cocoon as a colour array, hoping that later I would be able to deform the result back to the original positions, but I got stuck there.

Has anyone achieved something like this?

Thanks in advance.

pshipkov
This will be tricky.

I can provide additional inIdPP attribute where we can define to which other points given point is connected.
It will be relatively easy to provide single value per point there so each point can be connected to a single other point only. This is easy, but very limiting and uninteresting in the context of the cocoon node.
The real deal will be to pass multiple IDs per point.
This will require us to supply a second input attribute that specifies how many ids are provided for each point.
So if i want to connect point 0 to points 3 10 20, point 1 to 100 200 300 2 7 i have to map the arrays like this:
inIdPP 3 10 20 100 200 300 2 7
then inIdCountPP 3 5

There are no options in Maya to generate this kind of data using standard or custom nodes, that's why i am not sure if it will be useful to have it as an input to the cocoon node.

Let me know if you have something else in mind that may work better than what i described.
Reply 0 0
Unai

Hi Peter, thanks for answering so quickly!

What I had in mind wasn’t such an exhaustive control over exactly which points get connected, but rather making Cocoon believe the points are somewhere else than their real position, so I can effectively rearrange how they get connected, while still using the node’s Min and Max Distance controls, which work great.

The way I see it is, either having the ability to input two position arrays if desired (positions in space and positions used for calculation), or being able to change/deform the point positions of the output mesh.

I’ve never made a custom node, so it may as well be impossible, but it’s worth asking :P

Reply 0 0
pshipkov
this is actually a great idea. i dont know why i didnt think about that already. will add it later today to the node. tel me whats you os and maya version and i will provide you with a build.
Reply 0 0
Unai

WOW, you’re the best technical support Maya could have, I would never expect such dedication, thank you so much!

For the project I want it on, I’m on 2015, Windows 7. And there’s a donation coming your way, you absolutely earned it :)

Reply 0 0
pshipkov
Check the attached file.
Reply 0 0
Unai
IT WORKS!!! This is amazing. Again, thanks very much!
Reply 0 0
Unai
I don't need it fixed at all, but just so you know, there might be a bug on that custom build: when trying to make a bounding object with the attributeTransfer or group's AE buttons, "name 'soup' is not defined" pops up. Just in case you were planning to release that same build :)
Reply 0 0
pshipkov
Maybe i broke something yesterday. I didn't have much time and rushed things.
I will not be releasing this build, so no worries.
But thanks for mentioning it.
Reply 0 0
Reply