Trouble to understand attributes color setup

   2579   2   1
User Avatar
Member
23 posts
Joined: June 2018
Online
Hello everyone,

I'm relatively new to houdini, but I work hard to learn !

Recently I had some issues with the working of the attribute color. I miraculously get what I want by tweaking and testing parameters, but I can't understand WHY I had to follow this path and i'm pretty sure there is a best way.

So here is the deal : In order to correctly have a mask that apply on a white color I have to :

- Make an attribute rename from Cd to a new attribute name.

- Make a color ramp with the name of my new created attribute.

- Make a group expression with the name attribute “@Cd.b >0.1”.

My questions are :

- Why can't I make an attribute create instead of attribute rename (it don't work)

- Why I had to put a new color node after the attribute rename, in my head the color attribute should stay on “Edge2”
(my attribute custom name)

- Why can't I call my own attribute (Edge2) in the group expression, I have to call “Cd.b” (and Cd.w doesn't exist?)

I can't understand why I can't get directly the Cd attribute, and Why I have to create my own attribute (that I can't even call at the end!). And while i'm asking, I can't get the attribute the attribute composite work either, I think it's related to all this..

I'm sorry if the questions looks noob to you, but I really have trouble to get the logic here despite tons of research and it drives me crazy. And more than a technic to do it in a better way, i'd would really like to understand the process!

Thanks in advance.
Edited by kentin - May 19, 2019 03:25:28

Attachments:
wut.png (458.1 KB)

User Avatar
Member
805 posts
Joined: Feb. 2017
Offline
Hey Kentin,

I guess it would be a good idea to post your hip file.
This way one can see what you try to do and help you more easily.

Cheers
CYTE
Edited by CYTE - May 19, 2019 03:27:50
User Avatar
Member
8240 posts
Joined: Sept. 2011
Offline
I don't understand why you had to do any of that, if you wanted to create a group of points with a color value brighter than a certain amount. An attribcreate doesn't make sense here. What would did you want to do with this new empty attribute? I don't know why you thought you had to put the color after the attribute rename, or why you figured it need renaming at all. Renaming color means that color is gone, and in its place is a new attribute of arbitrary name that contains the color data. Nodes that try to work with color will fail or behave differently since ‘color’ (Cd) no longer exists. The data still exists, but is named something else. The new name must be used in references. The color node cannot modify any attribute other than color (Cd).

The attribute rename and color operations seem unnecessary to me.
What you are doing is this:
rename Cd to ‘Edge2’.
Create a ramp from black to white based on the Edge2's red channel and storing it in Cd (since that's all the color node can do)
Then creating a group based on the blue channel of the ramp.

You could create the group directly without the ramped renamed color with @Cd.r>0.1in the group expression.
  • Quick Links