Page MenuHome

DISPLACE NODE: Will not accept negative values
Closed, ResolvedPublic

Description

Summary: The displacement node appears to reject negative values. This prevents one from applying displacements in both directions as expected.

Reproduction: 1) Load a solid 50% grey image with another reference image in the compositor. 2) Apply a Displace Node to the reference image using the 0.500 grey tone to the X axis. 3) Set the X scale high enough to see a change. The image should at this point be uniformly displaced to the right. 4) Apply a Math Node and perform a Subtraction on the displacement 0.500 grey image from 1.000. In theory our grey should now be -0.500. The reference image, however, will not shift left. All experimentation seems to indicate that negative values will not shift the image in the alternate direction as expected.

Version: SVN 31817

Platform: Linux amd64 (Ubuntu 10.04)

Event Timeline

Doesn't appear to be working as expected.

I have created a grid pattern and a 0-255 RGB image that is a vertical band going from 0 full black to 255 red at the bottom.

We should expect that a displacement would create an image that sweeps from left to right at the bottom with zero influence at the top and in fact testing shows this.

However, when we subtract 0.5 from the gradient using a math node, we should now effectively have a run from -0.5 to +0.5 and expect a sweep that travels right to left at the top, and left to right at the bottom with little change in the middle. Adding a multiplier of 2.0 into the mix should give us values from -1 to +1 respectively.

However, according to the tests provided, the image seems to simply shift slightly up near the top and more noticeably as we work down the image.

Sample images and blend provided.



When inserted in the subtract node, the image is converted to greyscale using this formula: R*0.35 + G*0.45 + B*0.2. That means the red at the bottom will be 0.35 - 0.5 = -0.15, so also displacing from right to left.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Sep 29 2010, 11:15 PM