Normalise a float value to 0 and 1? (Normalised distance?)

   5346   1   0
User Avatar
Member
192 posts
Joined: 4月 2015
Offline
Hi,

Can I do this in VOP and VEX? Or is it only for vectors?
I would like my distance function normalised like you can in the Falloff node.

Would appreciate your help.

Thank you.
Edited by OdFotan - 2019年5月25日 14:50:32
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hello,

the function normalize() is a different kind of normalization, that produces unit vectors.

If I understand, what you need is the fit() function to fit your values in range 0-1.
To use that function you need to know the max and min of your distance values: you can use the attribute promote node which comes with some handy promotion methods (maximum and minimum).

Have a look at the project file.
hope that's what you're after

cheers

Attachments:
normalize_dist.hiplc (70.9 KB)

  • Quick Links