Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on August 30, 2019, 02:51:34 am

Title: rotating vector displacement map
Post by: Dune on August 30, 2019, 02:51:34 am
I've had this before, but not always, and forgot what's the solution. Rotating a vector displacement map doesn't give me the result I hoped for. It just messes up the displacement. I guess it's the way I made the map, so my question is; what should I use; world, object, absolute tangent or relative tangent?
Title: Re: rotating vector displacement map
Post by: Dune on August 30, 2019, 03:17:26 am
I've tried all 4 options just now, but can't seem to rotate any of them decently within TG, either with rotate vector or transform shader, before vector displacement shader or after..... So I'm curious if anyone has a good solution to rotating vdisp maps.
Title: Re: rotating vector displacement map
Post by: N-drju on August 30, 2019, 06:09:35 am
Maybe it's just an issue with the "transform input" placement in the node network? I don't know, like moving it after the "rotate vector"?
Title: Re: rotating vector displacement map
Post by: Dune on August 30, 2019, 11:34:16 am
Tried that. Thanks.
Title: Re: rotating vector displacement map
Post by: Matt on August 30, 2019, 11:34:24 am
Are you saying that the map works when you don't rotate it, but when you rotate the map (using a transform shader) you also need the vector values to change?

I imagine that should work with a "Rotate Y" node but I have not tried this in practise. That should change the X and Z (R and B) values coming from the map.
Title: Re: rotating vector displacement map
Post by: Matt on August 30, 2019, 11:38:23 am
Also try reversing the rotation. There may be a sign change.
Title: Re: rotating vector displacement map
Post by: j meyer on August 30, 2019, 12:05:04 pm
I've looked it up in one of our VD-tgds from 2018 and the working solution was:
first the VD, then rotate y vector(blue node) e.g. 90°, then transform shader
rotate y 90°.
Title: Re: rotating vector displacement map
Post by: Matt on August 30, 2019, 12:18:51 pm
Good to know that can work! The order doesn't matter because they operate on different things. You could transform the map before manipulating the colour, or vice versa.
Title: Re: rotating vector displacement map
Post by: bobbystahr on August 30, 2019, 01:07:36 pm
Quote from: j meyer on August 30, 2019, 12:05:04 pmI've looked it up in one of our VD-tgds from 2018 and the working solution was:
first the VD, then rotate y vector(blue node) e.g. 90°, then transform shader
rotate y 90°.
nice save Jochen
Title: Re: rotating vector displacement map
Post by: Dune on August 31, 2019, 01:35:30 am
Yes, of course, I now remember that. Thanks for reminding me, Jochen. The different rotations didn't work, and your first line was indeed the problem, Matt.

In the meantime, though, I used a simple shape and vdisped that. It was a simple slanting hole anyway.