Jump to content

Stumped on sourcing color for smoke sim


Recommended Posts

Hi guys - really getting stuck here.. drat!

 

I just need to have my emitter generate different colors for my smoke sim. I've searched around and tried several solutions, and the closest I've gotten is here:

 

http://forums.odforce.net/topic/17741-fluid-with-colour-field-problems/page-2

 

But even that thread ends prematurely, and the solution breaks down when I try to integrate it into my sim - see the black smoke in this frame? I'm not sourcing any black color so I'm baffled as to where it's coming from:

post-14434-0-82196700-1457395736_thumb.p

 

and more fundamentally, my art director (and myself) find it hard to believe it can be so convoluted and complicated to simply have your smoke have different random colors within it.... Is there some super simple solution I'm overlooking? I"m relatively new to Houdini...I just want the smoke to be a mix of color, rather than the one color my smoke shader is giving me.

 

Here's a stripped down version of my project to take a look at.

 

Thank you so much for any help, and please use detailed how-to's rather than one sentence solutions, because I'm not good enough yet...!

Thanks!

 

 

EDIT: Update - I noticed that there is a GasDiffuse node whose rate was set to 10... turn it down, and the black goes away. So I guess, as the gas diffuses, it turns black... but why? Of course I'd prefer that it diffuse and keep its color....

MultiColoredDust_V01.hiplc

Edited by cwalrus
Link to comment
Share on other sites

Try using the word density in the Temperature Field of the BillowSmoke_MAIN. The temperature volume seems to be empty thus causing zero times the gradient colors.

post-12295-0-97453200-1457408921_thumb.j

Edited by Atom
Link to comment
Share on other sites

Thanks again. 

 

I hope I"m not harassing you -can I continue my question? With Temperature in the density field, the black goes away, but is dramatically replaced by the emission color in the ramp on the shader- so much so  that it basically makes the color advection go away, no matter what the settings.

 

post-14434-0-03454500-1457463821_thumb.j

 

Am I doing this in the correct way? or is my method roundabout and odd? I just want the dust cloud to have several colors of dust mixing within it... Would you do it that way (i.e. the HIP file above) ?

 

Thanks again for any advice,

Cameron

 

Link to comment
Share on other sites

Well Smoke is not technically emissive. I do like that feature of the Billowy Smoke shader but it can be unrealistic. There is a similar gradient section in the flames shader as well that is not emissive, under Fire. Perhaps try the flames shader? It has a check box to tint smoke with Cd.

 

I don't have the answer for colored smoke but I have seen examples on Vimeo, just no HIP file.

Link to comment
Share on other sites

Quick questions if you don't mind - what's the best way to get my own custom color texture, or a color ramp, into that pipeline? 

 

I put a colormap node into the AttributeVop, and it seems to work.. sort of.  If I animate the location of the source the emitted smoke turns black. See HIP:

 

ColoredSmoke_Motion.hipnc

 

How can I fix this?

 

 

Also:

1- where could I put a Ramp instead of a colormap?

2 - Should I attach the noise nodes to the U or V or both? (and what do all those noise nodes do? :)

3- is there any way to texture that grid first, and then have the CreateColor node sample from that textured grid?

 

THANKS!

 

Link to comment
Share on other sites

Without looking at your file...

 

UV map the source geometry. Make sure uvs are point attributes rather than vertex attributes. In vops, bind uv (import uvs), feed the uvs into a color map vop, and then feed the output of that into the Cd global output.

 

1. Just decide what you want to use as the lookup for the ramp (needs to be fitted between 0-1) and then wire that to Cd. Could be anything, from the output of a noise function (use 1d noise of you want to do this), to relative bounding box, some weird pattern or texture, etc.

2. If you want to use UVs for noise, make sure you have point uvs, then bind import them in and feed that into the position input of your noise function. If you don't want to use uvs, you can just wire Global position into the noise's position input. Other question about noise nodes is too broad to answer. In short, they use different formulas to create different looking kinds of noise. The help card for turbulent noise is pretty good about explaining this.

3.Yep, explained above.

Link to comment
Share on other sites

Thanks Adam, a nice little example file.

 

I was playing around with Adam's setup and added an attribute from image to the setup. The image shows the UV.rat map. Also remember to add the Cd attribute to the Dop I/O import set if you want the color to show up in the render as well as the viewport.

ap_ColoredSmoke_01.hipnc

post-12295-0-36991400-1457553883_thumb.j

Edited by Atom
Link to comment
Share on other sites

Thanks so much - that's exactly what i need to do. 

 

One main issue remains - in all of these options, when you animate the position of the emitter (on scene or geo level), the texture goes to black.

 

Anyone know why this happens, and how to avoid it?

 

Check it out -ap_ColoredSmoke_02.hipnc

 

 

PS thought you might want to see the work in progress:

post-14434-0-33616000-1457555257_thumb.j

 

 

Edited by cwalrus
Link to comment
Share on other sites

  • 2 years later...

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