Jump to content

animate scattering


AmyEden

Recommended Posts

Hey,

So i'm looking for a way to animate and freeze at some frame the global seed of the scattering node.

I'm trying to replicate the polyjuice effect in Harry potter 2 and i'm having a bit of struggle with the scattering. The effect is some sort of bubbles that grow and reduce on a morphing head into an other. I managed the bubbles effect and the morphing just fine but the bubbles are always on the same place.

They are controled by a scattering and color and i would like to animate it in that way :

- when the color is black there are no bubbles and when it's white they grow. I would like the global seed of the scattering to change when it's black and freeze and take the last value when it's white.

for exemple at from frame 0 to 10 it's white with the scattering seed set a 1, then from frame 11 to 15 it's back and the scattering seed changes to 2 then from frame 16 to 26 it's white again with the scattering froze to 2 and on and on in that way.

Does anybody has a way to make that happen ? I joint the file with the pig head so that anyone can open it without any additionnal file. Thank you so much for your help

PS: i'm very new to houdini.

head_bubbles_ocforum.hipnc

Link to comment
Share on other sites

You can brute force this by using code to drive the scatter seed.

It's crude, but it works.

if(@Frame>=1 && @Frame<48){ f@seed = 0.1;}
if(@Frame>=48 && @Frame<96){ f@seed = 0.2;}
if(@Frame>=96 && @Frame<144){ f@seed = 0.3;}
if(@Frame>=144 && @Frame<192){ f@seed = 0.4;}
if(@Frame>=192 && @Frame<240){ f@seed = 0.5;}

So every 48 frames a new seed is generated as a Detail attribute.

Drive the global seed of the scatter by fetching the value using the hScript detail function.

Untitled-1.jpg

Link to comment
Share on other sites

Thank you so so much it works perfectly however I can't make the detail fonction work.

I read the houdini documentation and they say that the first parameter is the geo path but that doesn't seem to work. And neither does 0 like you showed on your screen caption.

Could you explain what I need to do ?

Thank you so much

image.png.7a82c02999ed8f62183c54754ba08ce4.pngimage.thumb.png.f6e09b7a604fd921e9a9908d504489fb.png

Link to comment
Share on other sites

On 5/11/2021 at 9:44 PM, AmyEden said:

Hey,

So i'm looking for a way to animate and freeze at some frame the global seed of the scattering node.

I'm trying to replicate the polyjuice effect in Harry potter 2 and i'm having a bit of struggle with the scattering. The effect is some sort of bubbles that grow and reduce on a morphing head into an other. I managed the bubbles effect and the morphing just fine but the bubbles are always on the same place.

They are controled by a scattering and color and i would like to animate it in that way :

- when the color is black there are no bubbles and when it's white they grow. I would like the global seed of the scattering to change when it's black and freeze and take the last value when it's white.

for exemple at from frame 0 to 10 it's white with the scattering seed set a 1, then from frame 11 to 15 it's back and the scattering seed changes to 2 then from frame 16 to 26 it's white again with the scattering froze to 2 and on and on in that way.

Does anybody has a way to make that happen ? I joint the file with the pig head so that anyone can open it without any additionnal file. Thank you so much for your help

PS: i'm very new to houdini.

head_bubbles_ocforum.hipnc

round($F/10)

// what about this one in the Seed? 

 

Link to comment
Share on other sites

Zero does work as you can see no error in my screenshot. Make sure your attribute wrangle is running in detail mode.

@UltramanThat's a much simpler solution, but what if I want to change every 48 frames? The round will produce a change at frame 24 as well.

 

Link to comment
Share on other sites

10 minutes ago, Atom said:

Zero does work as you can see no error in my screenshot. Make sure your attribute wrangle is running in detail mode.

@UltramanThat's a much simpler solution, but what if I want to change every 48 frames? The round will produce a change at frame 24 as well.

 

@Atom // Right is simple and doesn't have any range like if statement // but for fixing issue ceil function can be work but in overall ur word is true ..

Link to comment
Share on other sites

This version references a CHOP wave in sample/hold mode. The scatter fetches this chopnet value for the seed.

Here's a quick attempt at synchronizing the scatter change with the color fade. A lag channel is added to the CHOP network to generate a source supplied to the color node.

Untitled-1.thumb.jpg.63581301b0b47a6863c0cddb0a1da610.jpg

 

You can adjust the period of the wave1 node to change the speed for both outputs. Use the phase to align the red waveform with the purple.

scatter_pulse_pig.gif.edf74fbaccc7bb6c7f3e917b86f480a8.gif

 

 

 

ap_head_bubbles_odforum.hipnc

Edited by Atom
  • Like 2
Link to comment
Share on other sites

Thank you so much for you both !

I tried with the function round but I can't really synchronized it with the sin. 

Changing to detail in the wranggle worked ! And i'm really happy with the results so I think I will go with that

I will look at the chop version tomorrow although it seems a bit more complicated than the wranggle. I'll be sure to give it a go though and I will keep you updated !

Thank you so much anyway !

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