pcopen in cvex

   2707   4   0
User Avatar
Member
5 posts
Joined: Oct. 2009
Offline
Hi,

anyone done point cloud look up in cvex?

i need to move replicated points around based on vector pointing to points around the current.

I could create thoses vector in sop but then if i want to have more than one vector or varying number of vectors, how to achieve this in sop and use it in cvex?

I hope It make sense!

thanks for help

lucien
User Avatar
Member
5 posts
Joined: Feb. 2015
Offline
Is this what you are after?


int handle = pcopen(1, “P”, @P, 0.2, 2);
// 0.2 is radius
// 2 is maxpoints

if (pcnumfound(handle)>0) {
vector nor = pcimportbyidxv(handle, “N”, 0);
vector pos = pcimportbyidxv(handle, “P”, 0);

vector dir = normalize(v@P - pos);

if (dot(dir, normalize(nor)) > 0.9) {
//do something here…..
}
}
User Avatar
Member
5 posts
Joined: Oct. 2009
Offline
hi Fez,

thanks for your answer!

this code is run into a point wrangle node?

if that's the case, I don't think that solve my problem…

Cvex is run at render time, hence I don't think there is a notion of input index
as found in your call of pcopen.

Beside, I think my problem could also be the coordinates system.

I already experimented with point cloud look up in shader,

and that might seems obvious but you need to make sure you switch from shader space to world space to do the look up.

What I'm looking for is not a general “how to” make a point cloud look up, but
rather in the specific context of cvex how to do that.

thanks

lucien
User Avatar
Member
5 posts
Joined: Feb. 2015
Offline
Instead of inputpath you can use “opbj/geo1/OUT_PC_LOOKUP” instead. The principal should be the same no matter what contex you are. I use that inside DOP where I cannot rely on input connections to lookup pointcloud
User Avatar
Member
5 posts
Joined: Oct. 2009
Offline
Have you already tried doing this in cvex?
  • Quick Links