Jump to content

Particle alembic point cloud, read detail attributes


Orsonorix

Recommended Posts

Hello to all,

I get alembic with point cloud, and age of particles is stored in detail attributes. I cant read correct attribute to corresponding point. I can read only first value. It's hard for me  to explain this problem but it is obvious if you open attached scene file. Hope someone knows how to solve this.

Thanks

Pc_Particles.zip

Link to comment
Share on other sites

hey rafal, your detail attribute is an array of floats. when you bind it to a float attribute only the first value will be read. you can just replace the code in your wrangle with:
 

float age[] = detail(0,"_age");
f@age = age[@ptnum];

note the square brackets which indicate we want to create an array of the specified type. a (valid) index of the array can be read with var[index]. in this case its @ptnum to fetch the corresponding value (assuming the array is ordered by point numbers).

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