thinkinmonkey Posted November 14, 2012 Share Posted November 14, 2012 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 Quote Link to comment Share on other sites More sharing options...
DanBode Posted November 14, 2012 Share Posted November 14, 2012 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. Quote Link to comment Share on other sites More sharing options...
thinkinmonkey Posted November 15, 2012 Author Share Posted November 15, 2012 Hi Dan, I made what you suggested, but with no success. There's a file attached to this, if you could be so kind to give it a look. Thanks. pointCloudDisplacementREST.zip Quote Link to comment Share on other sites More sharing options...
Alanw Posted November 15, 2012 Share Posted November 15, 2012 The file you attached works fine for me. All I did was increase the pointcloud search radius to 0.496. Quote Link to comment Share on other sites More sharing options...
thinkinmonkey Posted November 16, 2012 Author Share Posted November 16, 2012 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. Quote Link to comment Share on other sites More sharing options...
petz Posted November 16, 2012 Share Posted November 16, 2012 you could move the shading points back to the original position for the point cloud lookup. hth. petz pc_disp.zip Quote Link to comment Share on other sites More sharing options...
thinkinmonkey Posted November 17, 2012 Author Share Posted November 17, 2012 Hi petz, thank you very much, it was what I was looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.