how to make mormals to a specified range.

   4548   7   1
User Avatar
Member
303 posts
Joined: May 2007
Offline
how to make point's normal dircect to the reference normal and offset in a certain angle?

Attachments:
normal_range.jpg (241.7 KB)

https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
512 posts
Joined: July 2009
Offline
you can calculate the length of the vector either in VOPs or with an hscript expression, or however you want to do it:

length (float x, float y, float z)

when you have length A and B you can subtract them to get the difference, which you then can add to each component of the shorter vector, that should give you matching lengths.

cheers,

Manuel
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
303 posts
Joined: May 2007
Offline
asnowcappedromance
you can calculate the length of the vector either in VOPs or with an hscript expression, or however you want to do it:

length (float x, float y, float z)

when you have length A and B you can subtract them to get the difference, which you then can add to each component of the shorter vector, that should give you matching lengths.

cheers,

Manuel

thank you, but i dont know weather i dont understand your idea or i have not cleared my mean.
i want set points' normal as the referenced normal, but with some rand offset

Attachments:
normal_range2.jpg (68.4 KB)

https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
1531 posts
Joined: July 2005
Online
Set your normals equal to the ‘target’ normal, and add your desired offset.

Easy Peasy.

G
User Avatar
Member
303 posts
Joined: May 2007
Offline
keyframe
Set your normals equal to the ‘target’ normal, and add your desired offset.

Easy Peasy.

G
ops: sorry for the fool question
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
330 posts
Joined: July 2007
Offline
here is a way ..

activate “vopsop1” and play with both parameters .

you can manipulate values further with some noise , etc ..

the “fitrange VOP” could be useful too .

hope this helps .




( H11 file )

Attachments:
normalzRandomWithinRange.hip (98.9 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
53 posts
Joined: May 2010
Offline
If you already have an offset between ref normal, and now want to fit this offset to a certain range,you can compute its anglebetween, and fit range ,then use this resault angle to rotate it ,axis is the cross product.

if not, are you just want a random resault around ref normal? generate a random vector,cross production make it orthogonal with refnormal,and use it to rotate ref normal a random angle
Or use sin(rad)*normalize(randomOrthogonal)+cos(rad)*normalize(refnormal)instead of rotate().
User Avatar
Member
303 posts
Joined: May 2007
Offline
that's what's i need
谢谢小林
https://vimeo.com/user3971456/videos [vimeo.com]
  • Quick Links