Page MenuHome

Mix Attributes Node for the trees and flowers use case
Closed, ResolvedPublicTO DO

Description

This is part of the trees and flowers use case.

We need a mix mode for sure, so users don't have to use multiple Math Attributes. Also to support Subtract.

Event Timeline

Dalai Felinto (dfelinto) changed the task status from Needs Triage to Confirmed.Nov 3 2020, 5:51 PM
Dalai Felinto (dfelinto) created this task.
Dalai Felinto (dfelinto) renamed this task from Mix Attributes Node to Mix Attributes Node for the trees and flowers use case.Nov 13 2020, 3:26 PM

@Simon Thommes (simonthommes) Should the output of this always be a color attribute? I just noticed that we have MixRGB for shaders, so it's specific to colors. Should it be the same here? Should the node name reflect that?

@Jacques Lucke (JacquesLucke) Hm, good question.
I feel like it should retain the type of the result attribute. For new attributes, I think, eventually it would be nice to have a dropdown when adding a new attribute within an input. But that's a larger scope todo on the UI side iirc.
For now it's fine to force color attributes (unclamped) for new attribute names, I would say.
This node should have the same viability for vector- and value- as for color-attributes, so I wouldn't change the name.

Alright, thanks. Will do as follows:

  • If the result attribute exists already, its type is not changed.
  • Otherwise, the new attribute will have the type color.

More options to control this behavior can be added later.

There is a working version of this node in the geometry-nodes-mix-attributes branch, if you want to test it.
It's a little bit annoying to use, because you have to prepare so many attributes currently.
On the bright side, this node can also be used for some vector math already.

Will rename to "Attribute Mix" and will add enums to select the input types (attribute/float/vector/color/...).

Will rename the inputs to just "A" and "B".

Dalai Felinto (dfelinto) closed this task as Resolved.Dec 18 2020, 2:55 PM