Jump to content
Sherif.Nagib

Volumeshader/fluidslover Problem !

Recommended Posts

Hi all,

I've been having this problem while trying to apply a volume shader (billowy smoke) to a smoke container that has a particle system inside of it acting as smoke object. The Noise pattern in the volume shader renders as if it's projected onto the smoke, it doesn't move with the particles like it should. You know! like in bad cartoon shows when the characters move but their shirts slide off the the texture pattern :)

I've attached an example mov file, it's a very short one I know, but it explains the problem.

The particle system I have inside the container is the tornado from the 3dbuzz tutorial.

Cheers

twister_test.mov

Share this post


Link to post
Share on other sites
I've been having this problem while trying to apply a volume shader (billowy smoke) to a smoke container

I've had a similar problem recently, though perhaps not exactly the same: I'm creating a volume through an IsoOffset SOP instead of doing it from particles (GasParticleToFiled DOP?). In any case, if what you're ultimately rendering is a volume primitive, then the problem is the same, and the solution is to create three separate volumes which are basically the same size and location of your smoke container (then converted to a volume via the IsoOffset SOP), and follow each one with a VolumeMix SOP with "Mix Method" set to "User" and with their "Value" set to the expressions "$X", "$Y", and "$Z" respectively. These are then merged (Merge SOP), creating an object with 3 volume primitives, and the result imported into your sim via a SopVectorField DOP, with "Primitive Numbers" set to 0, 1, and 2 (representing the primitive numbers of the incoming X, Y, and Z fields). Set the "Data Name" to "rest" so the bundled shader will know how to use it.

Then you must ensure that this "rest" field gets advected and diffused in the same way as the density (by modifying the appropriate bits at the solving stage of the sim).

Painful, I know. But there you go.

HTH.

Share this post


Link to post
Share on other sites
I've had a similar problem recently, though perhaps not exactly the same: I'm creating a volume through an IsoOffset SOP instead of doing it from particles (GasParticleToFiled DOP?). In any case, if what you're ultimately rendering is a volume primitive, then the problem is the same, and the solution is to create three separate volumes which are basically the same size and location of your smoke container (then converted to a volume via the IsoOffset SOP), and follow each one with a VolumeMix SOP with "Mix Method" set to "User" and with their "Value" set to the expressions "$X", "$Y", and "$Z" respectively. These are then merged (Merge SOP), creating an object with 3 volume primitives, and the result imported into your sim via a SopVectorField DOP, with "Primitive Numbers" set to 0, 1, and 2 (representing the primitive numbers of the incoming X, Y, and Z fields). Set the "Data Name" to "rest" so the bundled shader will know how to use it.

Then you must ensure that this "rest" field gets advected and diffused in the same way as the density (by modifying the appropriate bits at the solving stage of the sim).

Painful, I know. But there you go.

HTH.

Any chance you have a simple hip that shows this? Is "rest" attribute used by "Billowy Smoke" material?

Been banging me head trying to figure this out as well.

TIA

Stu

Share this post


Link to post
Share on other sites

Check out the link in mario's thread. Peter Robbinson attached a file example there plus even more info.

Share this post


Link to post
Share on other sites

funny, I've been trying to sort something similar out my-self, an animated (deforming) poly model converted to a volume with IsoOffset, broken up with the "Billowy Smoke" shader, I'm hacking defaults because i'm not so familiar with building shaders in Houdini. I get part of what is suggested with the VolumeMix SOP and the SopVectorField DOP.. being a total newb with Houdini doesn't help much.. I guess what I don't get is what do you do with the Vector Field data? Pipe it into the texture coordinates for the perlin noise function in the shader?(how?).. or do I run it back through the RestPosition SOP somehow?

anyways, Houdini rules, this cloud demon looks great, until it moves.. there must be a way.

ps. i had a look at probbins' advect_points .hip, all it does is give me the feeling that i'm in waaay over my head ;)

Share this post


Link to post
Share on other sites

I checked out that files as well. Not documented very well so not sure why he does things in certain places. Anyone have a better example of how to carry "noise" on a Volume? "Billowy Smoke" is awesome on a still frame. :)

TIA Again.

stu

Share this post


Link to post
Share on other sites

Here's that sphere test that I posted over at the SESI site, except it uses the "Billowy Smoke" material (which seems to respect rest positions, btw). I commented it a little bit... hopefully it makes sense. If not, ask here and I (or someone more experienced with volumes) will respond.

TestNoise1.hip

Cheers.

[EDIT]

Here's the output... which I'm adding here just because I'm having so much fun making these silly animated gifs :rolleyes:

post-148-1202320385.gif

[/EDIT]

Share this post


Link to post
Share on other sites

Nice! Thanks Mario, just running through the file right now. quite interesting. I'm starting to feel like I'm getting the gist. Is there any way to skip the dynamics process? a way just lock the 3d texture to the deforming volume without passing through DOPS that jumps to mind? Anyways, thanks for sharing, I have a fighting chance now anyways.

Share this post


Link to post
Share on other sites
Is there any way to skip the dynamics process? a way just lock the 3d texture to the deforming volume without passing through DOPS that jumps to mind?

