Iterate over Point Cloud in Material Shader

   2139   4   0
User Avatar
Member
18 posts
Joined: June 2016
Offline
Hi everyone,

I'm trying to build a shader to output a displacement map. I have a FLIP mesh and added some particles for more realism on the surface of my water.

So now there is a FLIP geometry (geo1), the points hitting it and a grid (geo2) with a shader for baking out the displacement map.

My goal is to add the ripple VOP to every point in the PointCloud hitting the FLIP mesh(geo1).
I managed to have the points with Point Cloud Open and Point Cloud Filter in the Material Builder and they show up in the render.

I also have the ripple VOP connected with grid (geo2) UV's and I get one ripple.

Now I would like to add shader based ripples to every point coming in into the material when they hit the surface (geo1) and they should last for a given time even if the point is already killed (beneath the surface (geo1).

Does anyone of you smart out there have an idea how to approach it?

Thanks in advance!

Jakob
Edited by Innehavaren - March 22, 2018 11:46:43

Attachments:
points.jpg (405.7 KB)
ripple.jpg (380.7 KB)

User Avatar
Member
74 posts
Joined: Dec. 2009
Offline
Interesting idea. However, in order to get the ripple vop to project on the flip mesh, the flip mesh needs to have consistent uv. The topology is changing in the flip mesh so it hard to get consistent uv on it.

The first step I would try is to use the dual rest generated in the flip sim to get a consistent uv on the mesh.
https://www.linkedin.com/in/kelvincai/ [www.linkedin.com]
User Avatar
Member
18 posts
Joined: June 2016
Offline
Hi Calvin,

thank you for your suggestion!

kelvincai
The first step I would try is to use the dual rest generated in the flip sim to get a consistent uv on the mesh.

Yes, the UV's are consistent at least on the flattened portion of the FLIP mesh. I am projecting the UV's from a camera and masking out the parts that are moving to much (by curvature, velocity and flattened attributes). So only the surrounding flat area around the splashes is of interest. I don't necessarily need the rest field there because the camera projection does the trick.

The really challenging part is to iterate over the point cloud to attach a ripple VOP to every single point in MAT/SHOP.

This is what I can not figure out and any push in the right direction is highly appreciated!
User Avatar
Member
18 posts
Joined: June 2016
Offline
No more ideas at all?
User Avatar
Member
323 posts
Joined: Jan. 2015
Offline
Ok lets try:

- get the position of the pixel to be rendered.
- find the closest points in your point cloud
- get the distance to the point(s) in the point cloud
- now you need to also write your own “ripple”

Just planar UVs or a rest position needed…
its a bit tricky to get the world space local space thing right.

Maybe you should first write a shader that just puts a white point where ever a point of your point cloud is…
From there you can expand to ripples…
  • Quick Links