Jump to content

Get Parameter value from created attribute.


RicardoMadeira

Recommended Posts

Hello there! Kinda new around here; think this is my first post, but lurking in the shadows and reading a lot this forum has been a great resource in learning the tools of the trade with Houdini lately.

Well, straight to the point;

I'm wondering if it's possible to make a parameter fetch a value from a created attribute. Can't post my network right now, but imagine;

I have a IsoOffset, which creates a volume from a Boolean to be read by a Measure node; After that I promote the created Primitive attribute to a Detail attribute and Scatter some points on it.

After this, a PopNetwork is created and I want it to emmit from the created points; but I need it to stop when the Volume Detail attribute is over a certain value;

I'm wondering if via Wrangle I can do this with an If function, but then again, how would I transfer the final variable value to the Birth Rate Parameter in the Pop Source?

I thought of something like this in the Parameter Field `detail("obj/Geometry1/attribpromote1", "VolCut", 0)` but it doesn't seem to work.

Any ideas? Kind of noobish, so don't judge me hard on this! 

Cheers and thanks in advance!

Link to comment
Share on other sites

I'm using area instead of volume, but you get the gist...so I start off with a normal grid 10x10 (in size), then I keyframed it to 5x5. So you can see, emission stops after the area has reach too 'small' a size, in this case 50.

EDIT: if I didn't use spare param (-1) and put the path in there...I need a / infront

if(detail("/obj/geo1/attribpromote1","area",0)>50,1,0) maybe that was all you were missing

Cutoff1.jpg

Edited by Noobini
Link to comment
Share on other sites

Hi there!

The solution does not seem to work. When I introduce the expression if(detail("/obj/geo1/attribpromote1/","VolVol",0)<2,1,0); in the Const. Activation the emission doesn't even start.

My Emmission Type in the Source is in Points, the one mode that allows me to use the expression in the Const. Activation. If I change it to All Points, it emmits from all of them, but does not stop when the Volume Value is reached.

Any ideas?

Link to comment
Share on other sites

Man, I've rebuilt the whole thing and it's still not working as it's supposed to. I even replaced the VDB from polygons and used the ISOoffset, not to measure the volume, but mainly because I want the scatter to work in the whole volume and not only in the surface. The detail attribute works fine and reads the values as it is supposed to, but in the popnet it's not working.

I must be doing something really wrong.

Link to comment
Share on other sites

I haven't follow the whole thread but you are putting ";" colon at the end of the expression, with hscript expressions I believe you do not use ";"

so your expression should be 
 

if(detail("/obj/geo1/attribpromote1","volume",0)<2,1,0)

 

without the colon at the end,

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...