Jump to content

kleer001

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

Link to comment
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.

 

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...