Applying displacement only on lava crust

   2207   4   2
User Avatar
Member
4 posts
Joined: Jan. 2019
Offline
Hi i've been working on a lava effects in houdini. after a lot of test and trial im finally good with color for the shader here is my problem how do i apply displacement only where the temperature is low. When i try to apply displacement all the surface is displaced .so here what i do. I import the temperature parameter then pipe it down into a fit range to get only the low temperature for the displacement then multiply it with the add of the enable noise displacement and enable map displacement to finally pipe it down into the amount of the displacementml.

All of this is done within the mantra surface shader.ive followed the tutorial of BW design and looked at the test files of Graham Variable viscosity lava rnd shader for getting where i am but i have a problem right now can someone help me?
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
I am not quite clear about your question - some screenshots or even an example HIP file might have helped.

But as far as I can read between the lines you have some attribute “temperature” and you either have a texture map for displacement or another attribute. Either way, “displacement” simply means that the P attribute (position of a point) gets influenced by your displacement value.

So if you want to limit/reduce that influence, all you have to do is modify the displacement value. If your displacement attribute is named “f@displace” (as an example) and your temperature is named “f@temperature” AND you know the temperature to be between 0 and 1 (floating point), you could simply multiply f@temperature with f@displace - the lower the temperature is, the lower the displacement will be.

Obviously, some scaling would be possible, too - and also any kind of math-juggling to get the values just right. But you could also clip displacement at some value below whatever temperature by doing a comparison “f@displacement*=f@temperature>0.1” for example.

Hopefully this can get you onto the rightish track

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
4 posts
Joined: Jan. 2019
Offline
thanks for the reply Marc.So if i understand correctly i can pipe down a wrangle after the material node on the sop level and write a little bit of code like

if f@temperature < 0.2
f@displacement = 1 or something like that to affect it only where the temperature attributes is low. But what if i want the displacement to increase as the temperature become lower with a certain threshold being fully active.

example if temperature hit < 0.2 then the @displacement become 0.1 and gradually increase as the temperature continue to decrease for a smoother result.can i do that in wrangle?

By the way iv'e just moved to a new home and i only got internet on my cellphone for now i can't share a test file or something like but i can send some picture but i dont think it be that useful.Thanks for the response Marc.
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Moin,

> if f@temperature < 0.2 … f@displacement = 1

… that would mean you'd be setting displacement hard to 1, which most likely is not what you want (except if “displacement” is but a “switch” in your setup). You probably want to scale it (see my above boolean example, which switches OFF displacement hard instead of setting it to 1).

> if temperature hit < 0.2 then the @displacement become 0.1

… makes more sense

Obviously, it depends on how you create your displacement anyway. It might be easier to just apply a scale to the position-offset (e.g. at render time in a shader). It “all depends”, but you get the general idea, I think.


Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
4 posts
Joined: Jan. 2019
Offline
Thx for the reply Marc.I think i finally understood what you mean.gonna try these solutions you are a big help.
  • Quick Links