Jump to content

pointcloud vopsop issue


JoshJ

Recommended Posts

I'm doing a very simple test with getting Cd from a point cloud in sops, using pciterate and a while loop. Rather than accumulating the color, I'd like to achieve something like "over", where the color from the next point either overwrites the previous color, or doesn't overwrite where color has already been absorbed.

Please have a look at the attached files, you will see the artifacts present. Thanks for any insight into getting this method working.

testing_pointclouds.hipnc

post-3690-132503632226_thumb.jpg

post-3690-132503633411_thumb.jpg

Edited by joshjordan
Link to comment
Share on other sites

Thanks, however as a next step, I actually need to implement this in a shader (shop, material shader builder)... that's the reason for using this vops point cloud approach. As an initial prototype, I chose to first get it working in sops.

There's a thread here with an example file by pclaes:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=20001&highlight=highest+distance

...which does some magic that I don't quite understand. I think something similar could determine if some points coming through the loop have already been colored.

And another example, have a look at this thread:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=22645&highlight=point+cloud

the example file by tamte is named:

pcloudtest_age_fix.hipnc

In this example, some condition other than a simple pciterate is used to plug into the condition of the "if". Can we use something like this to test if a color has already been absorbed from another point? I tried something like this yesterday but never got anything working... I'm not sure if its because of a limitation of the system, or my own inexperience with using point clouds.

Edited by joshjordan
Link to comment
Share on other sites

I think there was an image bombing shader in rdg's "a shader a day" thread, but I can't seem to find it (od[search] gives me an error).

It might be of relevance -- if you find it ;)

Thanks, yes I found that the other day as well. That approach, which I believe uses uv space as a base, is my second option if we can't get rid of these artifacts from the point cloud lookup.

Edited by joshjordan
Link to comment
Share on other sites

An idea is to randomly offset the pointcloud in Y direction and in your VOP iterate over all points and set the color to the point which is in allowed radius and has the highest Y value. Faking the circles actually being stacked on top of each other and not being in each other.

Link to comment
Share on other sites

You could look up each point's number in the point cloud loop and store the lowest (or highest). You can use a compare vop after a pcimport to see if the current point number is lower than the previous minimum. If the current point number is lower than the previous lowest, store this point's color and number, otherwise store the previous color and lowest number. See attached.

testing_pointclouds_db.hipnc

Link to comment
Share on other sites

DanBode, That's a great solution. That's what I was looking for. Thanks very much.

Edit:

I've tried to extend this further and support something like an "alpha channel" or "transparency" for the colored points. However, I can't figure out how to combine it with this approach. I am attaching another file which demonstrates the issue.

You can switch this node from 0 to 1, which will demonstrate the two approaches I'd like to combine:

/obj/grid_object1/vopsop1/while1/if1/switch1

Alternatively, any methods using the pointclouds in vops which may not solve the problem perfectly, but will minimize the artifacts, are also welcome.

pointclouds_overlap_with_alpha.hipnc

post-3690-132511158376_thumb.jpg

Edited by joshjordan
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Did anyone succeeded to multiply or add the color between each other?

I did however make my circles follow radius size from the point cloud pscale attribute, I still got some chopped circles thou. If anyone knows how to improve this please share.

Thanks.

testing_pointclouds_db_02.hipnc

Edited by Mzigaib
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...