» Heightmap Displacement
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Heightmap Displacement

effect
Credits: Desaxismundi / "displace.fx" by Sanch

about

deform a mesh by texture with normals and texturing
the new Version has a additional Phong Directional LightSource

download

PhongDDN.zip
04.04.13 [12:52 UTC] by colorsound | 2293 downloads
DX11 version
Show 4 older revisions

Older Revisions

PhongDirectional_Heightmap_Displacement_with_Normals.zip
08.04.12 [18:27 UTC] by readme | 1326 downloads
Another fix, see comments
PhongDirectional_Heightmap_Displacement_with_Normals.zip
07.04.12 [23:39 UTC] by readme | 794 downloads
Small fix for Amount-Pin
PhongDirectional_Heightmap_Displacement_with_Normals.zip
07.04.12 [16:06 UTC] by milo | 832 downloads
Heightmap Displacement.zip
07.04.11 [04:20 UTC] by Desaxismundi | 1333 downloads

jenifer 25/08/2010 - 14:28

Hi,
Awesome work. I really like it. This is a very good way to show your creativity.

Meierhans 07/04/2011 - 09:49

Hey Desaxi, I´ve seen you uploaded a new version of your shader. What did you change?

Desaxismundi 07/04/2011 - 15:24

minor changes...as spotted by antokhio.

majo 21/04/2011 - 00:25

Adding this to a patch gives me an instant bluescreen, what are the minimal requirements for this?

antokhio 07/04/2012 - 23:39

seems fine here

readme 07/04/2012 - 23:39

He milo,
I've been trying to do the same, thanks for the hint towards this Sobel-Filter stuff ... I've been trying to do the calculation in VS.

Small fix though:
Neighbouring-Pixel-Calculation ignores amount-Pin for Displacement.
0 or negative values seemed pretty awkward.

So I changed

float tl = abs(tex2D (SampDisplace, In.TexCddispla +texelSize * float2(-1, -1)).x);

to

float tl = tex2D (SampDisplace, In.TexCddispla +texelSize * float2(-1, -1)).x*amount;

and so on ...

Hope I didn't break anything, but looks good.

readme 08/04/2012 - 18:36

Normals were computed for Displacement along Y-Axis, but all helppatches displaced along Z-Axis. Also I changed the float4 normals' w-component to 0 ...

I changed this line:
float4 N = float4(normalize(float3(dX, 1.0f/normalStrength, dY)), 1.0f);

to

float4 N = float4(normalize(float3(dX, dY, 1.0f/normalStrength)), 0);

StiX 12/04/2013 - 20:02

hi, is there any way to make this work with fog renderstate in dx9? thx!

anonymous user login

Shoutbox

~3d ago

joreg: New beginner video tutorial: World Cities https://youtu.be/ymzrK7tZLBI

~3d ago

catweasel: https://colour-burst.com/2023/01/26/macroscopic/ yeah, ' is there anyone who cares about slides anymore...' Well me for a start! :D

~12d ago

ventolinmono: The ELMO TRV-35 slides into your video feed > https://youtu.be/pcIM9mh1c9k?si=iB4FOfI2D6y0iETy

~22d ago

joreg: The summer season of vvvv workshops is now complete, but you can still get access to all the recordings: https://thenodeinstitute.org/ss24-vvvv-intermediates/

~1mth ago

~1mth ago

joreg: Workshop on 01 08: Augmented Reality using OpenCV, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-augmented-reality-using-opencv-in-vvvv/

~2mth ago

joreg: Workshop on 18 07: Fluid simulations in FUSE, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-fluid-simulations-in-fuse/

~2mth ago

joreg: Workshop on 17 07: Working with particles in FUSE, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-working-with-particles-in-fuse/

~2mth ago

joreg: Here's what happened in June in our little univvvverse: https://visualprogramming.net/blog/2024/vvvvhat-happened-in-june-2024/

~2mth ago

joreg: We're starting a new beginner tutorial series. Here's Nr. 1: https://visualprogramming.net/blog/2024/new-vvvv-tutorial-circle-pit/