Jump to content

looping over pointcloud in mat/shading context (SOLVED)


Recommended Posts

I'm trying to create rings in mantra that are larger where my scattered points are brighter. I've got a setup that works for that, but what I'm looking for iis for the rings on top of each other and overlap one another.

I figure I need to loop over my point cloud one point at a time and then multiply the result on top of each other maybe.  I can't seem to figure out how to get a loop that does what I want. I tried to follow the documentation for the point cloud nodes, and it even mentions that a few of them are useful in a loop situation but it's just not working correctly. Is what I'm trying to do even possible. I don't have a lot of experience with mantra.

Screenshot_13.jpg

mantra_pc_lookup.hip

Edited by smbell
Link to comment
Share on other sites

2 hours ago, Librarian said:

I think Entagma had on some Show that approach (solution) Siggraph CG.
https://www.youtube.com/watch?v=tKzDvvpP7G0

29:54
Hope it Helps!

 

 

Thanks for the link, unfortunately that setup seems to have the same effect as I have now of all the points being rendered together and they don't overlap.

Edited by smbell
Link to comment
Share on other sites

@smbell
I found this, maybe someone Can Help, to find a solution for MAT-Vop .
 

float maxradius = chf("radius");
vector nb_color;
float dist;
 
int handle = pcopen(@OpInput2, "P", @P, maxradius, chi("handle"));
 
while(pciterate(handle))
{
    pcimport(handle, "Cd", nb_color);
    pcimport(handle, "point.distance", dist);
    @Cd = lerp(@Cd, nb_color, dist/maxradius);
}

 

mattC.jpg

  • Like 1
Link to comment
Share on other sites

@Librarian Holy crap I got it working!. Thank you for your time in responding to me, while it didn't solve my issue exactly, I did one more search and found a 10 year old Peter Quint video that shows how to use Point Clouds in a loop in VOPS. I would have never figured it out, wow. What a bunch of Houdini mumbo jumbo to get it working, haha. If you're interested the video is "Point Clouds II" It won't let me link it for some reason.

Screenshot_14.jpg

mantra_pc_lookup_3.hip

  • Like 1
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...