how to make animated (dynamic) displacement masking.

Hi.
I have a model with 2 materials: one of them should have displacement, and another one not.
(bump mapping does not work enough well here: lack of shadows and seems lack of precision)
Materials are mixing using using material nodes and animated texture masks.
I.e i can generate node textures for amount of each material, dislpacement, amount of displacement, etc.
Question is how to show displacement only at one material, and not to another.

Solutions i’ve tried so far:
displacement modifier

  • does not work with texture nodes
    displacement texture
  • does not work with node materials
    applying displacement on vgroup + vertex group modifier
  • does not work with node textures
    duplicating whole model in place with separate materials and making one of them mask-transparent
  • alot of glitches because of geometry intersection and negative displacements

Seems like the only way is to pre-render displacement texture into movie.

Please, any other ideas!

SOLUTION:
Do not use internal renderer.
Use Cycles! It rocks! :slight_smile:

From what I understand, you want something like this:


A node which behaves just like the Mix Shader but for the displacement. Let’s build it!


In mathematical language, this “Mix Value” group node outputs (Value1 * (1 - Fac)) + (Value2 * Fac). So, when Fac == 0, the output is Value1, and when Fac == 1, it will be Value2… and everything in between, just like the Mix Node.

Note: If you need to insert a Multiply node to reduce the displacement, insert it before the “Mix Value”, on the noodle connected to the appropriate value, not after!

I love making crazy super-nodes! :smiley:

I love crazy nodes too. I’ve already created alot of crazy stuff.

The problem is that i cannot put that node textures anywhere.
In particular: in displacement modifier, or in vertex weight modifier.

Show us your tree! Or we’ll discuss theory endlessly…

Group things to reduce the size of the picture, give names to your groups, input and output sockets…

As you say it yourself, you have 2 materials mixed blah blah blah. You should then be able to get close from the (re-uploaded) first image of my previous post. 2 materials, some displacement, an (animated) factor and a mix shader. From there, you should start to see the light… in theory, at least.

I can’t say much more until I see some real nodes.

The question is not how to design nodes, but how to apply them to model.

Okay, here is simple setup that resembles what i want:
https://docs.google.com/file/d/0B1CnZRX0nrEQQ1hZVjJsY3BrNkU/edit



The scenario:

  1. there is a ground fragment with some original relief
  2. a water flows, water level rises and partially hides the ground

Goal:
to make parts covered by water flat, leaving other parts relief

Textures used:
heightmap-base: original relief
waterlevel: level of water, calculated by time
watermask: amout of water on ground, iverse would be amount of unwet ground
heightmap-above-water: desired relief

Objects in file:
ground.0: grid with composite material and original unmodified relief (applied as displacement modifier)
ground.1: grid with flat material and desired relief (applied as displacement texture)
floater: plane showing current water level (also showing glitches produced by overlapping objects)

Issue is how to make [something that looks like an] object with composite material and desired relief.

Attachments


Now I understand that we weren’t talking the same language… You were talking “Internese” while I was talking “Cyclese”.

What you want to do is clear but I wouldn’t know how to do that with Blender Render. On the other hand, with Cycles, everything becomes a breeze since you can directly manipulate the displacement in the node tree. I could make the mountains swim and do waves at the surface of the water… :smiley:

Not wanting to switch to Cycles yet?

I havent’t looked to Cycles yet because of no GPU, and i guess that rendering will be enourmous slower on CPU
(4cores Athlon64 3000Mhz is what i have for now)

All i know about cycles is that it is in deep alpha development, not yet well integrated with rest of blender, and uses nodes for everything.
Is it at least as buggy as internal renderer?

The nodes design is the thing i’ve just started to love.
Probably i’ll investigate the Cycles stuff.

Could you please setup the test sample above to Cycles renderer? How much it is complicated?

Yes! Cycles Rocks!


I came here to check what you wrote before to start working… I guess I can go back to bed now. :wink: And maybe now you’ll stop spreading FUD about Cycles being in Alpha stage. It’s in constant progress but can already produce useful results. (That’s more politically correct…) :smiley: