Planetside Software Forums

Function Nodes In Practice => Function Node General Discussion => Topic started by: WAS on May 15, 2020, 05:43:09 pm

Title: Scalar to Proportional Vector
Post by: WAS on May 15, 2020, 05:43:09 pm
Does anyone know how you could build a vector, from a scalar, and have it be proportionate  (not leaning any which way) so it can than be further editing as a vector?
Title: Re: Scalar to Proportional Vector
Post by: Matt on May 15, 2020, 11:24:29 pm
Use a Build Vector and plug the scalar into only one of the inputs. If you want the vector to point upwards, use the Y input.
Title: Re: Scalar to Proportional Vector
Post by: WAS on May 15, 2020, 11:26:11 pm
Oh ok, than I can further manipulate and the X/Z would be handled from there by whatever additions?
Title: Re: Scalar to Proportional Vector
Post by: Dune on May 16, 2020, 01:59:10 am
Better work on the scalars before bringing them together into a vector.
Title: Re: Scalar to Proportional Vector
Post by: WAS on May 16, 2020, 03:09:46 am
Quote from: Dune on May 16, 2020, 01:59:10 amBetter work on the scalars before bringing them together into a vector.
That then introduces the whole problem of proportional vector. You can't just pipe the same scalar with some edits into the X or Z without a terrible lean effect. You'd need to know the formula to normalize X and Z to actually work as X and Z. Sounds like Matt's way is straight forward as than you have X And Z to use vector functions on, and can pull those channels out to edit.
Title: Re: Scalar to Proportional Vector
Post by: Dune on May 16, 2020, 04:29:15 am
Then I probably don't get what you're aiming at.
Title: Re: Scalar to Proportional Vector
Post by: WAS on May 16, 2020, 02:05:50 pm
A vector, that' proportional to the scalar, to than edit as a vector (X/Z). This isn't a terrain or anything. that I can just convert to vector. I mean I could with disp and disp to vector but that's sorta overkill.
Title: Re: Scalar to Proportional Vector
Post by: WAS on June 06, 2020, 08:19:16 pm
Update on this, Matt's method doesn't work for X and Z modifiers. They are blank. Still unsure how to get something proportional on X Z, but it's either too much in either direction or no data.
Title: Re: Scalar to Proportional Vector
Post by: Hetzen on June 07, 2020, 09:33:53 am
Is the question, how can I get lateral displacements using vectors, to push a surface along it's normal in x z only?

I'm not sure what you mean by proportional.
Title: Re: Scalar to Proportional Vector
Post by: WAS on June 07, 2020, 06:25:29 pm
I need data on X and Z that doesn't effect the shape when fed to a vector displacement. So it would be identical to the scalar fed a displacement shader.

I basic division is the key but I wanted to know what the exacting value would be for a 0-1 range.
Title: Re: Scalar to Proportional Vector
Post by: WAS on June 07, 2020, 06:26:37 pm
Here is an example project. The transition from scalar disp to vector disp is still noticeable. Not perfect. And I don't want to go too far to effect data down the line when dealing with X/Z.
Title: Re: Scalar to Proportional Vector
Post by: Hetzen on June 07, 2020, 06:46:50 pm
If you are trying to make a fake stones shader, you need to use a noise with vector information. So you have a centre to extrude from the noise.
Title: Re: Scalar to Proportional Vector
Post by: WAS on June 07, 2020, 07:49:32 pm
No not fake stones. This is just purely an example.

It clearly seems doable, just finding the exact value. Hard to measure scalars.