Created patch to let ParticleInstance use a UV set for particle layout

Hi. I’ve created a patch to address a problem I saw in ParticleInstance and am now trying to figure out how to take the next step of submitting it. Is this the right forum to post in?

Anyhow, a problem I was having with ParticleInstance was that the rotations of the particles were essentially arbitrary, which is a problem when you’re trying to create planes that follow the paths of the hair particle. For example, Suzanne has a hair particle system assigned to her and I’m using ParticleInstance to render a wedge shaped fur particle to each strand. You will notice an obvious part running down the back of her head where particles switch from running parallel to the ground the perpendicular (1).

Poking through the code, each hair is oriented based on the orientation of the quad which is it emitted from (as much as I gather, the particle bode generates a new tessellated mesh from the source mesh to use in particle calculations). Since this mesh generated internally, the user has no control over how these quads are formed.

To get around this, I added a field to ParticleInstance which allows you to select a UV map from the object emitting the hair particles. Now instead of using the vertex coorinates, the UVs can give the particles a direction (2).

You can also adjust the UVs to create alternate particle grains (3).

Let me know what you think. The docs said that this should be reviewed by the community, so I’m hoping I’m posting this in the right place.

This may be a better demonstration of the issue:

I’ve submitted the patch here in case anyone is interested: