Toolchefs / atomsGaffer

Atoms Crowd extension for Gaffer
https://atoms.toolchefs.com
27 stars 15 forks source link

deformation weights/indices to be stored as primvars #26

Open carstenkolve opened 5 years ago

carstenkolve commented 5 years ago

currently the weights/indices for deformation are stored as custom attributes, instead store them as primvars that will be exposed via the VariationReader and need to be read from the primvars in the CrowdGenerator, this will make it easier to inspect / modifiy them as well as benefit of compression etc.

A drawback of putting this stuff into primvars is that there currently no really elegant way to support varying influence lengths (ie, one point driven by 2 influences, the next one by 8). What we'd eventually like to do is support varying array data for indices and weights per point, but we currently don't because we haven't come up with a good way to interpolate those.

Anyhow, we ended up with a convention that looks like this:

carstenkolve commented 5 years ago

If we take this approach, we need to make sure the Generator removes those primvars so they never hit the renderer. I'd propose to have a dedicated section as to which primvars are being inherited. so if someone really wants to get them past the generator, they could add it (similar to the copy sop in houdini)