Jump to content
thinkinmonkey

Displacement and point cloud

Recommended Posts

Hello everyone,

I'm trying to solve this problem: I use a previously baked point cloud file to paint a grid in render time, but the grid is displaced by an antialiasing noise.

The issue is some points will be displaced by the noise, of course, so they will be far enough to be no more influenced by the point cloud.

What I want is to have all those points influenced by the point cloud, then they can be displaced, or in other way, is it possible to know the position of a point before is displaced, passing this point to the pointCloudOpen, then let Mantra to displace it?

Thanks in advance.

P.S. In the zip file you'll find the scene and the geo/point cloud file. The scene is quite simple, a grid with a modified clay shader and another grid with some scattered points cached as point cloud. Those points have an attribute, distance, that is a simple black/white color based on their distance to the centre <0,0,0>. I use this point cloud to (color)mix the clay shader with a simple red. Then I use an antialiasing noise to displace the grid, but the point cloud doesn't work as expected because the displacement.

pointCloudDisplacement.zip

Share this post


Link to post
Share on other sites

You can store a rest position for your geometry using the rest sop, and use that rest attribute to look up your pointcloud instead of P, this will use an undisplaced position.

Share this post


Link to post
Share on other sites

The file you attached works fine for me. All I did was increase the pointcloud search radius to 0.496.

Share this post


Link to post
Share on other sites

Hi Alanw,

well, the aim of my question is to avoid increasing the radius, because it should work before displacement takes place, otherwise a big radius could influence also parts of geometry I'm not interested.

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

×