Jump to content

Distortion VEX Question...?


Recommended Posts


I am trying to build a simple shader using the principled shader and unified noise. However, I must be missing something.

The simple network is rigged as in the picture. So restpos -> unified noise -> vector displacement input under "other" in the principled shader.

I do get displacements, but the "maximum displacement" slider is not doing what I would expect it to. Setting maximum displacement to 0, does not get me the original geometry. I would have thought the max displacement parameter dictated how much displacement to apply, where zero would be "do not distort the geometry"?

I have input distortions enabled. FWIW I cannot find this properly documented anywhere and even as a 30 year veteran of CGI it is not clear to me how some of the VEX nodes are intended to operate.

Any advice would be greatly appreciated! :)

Screen Shot 2017-12-06 at 08.36.54.png

Link to comment
Share on other sites

If you want to use Vector Displacement, switch Signature parameter to output 3D vector noise. It should be used with vector displacement.



If you convert float to vector, it will be copied to all three vector components resulting in weird diagonal displacement. If you don't really need vector displacement, use float disp input instead of vector vdisp. This will displace along normal using input as height.

Displacement feels broken on 16.5.268. It does not updates inputs correctly, even on Mantra restart. Oddly enough, changing displacement bounds to slightly different values force Mantra to update inputs. Probably, I should try update to daily build.

Link to comment
Share on other sites

Thanks for the reply!

Well, for what it is worth I tried most combinations of vdisp/disp as well as different displacement spaces (uv, object space), etc.

Please take a look at the two images enclosed. The second pic depicts a sphere being deformed with a positive displacement value. Sort of looks as expected. The first picture is with max displacement set to zero, which results in a crumpled and severely distorted sphere.

Worth noting is that the displacement bounds (which I am not entirely sure what it does, have to read up) is automatically linked to the max displacement value. How or why that happens I am not sure, but I am not linking that parameter manually...

So, I still feel uncertain whether it's me doing something wrong or the functionality being broken...?


Screen Shot 2017-12-06 at 13.00.31.png

Screen Shot 2017-12-06 at 13.00.15.png

Edited by DanFor
Link to comment
Share on other sites

EDIT: Never mind this. It was due to displacements not updating without toggling them on/off.

I just downloaded your example, and it too has a problem:

Regardless of what I adjust, I cannot get the displacements to fade to zero without disabling them. Setting max displacements and/or bounds to 0 still yields displacement. As does adjusting the constant to 0. I still get displacement, even though (IMHO) there should be none...?

I must admit I feel quite confused at the moment. :)


Edited by DanFor
Link to comment
Share on other sites

So...in my quest to understand this, I have noticed the following (with the same network setup as earlier, piped to disp):

- Setting displacement bound and/or max displacement to zero with non-zero input from noise (1D) = crumpled sphere

- Having displacement bound and max displacement be 1 or other sane non-zero value, multiplying the 1D noise with 0 = original, non-displaced sphere.

So, the displacement controls on the principled shader appear to be useless for fine adjustments of the displacement effect. That has to be done by multiplying the input.

Whether that is a bug or by design (and me failing to grasp the concepts) is still unclear to me. :)

Link to comment
Share on other sites

You need to set Displacement Bounds enough to encompass shape change:


Maximum Displacement doesn't seem to affect anything for me. Probably it limits maximum distance. I left it at default 1.0. It is linked to Displacement Bounds for user convenience, so, when you set it to zero, bounds will be set to zero too, producing clipping artifacts. You can remove expression from bounds parameter (using Ctrl+Shift+LMB or parameter menu).

I drive displacement height using Multiply Constant node in the example. As I said, some bug prevents displacement to update on my build. So, if you change constant value, shape stays still. If I "touch" Displacement Bounds parameter: change it from 0.2 to 0.25 (both are more than enough for this case), it will recompute geometry.

Edited by f1480187
Link to comment
Share on other sites

Ah - I see. So the displacement bounds will cause the clipping as the bounds need to encompass *any* geometry (even though the resulting geometry may itself be undisplaced). Makes sense.

Maximum displacement though is a bit illogical, or needs better documentation. As someone coming from other packages, I was expecting that to scale my input values (as the multconst does in your setup). Clearly that is not the case.

Anyway, many thanks for explaining the concepts and helping me get to a point where I can continue to build the network! Much appreciated.

Edited by DanFor
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...