Jump to content

Ripple Solver For 3D Surface (not just a plane)


Atom

Recommended Posts

Hi All,

 

I have looked over some of the examples on using the ripple solver with a 2D surface but I need ripples along a 3D surface.

 

Inside the Ripple Solver node there is a checkbox Use Normal Frame which is suppose to allow ripples to propagate around a curved surface. This is what I want to do, I have a tear drop that needs to ripple as an object emerges. I thought I had something working, however after several test and looking at it from various angles I noticed the ripple waves are not truly moving all the way round the surface of the tear drop.

 

The Use Normal Frame refers to an attribute called rnrml. I don't have this attribute and I am not sure how to create it. Is is a rest normal, a ripple normal, a random normal? The help does not explain.

 

I have a basic setup in place if anyone has time to review it or offer tips on how to modify it so I can generate ripples all the way around a 3D surface.

 

Thanks

ap_ripple_solver_face_drop_VDB_041316.hipnc

Link to comment
Share on other sites

I have a simplified setup but I am stuck on the math part of the problem. In other examples the math is simple because we only deform a plane in one axis. In a 3D object the math is more complicated, I am not sure how to correctly calculate what P should be for any given v?

This code does deform the surface, but not in a ripple pattern.

@P.x+=@v.x*chf('scale');
@P.y+=@v.y*chf('scale');
@P.z+=@v.z*chf('scale');

 

 

ap_ripple_test_across_3D_surface.hipnc

Untitled-1.jpg

Edited by Atom
Link to comment
Share on other sites

I guess I am back to my original problem when I swap my demo geometry for my production geometry.

The ripples never go completely around the tear drop shape. There seems to be some kind of drop off when crossing from world axis positive to world axis negative?

Untitled-1.jpg

ap_ripple_lion_head_across_3D_surface_VDB.hipnc

  • Like 1
Link to comment
Share on other sites

1. your drop mesh has flipped normals, (which may not necessarily be a problem, but just be aware of it)

2. you may want to make sure your mesh for ripple solver is evenly spaced to get nice ripples, so just remesh it or something as you are converting it to VDB afterwards anyways

3. but most importantly try to keep the rest displacements only in normal direction as that's how ripple solver works anyways

look a the file with those changes (I unlocked the lionhead model but the filesop should find it on your disk, and deleted the materials to make the file smaller so you may need to bring them back, new nodes are green):

ap_ripple_lion_head_across_3D_surface_VDB_fix_unlocked.hipnc

 

Edited by anim
Link to comment
Share on other sites

Thanks again Tom, that pretty much sums up the effect.

Using your code corrected the math error above.

 

@P += @N*length(@v)*chf("scale");

 

 

The only other thing that comes to mind is there a way to propagate waves across the obstacle object as well? So both the emerging object and the surface are both rippled?

Would that involve a secondary ripple solver?

Edited by Atom
Link to comment
Share on other sites

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...