AWS Thinkbox Discussion Forums

PartitionID in PRT-Loader

I am querying PRT-Loader particle data over maxscrip.
When working with IDs from the cache, I seem to be getting double numbers when having multiple partitions loaded, since each partition starts with the same ID’s on cache time.
Does the PRT-Loader internally offset the loaded ID’s somehow? Or is there a way to read from the particle, which Partition it is loaded from to add this offset myself before further processing of the particle?

Thanks

Goran

Hi Goran,

Currently this is a known limitation - since IDs are not directly relevant to rendering, loading multiple partitions with the same ID was allowed from the beginning of Krakatoa. Unfortunately, once we added Magma and other features (like Cubic Interpolation, Delete By ID etc.), it started getting problematic.

The only workaround would be to reprocess each partition in a PRT Loader individually to bump up the ID channel and make it unique. The value added must be higher than the highest number of particles found in the sequence. You can use Magma to read the ID, add a large integer times the partition-1. Output as ID channel. Resave the PRT Loader to a new sequence. Then load the next partition, increase the partition index in the Magma flow by 1, resave to a new sequence. Rinse and repeat. As result, you will have each partition with higher IDs than the previous one, and this should give you unique IDs in the combined cloud once you load all resaved sequences.

I guess we should think about doing this automatically when saving partitions, but since Partitioning is really just regular saving with some MAXScript code to hold it together, right now it is not doable. We would have to add a feature to the renderer to add a custom increment to the ID channel, and make that part of the Partitioning code. I will go and log it as a wish…

Hey Bobo

I appreciate the nice elaboration.
Yeah, would be great to have it in future builds as I’m sure other people will run into this issue at some point.

For now, we’ll try to find a way to add this partition offset on caching time as a workaround. I was just wondering if there is already something that we can use.

Thanks for your help

Goran

It took us over a year, but I wanted to mention that Krakatoa MX 2.6.1 and higher now supports additional channels to identify a particle by its source sequence, and get the number of sequences in Magma. This is done on the fly by the PRT Loader, so no additional info needs to be stored in the actual files.
thinkboxsoftware.com/krakato … hange-log/

Note that the PRT Loader performing Interpolation between particles on multiple frames always took into account the ID and the source partition, so having duplicate IDs from partitions was never a problem (but there were other interpolation bugs that we fixed in v2.5).

Privacy | Site terms | Cookie preferences