djx
Is there a way to set the initial data for the arrayDataContainer? I want to use it in "minus" mode but I cannot work out an easy way to fill it with 1 at the start. I did think that "Base Value" would do this, but it does not seem to do anything.

What am I missing here?

thanks
David
Reply 0 0
pshipkov
Yes, there is an attribute called "base value".
Reply 0 0
djx
For me, base value doesn't seem to do anything. How should it work?

David

Reply 0 0
pshipkov
There are many ways to achieve that. The more elaborate ones will need to do some blending upfront the arrayDataContainer node. Otherwise set its baseValue and clampMin value to the value you want - for example - 0.2, etc.

Reply 0 0
djx
Hmm. Still not working for me.

I've attached a simple scene where a sphere's colorPerVertex is determined by collecting the weightPP from an animated boundingObject/attributeTransfer in an arrayDataContainer.

In my example, the arrayDataContainer.mode is 'max' and the sphere color changes from black to white over 25 frames as the boundingObject moves across.

What I want is the opposite. I want the sphere to start off white and become black. If I'm understanding what you are saying, this should work if I set the mode to 'minus' and the baseValue to 1, but it does not.

You may notice that in my example, I have already set the baseValue to 1. In fact it does not seem to matter what I set it to. It seems to do nothing.

I did not understand your suggestion about clampMin. Setting clampMin to 1 does initialize my sphere to start off white, but as expected prevents mode='minus' from having any effect. It is also worth noting that clampMin has no effect if sink=0

I was able to achieve my initial goal by simply reversing the output of the arrayDataCollector using a point node, but I'd like to understand why I cant get it to work in the arrayDataCollector when it appears to have those options.

Reply 0 0
pshipkov
The base value of the arrayDataContainer gets overwritten by the attributeTransfer - it is flooding all points and there are no points left with unassigned values.
You have to supply the data before the arrayDataContainer guy. Also i simplified the node network a bit. You don't need the point node to apply the processed weights as colors. The arrayToPointColors node is smart enough to recognize that you are supplying array that is exactly 4 times shorter than the number of points, so it will interpret is rgba pairs where the rgb will be the weight and alpha is 1.

Reply 0 0
pshipkov
Also, there are many ways to perform comp-like actions with the component attributes. I am using approach that requires the least work.
Reply 0 0
djx
Thanks Peter. I really appreciate you taking the time to explain it for me.

David

Reply 0 0
djx
Just a quick update...
In your example you demonstrate how to use two bounding objects, where one floods the arrayDataContainer with 1's and then when the other bounding object, which is set to 0, moves across it sets the arrayDataContainer values back to 0 because mode="min".

This helped me realize how to achieve my original aim, which is to be able to subtract weights using mode="minus". To do that the bounding object that does the flooding needs to be moved out of the way after the first frame. And instead of the second bounding object containing 0 weight it has the amount I want to subtract (in my example this is approx 10% for each frame that the bounding object is in effect)

Reply 0 0
Reply