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
pcopen in cvex
2714 4 0- lucienfostier
- Member
- 5 posts
- Joined: 10月 2009
- Offline
- F e z
- Member
- 5 posts
- Joined: 2月 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…..
}
}
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…..
}
}
- lucienfostier
- Member
- 5 posts
- Joined: 10月 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
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
- F e z
- Member
- 5 posts
- Joined: 2月 2015
- Offline
- lucienfostier
- Member
- 5 posts
- Joined: 10月 2009
- Offline
-
- Quick Links