Page MenuHome

Fix T38811: Cycles particle ids are inconsistent when using multiple particle systems.
ClosedPublic

Authored by Lukas Tönne (lukastoenne) on Feb 25 2014, 5:43 PM.

Details

Summary

Problem is that the particle systems in the cycles database are not
stored in a well-defined order. This means the particle_id for dupli
objects can not simply be assigned using a global running index during
sync.

Now the particle index is assigned locally for each particle system.
When transferring particle data to the device as a single texture, the
particle indices are offset based on the final order of particle systems
in the database.

Diff Detail

Branch
master

Event Timeline

Looks good to me, just minor nitpick about code style.

intern/cycles/render/object.cpp
171

Could you call this numparticles for consistency?

192

Cycles code style here is int particle_index = (ob->particle_system)? ob->particle_index + particle_offset[ob->particle_system]: 0;

Thanks, fixed nitpicks in the master commit.