+2
Terminé

Multi add/mult nodes

Andrei Nadin il y a 11 ans mis à jour par Freya Holmér (Developer) il y a 11 ans 6

So this is probably a 'nice to have' but I think it is worth thinking about as I hope its not too difficult..


I am doing this


half4 cumulative = t1 * color.r + t2 * color.g + t3 * color.b + t4 * color.a;
half4 cumulativeNorm = t1b * color.r + t2b * color.g + t3b * color.b + t4b * color.a;
fixed vertcolors = color.r + color.g + color.b + color.a;

if(vertcolors != 0)
 {

cumulative /= verts;

cumulativeNorm /= verts;

 }
cumulative = lerp(basetex, cumulative, vertcolors);



It ends up looking like this..


Image 81


:)


Obviously the encapsulated nodes will be useful in the future but..


The  4 multiplies and adds in a row..


Image 82


Maybe have a grey out extra nodes, they only become available once A and B are used and are obviously optional but an almost unlimited number could then be done in a row..


Solution

Solution
Terminé
It's a planned feature, but hasn't gotten priority yet! The same goes for the Append node, which should also support more than two inputs :)
Thanks for the suggestion and images!

Edit: Multi-input Add and Multiply nodes are now implemented in 0.17!
They support up to 5 inputs now instead of just two


Prévu

It's a planned feature, but hasn't gotten priority yet! The same goes for the Append node, which should also support more than two inputs :)

Thanks for the suggestion and images!

There should be a node with three input vectors and an input reference vector. Imagine the inputs:
[ref]
[c1]
[c2]
[c3]
[c4]


Outputting a vector which is: c1*ref.r + c2*ref.g + c3*ref.b + c1*ref.a
It's *very* similar to the dot product. I believe they are both Inner products, so perhaps this node could be called inner product? Or is it a matrix product?
Hmm, to be honest I would hate to call it, the I love the idea of the node for sure. Inner Product seems that it better describes what is going on though..
Terminé

It's a planned feature, but hasn't gotten priority yet! The same goes for the Append node, which should also support more than two inputs :)
Thanks for the suggestion and images!


Edit: Multi-input Add and Multiply nodes are now implemented in 0.17!

Solution
Terminé
It's a planned feature, but hasn't gotten priority yet! The same goes for the Append node, which should also support more than two inputs :)
Thanks for the suggestion and images!

Edit: Multi-input Add and Multiply nodes are now implemented in 0.17!
They support up to 5 inputs now instead of just two


soooo goood! thats an awesome implementation!
Hi Joachim, should I add a new request for the inner node above?