Good question.

I don't think so.

I can't replicate whatever voodoo the DopImport SOP is doing when bringing in the "rest" vector field... and I've tried all manner of things. IOW, if you want to add some attribute to a simple volume (not a fluid sim) that will *not* be interpreted as "density" by Mantra, you're out of luck ... or so it would seem.

These volume primitives are feeling painfully low-level....

If someone knows a way to do this (add rest pos without going through DOPs), please let us know.

Share this post


Link to post
Share on other sites
Good question.

I don't think so.

I can't replicate whatever voodoo the DopImport SOP is doing when bringing in the "rest" vector field... and I've tried all manner of things. IOW, if you want to add some attribute to a simple volume (not a fluid sim) that will *not* be interpreted as "density" by Mantra, you're out of luck ... or so it would seem.

These volume primitives are feeling painfully low-level....

If someone knows a way to do this (add rest pos without going through DOPs), please let us know.

As it turns out, there *is* a way to do it.... though you'll never believe it. I'll direct you to the SESI thread for the answer.

Thanks again Jason!!

Share this post


Link to post
Share on other sites

So am I correct in assuming all I need to do is use an attribCreate sop after each volume mix sop to name a "rest" value rest.x etc? I'm going to try that now. thanks for the heads up!

Share this post


Link to post
Share on other sites
So am I correct in assuming all I need to do is use an attribCreate sop after each volume mix sop to name a "rest" value rest.x etc? I'm going to try that now. thanks for the heads up!

The attributes you create will be:

Type: String

Class: Primitive

Name: "name" (no quotes)

String: "rest.x" or "rest.y" or "rest.z"

So the name of the attribute is litterally "name" and its *value* is the string version of the component as it would be written in VEX: like rest.x, or Cd.r or vel.z, etc.

Crazy huh?

Here's the modified sphere file:

TestNoise5.hip

Share this post


Link to post
Share on other sites

whoa, I think i need to read more of my Houdini book, I haven't even gotten into VEX yet.. I've managed to make things work in my scene following your example though. many thanks. this program kicks so much ass. I'm amazed how one can problem solve with this thing.

Share this post


Link to post
Share on other sites

OK. I admit that I should take more time studying those examples before I ask questions. But I'm wondering how many people here can fully understand the examples of Mario & Robbins... I don't think I could easily tweak those nodes inside Smoke Configure Object node like Mario, or easily build up a network with those complex nodes (vector field visualization, gas advect, gas velocity stretch, etc) like robbins. So I just want to know what other people think about this coz it's pretty frustrated struggling with these nodes with so little information...

thanks.

Share this post


Link to post
Share on other sites

Correct me if I'm wrong, but I think the inner parameters of the nodes inside the smoke node and smoke solver node in mario's file weren't changed. In fact, the smoke could have been created at its default settings using the shelf tools. The deal with the attribcreate sops to create a name attribute would be the frustrating thing, as it seems very undocumented.

I think as you go on though, its not so bad... you find ways to learn what you need to know...

Share this post


Link to post
Share on other sites
So I just want to know what other people think about this coz it's pretty frustrated struggling with these nodes with so little information...

Not that I've read through this fully, but I kinda got the impression that everyone is having issues with this.. even the really experienced guys. As per this :

Oh... My.... God!

Yup, that works.

I couldn't possibly imagine a more obtuse and unintuitive way to do this.

And it looks like Peter got his info from Jeff Lait, who is one of the developers.

So if it's fairly unintuitive, and undocumented then your best bet would be to ask lots of questions here or on the SESI forum :)...

M

Share this post


Link to post
Share on other sites
Correct me if I'm wrong, but I think the inner parameters of the nodes inside the smoke node and smoke solver node in mario's file weren't changed. In fact, the smoke could have been created at its default settings using the shelf tools.

Have a look inside the smoke object and solver, you have to explicitly attach the rest vector and set it to advect in the sim.

Thanks for the file Mario!

Share this post


Link to post
Share on other sites

hi guys

I have instanced metaball on particles and applied billowy smoke shader..then rendering metabll as volume. When rendering the texture seems to be stuck and does not move with the metaball volume ,,it seems to slide on the surface.

I read a post earlier where they have mentioned creating 3 attribute create with the follwing :-

"The attributes you create will be:

Type: String

Class: Primitive

Name: "name" (no quotes)

String: "rest.x" or "rest.y" or "rest.z"

So the name of the attribute is litterally "name" and its *value* is the string version of the component as it would be written in VEX: like rest.x, or Cd.r or vel.z, etc.

I cant seem to make it work if I have metaball voulume .I have attached the file , can someone make it work please.

cheers,

Amit

Attached File(s)

Attached File metaballvolumeparticle.hip ( 319k ) Number of downloads: 0

metaballvolumeparticle.hip

Share this post


Link to post
Share on other sites

Сan get the vector of displacement on the initial situation (P(0) - P($F)) and in volume shader add with "P" . This metod not support rotate point and has some negative effects

post-4458-1239712435.gif

ofcet_meta.hip

Edited by chumbuk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×