Adding noise to a mask?

   2476   14   1
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
How can I add a noise to a mask? I tried using attribnoise node but it doesn't help.

Attachments:
Noise based emission_forums.hip (462.8 KB)

User Avatar
Member
7737 posts
Joined: 9月 2011
Offline
you've selected attribute class: primitive by mistake on the attribnoise while the visualized attribute looks to be point class
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
I am still not able to get the desired result even after choosing 'primitive' in the visualize node. The noise gets applied to the entire geometry. The class was set to 'auto' in the visualized attribute node arlier. Why didn't it pickup attributes from the primitive?

Sharing a screen recording of what I experience.
User Avatar
Member
143 posts
Joined: 5月 2017
Offline
You can multiply the @mask attribute by the Noise to achieve the required effect.

Just use a Point Wraggler with the following code:

// multiply the mask value by the noise from 1 input and add the result to the color attribute.
v@Cd = point(1, "Cd", @ptnum) * @mask;

Input 0 contains the mask attribute and Input 1 contains the noise attribute, like in the figure below.
Edited by viklc - 2023年3月29日 15:38:57

Attachments:
apply_noise.jpg (16.5 KB)

User Avatar
Member
385 posts
Joined: 11月 2016
Offline
Simplest way would be to deform your sphere with an attribute noise before your mask sop, then copy the mask attribute back to your undeformed sphere.

Attachments:
Screenshot from 2023-03-29 15-26-15.png (267.8 KB)
Noise based emission_forums_02.hip (321.2 KB)

User Avatar
Member
7737 posts
Joined: 9月 2011
Offline
proceduralist
I am still not able to get the desired result even after choosing 'primitive' in the visualize node. The noise gets applied to the entire geometry. The class was set to 'auto' in the visualized attribute node arlier. Why didn't it pickup attributes from the primitive?

leave the visualize node on auto. The noise is being generated on primitive which isn't what you want. Change the noise to generate on points.
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
jsmack
proceduralist
I am still not able to get the desired result even after choosing 'primitive' in the visualize node. The noise gets applied to the entire geometry. The class was set to 'auto' in the visualized attribute node arlier. Why didn't it pickup attributes from the primitive?

leave the visualize node on auto. The noise is being generated on primitive which isn't what you want. Change the noise to generate on points.

That's what I did. Still not working. I think it's because the tutorial I'm following was made on Houdini 18.
Here's a snippet of what exactly he's doing.


I tried again. Still failing.


I have switched on all the legacy nodes in Houdini 19 using opunhide command and ensure that they load everytime Houdini starts up. Unfortunately the old attribnoise node is gone forever.
Edited by proceduralist - 2023年3月30日 02:28:56
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
vik_lc
You can multiply the @mask attribute by the Noise to achieve the required effect.

Just use a Point Wraggler with the following code:

// multiply the mask value by the noise from 1 input and add the result to the color attribute.
v@Cd = point(1, "Cd", @ptnum) * @mask;

Input 0 contains the mask attribute and Input 1 contains the noise attribute, like in the figure below.
Image Not Found

Good old VEX code to troubleshoot everything in Houdini life. I'll try your method and get back. I try to minimize VEX in my workflow unless really necessary.
User Avatar
Member
8520 posts
Joined: 7月 2007
Online
proceduralist
I have switched on all the legacy nodes in Houdini 19 using opunhide command and ensure that they load everytime Houdini starts up. Unfortunately the old attribnoise node is gone forever.
it's not gone, it's just the same name, older version
so enable Assets/Asset Definition Toolbar/Show Always
and then switch the version of your node from the top dropdown menu in Parameter Pane


here is the file with both versions of the Attribute Noise working

Attachments:
Noise_based_emission_forums_fix.hipnc (474.0 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7737 posts
Joined: 9月 2011
Offline
proceduralist
I tried again. Still failing.

It is working in your video until the type was changed away from points. The original hip file is also working after changing primitive to point. The amplitude of the noise is such that the original mask contributes much less than the noise value to the addition. The visualizer has 'treat as scalar' with length enabled, which probably not desired as this causes the values be be visualized as absolute values obscuring the actual behavior.
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
tamte
proceduralist
I have switched on all the legacy nodes in Houdini 19 using opunhide command and ensure that they load everytime Houdini starts up. Unfortunately the old attribnoise node is gone forever.
it's not gone, it's just the same name, older version
so enable Assets/Asset Definition Toolbar/Show Always
and then switch the version of your node from the top dropdown menu in Parameter Pane


here is the file with both versions of the Attribute Noise working



jsmack
It is working in your video until the type was changed away from points. The original hip file is also working after changing primitive to point. The amplitude of the noise is such that the original mask contributes much less than the noise value to the addition. The visualizer has 'treat as scalar' with length enabled, which probably not desired as this causes the values be be visualized as absolute values obscuring the actual behavior.

Thanks a lot @tamte and @jsmack. I compared the newer version of attribute noise with my own file with tamte's file considering the points mentioned by jsmack.



I am able to achieve the noisy mask but the whole sphere gets a shade of red in non masked areas as well. I can't figure out why is that happening.

I feel I should learn the newer node as the older one will get removed forever.
User Avatar
Member
8520 posts
Joined: 7月 2007
Online
set your operation to multiply
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
Still the same result, (check at 51 seconds in the video). The first attribute noise is set to add, the second one has multiply. Just like you've done it in your file.
User Avatar
Member
8520 posts
Joined: 7月 2007
Online
proceduralist
The first attribute noise is set to add, the second one has multiply.
ah ok, sorry, didn't check your whole video
it seems like your mask visualization range is set to Auto
and you are not clamping negative values in attribnoise postprocess, so it may be simply visualizing 0 as not black and overall may be difficult to make sense of mask values if the range is Auto
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
188 posts
Joined: 5月 2021
Offline
tamte
proceduralist
The first attribute noise is set to add, the second one has multiply.
ah ok, sorry, didn't check your whole video
it seems like your mask visualization range is set to Auto
and you are not clamping negative values in attribnoise postprocess, so it may be simply visualizing 0 as not black and overall may be difficult to make sense of mask values if the range is Auto

Okay. I'll check once again and get back to you. This is getting really difficult to understand. Man, thanks a lot for helping me out here. At the risk of sounding cheesy, if I ever win an award for a project that involves Houdini, in my award speech, I'm gonna thank you and jsmack besides Rohan Dalvi and Mark Fancher. You guys are so helpful. Seriously.


Edit.

Alrighty! Finally! I just checked Rohan Dalvi's video that I shared here earlier. He doesn't do any settings in his visualize node and everything comes out well for him.

Were there any changes made in Houdini 19?



Edited by proceduralist - 2023年4月3日 11:07:51
  • Quick Links