Jump to content

Is there a way to paint fixed values into attributes using Paint SOP?


magneto

Recommended Posts

By this I mean, not painting cumulatively but painting say 1. So it's 0, it's not painted. If it's 1, then it's painted but painting more on the same points doesn't change their values.

So it's an on/off thing.

Any ideas? :)

I'm pretty sure somebody else asked the exact same question.

anyway, I think the easiest way is to add an addattrib after your paint sop and set the value to : if($CR!=0,1,0)

although that makes only on, and to turn it off you need you make it 100% black, or in this case, $CR should be 0.

Edited by ehsan parizi
Link to comment
Share on other sites

The titles might be similar but there I was asking how to paint primitives without using points, so while your attribcreate suggestion makes sense, it's still not enough to make it intuitive for the artists who will use my DA.

I solved that problem but now I was wondering how to paint boolean like values, instead of floats.

Although I should have worded this question a little differently.

I want to store boolean like state but I still need the value fixed. For example I want to have a value on my DA that reads 15, and then when the artist paints points, it should overwrite on any existing value and set them to 15 (no more or less). Then later the artist can change this value to 10, and then paint again, and this time the brush will paint the value 10, overwriting any existing value.

Does it make sense?

Link to comment
Share on other sites

The titles might be similar but there I was asking how to paint primitives without using points, so while your attribcreate suggestion makes sense, it's still not enough to make it intuitive for the artists who will use my DA.

I solved that problem but now I was wondering how to paint boolean like values, instead of floats.

Although I should have worded this question a little differently.

I want to store boolean like state but I still need the value fixed. For example I want to have a value on my DA that reads 15, and then when the artist paints points, it should overwrite on any existing value and set them to 15 (no more or less). Then later the artist can change this value to 10, and then paint again, and this time the brush will paint the value 10, overwriting any existing value.

Does it make sense?

oh, so you want an on and off kinda thing that also has a custom value? if so, you can still use attribcreate and multiply the if($CR!=0,1,0) to the desired value! right>?

Link to comment
Share on other sites

Yes but that value will come from the DA itself. Actually not sure if it's possible but if all the points have the "WEIGHT" attribute 0 by default, each paint will change their value to the value set by the user but only on those that are painted at each change of this value.

So if you have 100 points and you set the WEIGHT value to 15, and paint points 0-20, then their WEIGHT value will be 15. Then later if you change the value to 10, and paint on points 10-20, then their WEIGHT value will be 10. But points 0-10 will still have 15 as WEIGHT since they were painted with this value.

Link to comment
Share on other sites

Thanks Edward, to my surprise I already set them like that, and the value still increments so painting the attribute to full value of 1 still takes several strokes on the same point.

Edward's Opacity Solution worked for me as far as the original concept and the slightly revised concept, of what you said was. It completely replaces the stored values in one stroke. I made Cd a displayable attribute and as soon as I clicked it, it changed a full Boolean operation. No adding, or decimal places.

I placed a grid, color flooded the background to black, set my brush and uv radius to one, and the soft edge to 0.

Link to comment
Share on other sites

Here I did the same thing but I still get floating numbers. Am I missing a step?

Also found something that could be a bug.

Paint on the points, undo, the Cd attributes are removed from the Grid, you press redo/undo, etc but they are gone. Try to fill BG color onto points again, it doesn't work.

Is this normal?

EDIT: Yes I actually check the values from the details view :D

pt.hipnc

Edited by magneto
Link to comment
Share on other sites

I actually thought of one last thing that might be my problem maybe. I use wacom tablet for Houdini, so I painted with the pen. Could this be the issue? If so, how can I fix this?

Thanks.

Yeah, that sounds like it. When I dab with my wacom like a mouse click it boolean fines, but when I roll my wrist like I'm drawing some of the numbers don't boolean, especially with a real light touch, that could be a sesi bug or hardware bug since radius pressure should adjust that.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...