Cycles: From Dupli fails on Grid particles
Closed, ArchivedPublic


System Information
Win8 64bit | GTX680

Blender Version
Broken: 2.77a Official Release (abf6f08)

Short description of error
From Dupli feature for Texture Coordinate and UV Map node failed to work with grid distribuated particles.

Exact steps for others to reproduce the error


Alexander Gavrilov (angavrilov) triaged this task as Confirmed priority.Jul 26 2016, 7:45 PM

The issue is reproducible, but the cause seems to be that computing UV for grid distribution is not implemented at all (no valid binding to faces in particle data), and thus returns nonsense. Since particles are going to be significantly reworked in 2.8, this will probably go on TODO.

I wouldn't even consider UVs for grid distribution a TODO item in the sense that's a bug we need to fix eventually, points within the volume don't clearly correspond to an point on the surface.

I would expect the UV to be zero for all particles though, instead of these seemingly random coordinates there are now. But either way feel free to handle this report as you see fit.

What seems to happen now is basically that it uses the field intended for barycentric on-face coordinates for uv interpolation to store orco, and doesn't set face index. The code returning uv then doesn't check that it's grid mode and applies those coodinates to face 0. Adding a check to return black shouldn't be too hard I expect.

Potentially in grid + emit from faces mode it could bind to the nearest point on the nearest face, but that would require substantial code changes and thus is definitely not for 2.78.

Added to TODO wiki page, so I think this can be archived.