[RESOLVED] Paint float array with more than 3 component

   3111   4   0
User Avatar
Member
25 posts
Joined: Feb. 2010
Offline
Hi,

I have some trouble with the paint attribute sop.

I have an array attribute with a variable number of composants and I need to be able to paint each of them separetly based on an integer parameter used as an index.

For that purpose I create a single float attribute, I transfert the selected composant of my array in this float value ( point(“node”, $PT, “arrayAttribut”, ch(“./Index”) ) . After that I use a paint sop to modify the floats values and I transfert them back into the array…

The trouble come when I change the index of my input. I'm able to paint a new component (the one specified by the index) but I loose the previous modifications.

I understand why it's not working but I don't see what could be the solution…
The only solution that I see is to use a paint node foreach of my composants, but I'm looking for an other way because the number of composants can be really high…

I hope I'm enough clear, and you will have some ideas for that.
actually, I'm thinking to use a script to create all the paint sop I need based on the maximal index value, but I never do such a thing and I have the impression that using 10000 paint sop will slow down my setup and will increase a lot my scene file…

what do you thing …
Do you see an other way…
Edited by - April 7, 2010 09:57:36
User Avatar
Member
25 posts
Joined: Feb. 2010
Offline
I got an idea that could be really nice,
but I'm pretty sure it will not work…

Do you think I can use a copy stamping in order to get the same paint node but affecting differents attributs based on the copy number.
I think it will not work because all the paint nodes will have the same painting informations but maybe there is a way to do the trick…

Or maybe there is a way to store the result of the paint node and connect it back in his input… so if I change the modified attribut, it will not erase the modification but use them as an input an continue painting an other attribute value…

Or maybe i'm just stuck and there is no way except using a paint node foreach of my values…

Or maybe I can recreate a kind of paint tool that allow to paint custom attributs values.. but I don't have any idea on how to do it
But I think that if I can paint the color by channel, I can also paint an attribute with more than 3 channels…

I got a lots of ideas
but I don't know if they are reasonable

C&C and advices are really appreciate
User Avatar
Member
25 posts
Joined: Feb. 2010
Offline
I decide to go with a script,

I have create a subnet where I need to paint my attributes and if I specify the subnet as editable, the user or a script can add all the nodes he want in it, so I assume it will allow me to get what I want.

My only stress now is to see him working with a high number of attributs. I hope it will not be too slow or too heavy.
User Avatar
Member
862 posts
Joined: Oct. 2008
Offline
dealer2couleurs
Hi,

The trouble come when I change the index of my input. I'm able to paint a new component (the one specified by the index) but I loose the previous modifications.

I haven't tested this much, but I tried to apply paint to two seperate attributes. Painting, changing attribute, painting again, etc, seems to work. It doesn't forget old painted attributes.

Rather than using different components, couldn't you then write a script that copies all your values into different attributes, and then do it that way?
--
Jobless
User Avatar
Member
25 posts
Joined: Feb. 2010
Offline
Thank you so much Soothsayer…

My test show me that it's not working because I think the color will reflect the attribute values. But in fact when you change he attribute name in the paint sop, the colors don't updates but as you said, the attribut values are correct. In order to update the colors, I need to desactivate and then reactivate the override color toggle…

As you said, I will put all my values in differents attributs so I will be able to paint them separetly.
  • Quick Links