Rotating Disp Warping Different Results

Started by WAS, February 09, 2020, 05:30:00 PM

Previous topic - Next topic

WAS

I'm a little baffled. Lets say you have some vertical lines (like sand) on Z, and you warp them on Z with a scalar. Now, take that same scalar, rotate it -90, use lines on X. The warping is now completely different, even on a different scale and intensity. Why is this?

WAS

Here is an example of the issue (plucked from my sand shader). View the surface layer or warp input preview, and use the switch between 0 and 1 and see the results. The driving displacments are the same, just rotated, bu the effect the Redirect Shader is yielding is a different scale and intensity on X than Z.

Dune

I don't see a different scale and intensity, just rotation, and a slight difference, but the latter may be logical. But why are you setting this up so complicated? What purpose?

WAS

#3
It should be the exact same result. It's completely different. Even if you invert disp thinking it's wrong rotation (or rotate opposite way). It seems Z and X are sampling the input noise differently, but shouldn't. Also you can clearly see the shapes are more smeared in one (more intensity of "displacement") and warped at different paths.

And end-user comprehension of settings rather than going through a huge node network to change settings. It only looks complicated because all that is to be ignored in the final shader and no need to change anything.

WAS

Come to think of it this different sampling of input may explain why whenever I use the same input at different velocities causes weird pinching as if it was a whole new seed and angles colliding. Because it is offsetted or handled differently.

Tangled-Universe

Here at work I do not have TG, so just to let you know that I can't check your file and will only respond to your initial finding and question and share some thoughts with you, no solutions.

If you have a line on the Z-axis then warping it along the same axis would only move the line along that axis without perturbing it sideways.
So to me it makes sense that when you rotate the warp function 90 degrees that the effect is different.
Perhaps I should check the file, but just reading this initial observation rises questions on my side.

The other aspect to warping is noise-shape of the warper. For example:

Create a ditch on the Z-axis in the terrain using a simple shape, as if a base for a canyon.
Compute terrain.
Displace side of canyon laterally on X using either billow or ridge noise, does not matter which.
Observe the difference between the left and right canyon.
One side will be billows and the other ridged. Swapping noise type will only swap right and left.
Thus one side receives the positive displacement, so to say, and the other side the negative/inverted.
Perhaps this contributes to the things you see.

WAS

#6
Yeah that all makes sense (that's more of a instance of position of noise). But setup is not warping on same axis. When you switch to Z sine from X sine, it than uses X warper instead of Z warper, so it warps appropriately. The noise is rotated as well to be in relation to the sine direction. However, at 0,0,0 of the preview, we have totally different smearing and shapes than on Z. It should be the same effect as if rotating the whole setup 90 degrees.

If transform input shader allowed three vector inputs this wouldn't even be an issue.

Tangled-Universe

OK. Since I cannot follow what you say/mean I should have a look at your file then.

WAS

#8
Not sure why it's hard to follow. Sorry. It seems very simple and logical results. if you warp something on Z with displacement, and then go to warp something on X, logically if you rotate that same displacement, it should be the same effect on X, rotated accordingly. Kinda like XYZ Displacing in other engines.

Dune

You should rotate the camera too then, looking at the exact same (rotated) area, because afaik rotation is along 0/0/0.

Tangled-Universe

Still haven't been able to look at the file, but that makes sense Ulco.

WAS

I'm not sure how that makes sense. We're at the rotation center "0,0,0" everything is rotating at this point. Rotating camera at 0,0,0 -90 or 90 doesn't help.... still different shapes altogether and velocity of smearing...

Matt

A rotation of +90 rather than -90 seems to fix it (in your Transform Input Shader).
Just because milk is white doesn't mean that clouds are made of milk.

WAS

Quote from: Matt on February 12, 2020, 03:31:06 PMA rotation of +90 rather than -90 seems to fix it (in your Transform Input Shader).

What? Lol swear I already did that ... I must have had disp inverted from other tests ugh

If that's it when I get home I'm gonna be bummed cause totally redid my shader from ground up lol