After digging around for[edit] There is a whileproper solution which I'll add as a separate answer, it looks likebut since this technique is not possible. The closest I got was an OSL script using tracesetdifferent enough to findhave its own uses (like if you want different grass models at the value, butedges) I'll leave it turns out that Blender OSL doesn't implement tracesethere.
After digging around for a while, it looks like this is not possible. The closest I got was an OSL script using traceset to find the value, but it turns out that Blender OSL doesn't implement traceset.
I did come up with a workaround that more or less does what I want:
- Create an additional vertex group (I called it
water.edge
) on the emitter and assign all vertices to it. - Add a Vertex Weight Mix modifier to the emitter, which copies the original
water
vertex group towater.edge
. - Below that add a Vertex Weight Edit modifier that edits
water.edge
and applies a custom falloff curve that starts at 0, rises to 1 then falls back to 0. This makeswater.edge
have its highest values where thewater
values are intermediate. - Create a new particle system
yellow grass
, and use separate yellow grass variant particles. - Use the
water.edge
vertex group to control the density and length of theyellow grass
particle system.
Downside is the texture doesn't "blend" from one region to another, but at least I can get dry grass where I want it.