Jump to content

Power Noise volume shader


GallenWolf

Recommended Posts

Hello guys!

I discovered the wonderful world of the metaball functions in H about 2 weeks ago, and I saw the potential for it to become an "afterburn" like thing for houdini. This is basically the shader found in the heavy smoke, but adapted to the noise my fx lead calls Power Noise. (Called power noise because of how it inverts the samples using a power function)

I've attached the otl for the shader as well as a sample scene here. Hope this helps!

powerNoiseDemo.hipnc

gwPowNoise.otl

Edited by GallenWolf
Link to comment
Share on other sites

Very nice!! I been trying to achieve that effect for freegin ages, I couldn't figure out how to avoid having a distorted ring effect as the texture turned inside out.

Btw if you add some 3D noise (like the groovy Curl noise) to P, then plug that into your density noise and scale the amplitude according to an Age ramp you start to get some nice fluid like motions. Also map noise parameters such as roughness to an age ramp to have it rougher as the particle is born then soften it dies/dissipates. With not too much work you can pretty much replicate and overtake "afterburn" or LW's "hypervoxels" with Houdini.

Thanks

Sergio

Link to comment
Share on other sites

G'day everyone!

Thanks for the support! This is truly exciting for me. I can't believe this thing isn't more well known. It is so powerful, yet so easy to implement.

Serg: Thanks for the tips! My fx lead has got some serious modifications on it, not sure if I can say more but yeah, I'm definitely going to give your suggestions a go! As it stands, our in house shader is rendering so much faster than what Afterburn can render. From what I remember, that is :)

Alvin <- ex-3dsmax td

Link to comment
Share on other sites

G'day everyone!

Thanks for the support! This is truly exciting for me. I can't believe this thing isn't more well known. It is so powerful, yet so easy to implement.

Serg: Thanks for the tips! My fx lead has got some serious modifications on it, not sure if I can say more but yeah, I'm definitely going to give your suggestions a go! As it stands, our in house shader is rendering so much faster than what Afterburn can render. From what I remember, that is :)

Alvin <- ex-3dsmax td

You can make it a lot quicker if you ditch metaballs and instance volumes instead :), (as in a isooffet of a plain sphere)... I guess this is because volumes don't have the overhead of generating the metaballed shapes and the volume bounds are as tight as you want them (render the metaballs as volume but without a shader, see how big them boxes are compared to what you're actually seeing). Whereas with volumes mantra ignores empty voxel cells completely when evaluating opacity. AND The shader is a lot simpler because there are no funky metaball loops or matrices stuff... AND the "I forgot to render the metaballs from the new sim to disk" problem doesn't exist :)

S

Link to comment
Share on other sites

Hello Mr Serg!

I just downloaded the curl noise papers and source code, but I gotta go out (I'm shooting dingoes today :P), hopefully that curl noise isn't too difficult to implement in vex. I know there is curl noise in vops but I usually prefer to keep it to vex code when developing larger shaders.

Oh, question about the volumes method. Right now We're able to do stuff like rotate the metaball and the shader sticks to the rotation axis. But how would that work on volumes? Would you just use an Instance Object and that will keep the rotational transformation? I remember once trying to use the copy sop to copy low res volume spheres to a pops output, jolly honking slow! :)

Cheers!

Alvin

PS: I shoot with a generally, non-lethal digital camera :)

Link to comment
Share on other sites

Looking good. While I'm a huge fan of doing stuff like this yourself to figure out how it really works, couldn't you just include "voplib.h" from $HFS/houdini/vex/include and call the vop_curlNoiseVV function there? That's mostly what the curlnoise VOP is doing.

Link to comment
Share on other sites

Oh, question about the volumes method. Right now We're able to do stuff like rotate the metaball and the shader sticks to the rotation axis. But how would that work on volumes? Would you just use an Instance Object and that will keep the rotational transformation? I remember once trying to use the copy sop to copy low res volume spheres to a pops output, jolly honking slow! :)

yeah basically, the instance object behaves just the same as the Copy Sop re inheriting transformations (I think the wiki has a nice doc on the subject). So you can do all your shader stuff in easy space :)

You need to use the material Sop in point mode to assign the material and pass attributes like age and id to each instance otherwise they will all look identical. Sadly/annoyingly you cant use a Shop, it must be a material with promoted attributes (urghhh).

In all I think I spent 4 hours porting our metaball shader wich itself grew massively out of the one sesi provides to it's volume equivalent, easy peasy.

You can also apply displacement shaders to volumes, iirc last I tried it didnt work on metaballs at all.

S

Link to comment
Share on other sites

  • 10 months later...

Not sure if I understand this correctly, I'm trying to write my own version of this same thing. Using volumes (iso offset spheres) I'm trying to copy them to a particle simulation

but I am not sure if what you guys have been saying is correct or not..

Is there a way, using the copy sop, to generate copies of the volumes and then have the volume shader stick to the transforms of each copy using object space?

I've tried a few different things to no avail.

I would much rather have the visualizaton of the volumes directly in the viewport instead of working with the instance Object.

Does the instance object work differently and actually pass the proper object space transforms for rotation and translation .

I'm using a vex shader that pulls most of its noise generation from the powerNoise thread

but no matter what I have tried, using wo_space(P) or (P) results in objects swimming thru a static texture.

I have even tried to promote the particle position into the shader and then subtract it from ws_space(P) but that did not work either.. (although I may not have had it working correctly)

is it just not possible?

any help would be greatly appreciated.

-john

redpawFx

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