Search Issue Tracker

By Design

Votes

10

Found in

5.4.2f2

Issue ID

866746

Regression

No

SpeedTree's MaterialPropertyBlock is overriden when wind animation is applied

Speedtree Integration

-

To reproduce:
1. Open attached project BugReport.zip
2. Open "BugReport" scene. (if 5.4 or older version is used, then SpeedTree looks red in EditMode)
3. In hierarchy find "Broadleaf_Desktop" object. It has a script "NewBehaviourScript.cs" which applies selected color to all of it's child objects (using MaterialPropertyBlock).
4. Play "BugReport" scene. Now Cube is still affected by MaterialPropertyBlock, but SpeedTree is not.

Expected result: Objects are affected by MaterialPropertyBlock from the script.
Actual result: SpeedTree is not affected by MaterialPropertyBlock in Play mode. (And in Edit mode since 5.5)

Reproducible with: 5.3.6p7, 5.4.2f2, 5.5.0f3, 5.6.0b3

Note:
However it still doesn’t work even when WindZone is removed.

Workaround:
As a workaround, remove Tree component from Speedtree gameobject in the Hierarchy. That would inactivate windzone, but you will at least have red tree.

Comments (5)

  1. MiFrilke

    Jan 13, 2021 14:23

    Just for reference if someone is looking this up:

    We've reported this issue again and insisted on it being reopened.

    The new issue can be found here: https://issuetracker.unity3d.com/issues/setting-properties-via-materialpropertyblock-does-not-work-when-a-tree-component-is-attached-to-the-object

  2. TacticalShader

    Aug 25, 2020 09:58

    Adding my two cents, I would be very also interesting for us if you could provide how we could add instanced properties to Tree.
    Setting this ticket as As Design is like shoving this issue under the rug, as it doesn't open the discussion : our needs are valid here and they need to be heard.

  3. theFrenchDutch

    Jun 10, 2017 15:13

    Seeing the exact same thing. I have scenes with many speedtree objects and need to modify their Main Color in their property blocks, but any change is overriden.

  4. bahzilla

    Apr 28, 2017 06:34

    Fixing this would provide pretty huge performance boost for our game. (tons of plants that require custom properties for gameplay reasons) A fix or workaround guidance that would let us keep wind, custom properties and instancing would be much appreciated!

  5. SLGEric

    Jan 24, 2017 18:14

    Seeing this as well. Tried to add per-instance alpha cutoff values to our speed tree grass meshes, and it works fine so long as you remove the 'Tree' component on the object - but then you lose wind.

    Tried copying any of the existing params from the current renderer property block and then adding my own, and that still did not work.

    Seems the 'Tree' component is overridding any MaterialPropertyBlock that you use

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.