Adding GPU instancing property to SpeedTree shader

I’m running into some problems trying to modify the existing speedtree shaders to allow me to have custom alpha cutoff per tree instance. I am using animated alpha cutoff to animate growth of my plants.

It seems that the internal ‘Tree’ component attached to the speedtree objects is already setting some per-instance data using a MaterialPropertyBlock (primarily for wind it seems), and thus is overridding any of my attempts to use my own property block to set the data. Even when using Renderer.GetPropertyBlock() and using that propertyblock to set my instance parameter, it still is not used. If I remove the ‘Tree’ component from my speedtree objects I can get it to function, but now I no longer have any wind.

Is there any way to do what I want currently?

As a work around I’ve doubled the highest LOD of my LODGroup, and removed the ‘Tree’ component from all the other LODs. I then instance the material of the first LOD and set the appropriate values.

This obviously completely disables batching, but only for the highest LOD. On the other hand the lower LODs lose their wind animation but do otherwise batch and set their properties using MaterialPropertyBlocks. Not a horrible tradeoff in the meantime. It looks like the issue is already posted: Unity Issue Tracker - SpeedTree's MaterialPropertyBlock is overriden when wind animation is applied