Hi
I have alembic with point cloud exported from Max tyflow , and age of particles is stored in detail. It looks like I need to read _age and assign it to corresponding point, but I can read only first value. There is everything in spreadsheet but can't read chosen value. If I use
f@age = detail(0,“_age”,0);
I will get first _age and that is correct but if I use
f@age = detail(0,"_age",0);
I get 0 and that is wrong.
There is different value in spreadsheet on detail _age. Same problem if color is exported it also lands in detail in this form. If Velocity is exported it's stored on points as usually
Scene with simple alembic in attachment.
Thanks
Alembic point cloud, how to copy detail to points
3982 4 1- Orsonorix
- Member
- 25 posts
- Joined: 4月 2015
- Offline
- c0y
- Member
- 52 posts
- Joined: 6月 2016
- Offline
It's because your details attribute is an Array “_age”
If you want to read it, you need to get the array in a; and then read it with
try to paste this is a detailwrangle :
If you want to read it, you need to get the array in a
float _age[] = detail(0, "_age")
f@age = _age[index]
try to paste this is a detailwrangle :
float value; int pNum = attribsize(0, "detail", "_age"); float _age[] = detail(0, "_age"); for (int i = 0; i < pNum; i++) { value = _age[i]; setpointattrib(0, "age", i, value, "set"); }
Edited by c0y - 2020年11月27日 07:53:36
- Orsonorix
- Member
- 25 posts
- Joined: 4月 2015
- Offline
- Sam Mason
- Member
- 8 posts
- Joined: 10月 2013
- Offline
- Orsonorix
- Member
- 25 posts
- Joined: 4月 2015
- Offline
-
- Quick Links