Author Topic: Tile Sampler - Vector displacement, unusual behaviour?  (Read 4251 times)

Hey, I'm trying to non-uniformly displace some stuff in the tile sampler node using a vector map.

I want the input shapes to be displaced further left or right on the page based on how far they are from the centre. I believe this should be as simple as putting a gradient in the red channel of the vector map (black at the left to displace the furthest left, grey in the middle for no displacement, white on the right to displace the furthest right).



The problem is that this seems to displace anything with a value below 128 the same distance left, and anything above the same distance right:



I can't stop the overlap here because when I disable tiling for the node everything disappears completely? Is this a separate issue?.

Other parts of the Tile Sampler node seem to perform functions relative to the input colour, such as the size:


Well, I poked around in the source package, and it seems like, unfortunately, the Vector Map input, as it's set up, only dictates the distortion ANGLE, and the Vector Map Displacement float sets how far it moves in that direction. Unfortunate, really. That's why altering the grey in the green channel to be a bit lighter or a bit darker bends the tiles up or down a bit as they approach the center... As Red gets closer to grey, it becomes less important than the little bit of up and down, and the angle becomes steeper.

It's fixable, if you're willing to make a duplicate of tile sampler. Drag the tile sampler into the Explorer to open up the system version, create your own graph, and copy and paste tile sampler into it. Now you have an editable version which you could use for your projects. Right click the fx map to edit it, and open up the function for Color/Luminosity for the Quadrant node to get at the heart of this function.

The easiest way to fix this (probably not the most efficient in terms of computer usage, though) is to tell the system to multiply Vector Map Displacement by the displacement length used to calculate the resizing, like you noticed.

I point out where to find these elements in the first part of the image I'll attach.

Connect the vector length value to a Multiply node, and bring it up to where Vector Map Displacement is used, and connect. The vector length output is shown in the second image, and the displacement, with it's multiply all plugged in, is in the third.