VEX, how to get a point-walking-path on a sphere surface

   1549   9   1
User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
hi,

as the pic shows,

i really need the vector value of a point which is smooth, random(drive by some values) walking on sphere surface.

because of the odd of the noise function, now the path mostly appear on some area of the sphere,

plz help me,thank you very much.

Attachments:
walking.jpg (624.3 KB)

User Avatar
Member
60 posts
Joined: Nov. 2021
Offline
you could try using the attribute noise vector node to randomize N or any other custom vector, set operation to "set" and use "zero-centered" so you get equally positive and negative values. then just normalize it, set it to the radius of your sphere and write to P
User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
eaniix
you could try using the attribute noise vector node to randomize N or any other custom vector, set operation to "set" and use "zero-centered" so you get equally positive and negative values. then just normalize it, set it to the radius of your sphere and write to P

it really works!! thanks a looooot.

but still, because of my project, may i achieve this by not too complex VEX coding ?
User Avatar
Member
60 posts
Joined: Nov. 2021
Offline
You can remap the noise. Some noises have different output ranges, it's best to look it up in the Houdini documentation. The xnoise has an output range of 0-1, you would want a range from -1 to 1. to do that you can use a fit function

a = fit01(a, -1, 1);
b = fit01(b, -1, 1);

Insert that after you created the noise variables
User Avatar
Member
4544 posts
Joined: Feb. 2012
Online
If you have large enough time range, it should work:

vector2 u = 0;
u.x = xnoise ( @Time * 0.8 + ch("offset") );
u.y = xnoise ( @Time * 0.67 + 768.234 + ch("offset") * 1.7 );

vector p = sample_direction_uniform ( u );
@P += p;

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
eaniix
You can remap the noise. Some noises have different output ranges, it's best to look it up in the Houdini documentation. The xnoise has an output range of 0-1, you would want a range from -1 to 1. to do that you can use a fit function

a = fit01(a, -1, 1);
b = fit01(b, -1, 1);

Insert that after you created the noise variables


i c.
i will try this way, thanks a lot!
User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
animatrix_
If you have large enough time range, it should work:

vector2 u = 0;
u.x = xnoise ( @Time * 0.8 + ch("offset") );
u.y = xnoise ( @Time * 0.67 + 768.234 + ch("offset") * 1.7 );

vector p = sample_direction_uniform ( u );
@P += p;


soooooo great!
Edited by hign - Aug. 18, 2023 05:10:52

Attachments:
2023-08-18_17-05-20.gif (12.1 MB)

User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
animatrix_
If you have large enough time range, it should work:

vector2 u = 0;
u.x = xnoise ( @Time * 0.8 + ch("offset") );
u.y = xnoise ( @Time * 0.67 + 768.234 + ch("offset") * 1.7 );

vector p = sample_direction_uniform ( u );
@P += p;


one more thing, how to get this??
haha, always saw it, but never know how to get it.

Attachments:
4455.jpg (119.6 KB)

User Avatar
Member
4544 posts
Joined: Feb. 2012
Online
hign
animatrix_
If you have large enough time range, it should work:

vector2 u = 0;
u.x = xnoise ( @Time * 0.8 + ch("offset") );
u.y = xnoise ( @Time * 0.67 + 768.234 + ch("offset") * 1.7 );

vector p = sample_direction_uniform ( u );
@P += p;


one more thing, how to get this??
haha, always saw it, but never know how to get it.

It's a custom Python Qt extension I wrote years ago. I talk about it in detail in this presentation (after 30 mins or so):

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
24 posts
Joined: Feb. 2022
Offline
got it , the UI looks sooooooo elegant,love it.
  • Quick Links