Jump to content

Recommended Posts

I thought the key would be in the Ocean Evaluate > sample_attributes > snippet1 with my additional vex:

oceanSampleLayers(1, time, P, falloff, displace, v, J);
//move displacement relative to up
vector up = set(0.01,.99,0.01); //trying to clean up the Y=1 and Y=-1 awful smearing on the sphere
float dispdist = length(displace);
vector dispdir = normalize(displace);
matrix3 o = maketransform(v@N,(up));
vector newdisp = o * dispdir;
P += newdisp * dispdist;

BUT, it's not 100% effective. It's a bit better than the smeary default. But I swear it's gotta be a swap from a default (0,1,0) vector to the Normal vector... somehwere in there... :/

Please see attached hip file for particulars.

 

sphereocean_01.hip

Share this post


Link to post
Share on other sites
Posted (edited)

What about this line instead?

matrix3 o = maketransform(@P,v@N);

With the wind speed dropped I get something like this.

Untitled-1.jpg.1f96b95880c90975cce1519b3f0f9df3.jpg

Edited by Atom

Share this post


Link to post
Share on other sites

It does not seem to work for the pig, however.

Untitled-1.jpg.e48405202f14dea60581d8ad328682ce.jpg

Share this post


Link to post
Share on other sites

it's pretty straightforward out of the box

just use v@N, v@up or p@orient on your instancing points in such a way that resulting reference frame has Y pointing in up-down direction of your ocean (so in normal direction of the ball) and X in the direction you want wind to blow in

in your file, since v@N is pointing outwards and v@N defines Z axis, your ocean deforms in a tangential direction and therefore you are seeing weird deformation

here is the modified file

ts_ocean_on_ball.gif.af510cc62728aca3a4c66cae25ef0c67.gif

ts_ocean_on_ball.hip

  • Like 5

Share this post


Link to post
Share on other sites
On 1/5/2019 at 9:22 PM, anim said:

it's pretty straightforward out of the box

just use v@N, v@up or p@orient on your instancing points in such a way that resulting reference frame has Y pointing in up-down direction of your ocean (so in normal direction of the ball) and X in the direction you want wind to blow in

in your file, since v@N is pointing outwards and v@N defines Z axis, your ocean deforms in a tangential direction and therefore you are seeing weird deformation

 

Thanks mate, that totally hits the spot! The good ol' double cross product, I know it well.

I can see now in the manual how this is built in.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×