1
$\begingroup$

I am trying to create a heatmap style of animation from a black and white image sequence.

So far I created a grid, applied the image sequence as a texture and then added a displacement modifier. As long as I don't click 'apply' on the modifier, it updates with each frame -> perfect. I also activated the options, that the mesh is updated in edit mode. However, somehow the texture coordinates node does not recognize the new z-positions, unless I click apply on the modifier. But then, it's not dynamic to the image sequence texture.

For the moment, I created a workaround by not choosing the "generated" texture coordinates, but the "reflection" option. However, this may ressemble the actual z- positions, but is not acurate enough for me as it also changes with the viewing angle.

Any suggestions?

Displacement modifier:

enter image description here

Current node setup:

current node setup:

"Reflection" heatmap:

enter image description here

$\endgroup$
  • $\begingroup$ Have you tried with the "object" output instead of the "generated" ? As far as I know the generated output doesn't get updated by the displacement modifier, but the "object" output does. $\endgroup$ – Gorgious Jun 22 '20 at 12:43
  • $\begingroup$ Yes, I have tried all of them. The only one that shows any different result is the reflection output, but I guess this one doesn't use the actual vertecies. However, it does work when I click apply for the displacement modifier.. $\endgroup$ – Finn Jun 22 '20 at 12:58
  • $\begingroup$ Try the object output, but move the origin of the object lower (or raise your geometry in edit mode) and plug a math node set to divide by 1000 between the separate XYZ and the color ramp node. Your modifier displaces the geometry by +/- 1000 units, but your color ramp only effectively differentiates colors in your geometry between 0 and 1 units. $\endgroup$ – Gorgious Jun 22 '20 at 13:02
  • $\begingroup$ Thank you very very much, that solved the problem! Such a easy solution, didn't think of that. $\endgroup$ – Finn Jun 22 '20 at 13:06
0
$\begingroup$

Your modifier displaces the geometry by +/- 1000 units (I suggest setting the midlevel back to 0.5 by the way), but your color ramp only effectively differentiates colors in your geometry between 0 and 1 units.

You could also set the midlevel to 0, and set your plane origin to geometry so that the displacement only raises the geometry.

I'm saying that because you should use the "Object" output which Z coordinate will be negative if it is located under the object origin. That way you can deal with this information only by dividing the Z coordinate by the strength of your modifier. That will give you the full range of height of your mesh, normalized between 0 and 1, perfect for a color ramp.

In short : Use the object output, but move the origin of the object lower (or raise your geometry in edit mode) and plug a math node set to divide by [the same strength as your displace modifier] between the separate XYZ and the color ramp node.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.