Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

TreeCreator trees broken in deferred mode again

Discussion in '5.2 Beta' started by makeshiftwings, Aug 18, 2015.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It looks like something happened to Tree Creator Trees (not SpeedTree Trees) at some point between 5.1 and 5.2 that broke them in deferred mode again. All of my trunks and branches are now very washed out and white, while all of my leaves are now very dark. I have already tried both reimporting and rebuilding the trees, and I don't have a custom hidden tree shader.

    Attached pic: TreeCreator and SpeedTree trees in the same scene... note the white trunk and black leaves on the TreeCreator ones.
     

    Attached Files:

    Last edited: Aug 18, 2015
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I didn't get a response to this, so trying again. I just sent a bug report (Case 721697) with sample project that lets you interactively see how the rendering is not working. Here are some screenshots below, showing various states of lighting. The (broken) Tree Creator trees are on the left, while some (correct) SpeedTree trees are on the right.

    Basically, leaves are barely affected by light at all in either rendering mode. Trunk is barely affected by ambient in either mode. In Forward, it is only affected by Directional diffuse light and very badly washed out. In Deferred, it is only affected by specular global reflection value, not by directional light at all, and again badly washed out.
     

    Attached Files:

  3. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi, I think I've got the same problem or a similar one here with the Big Environment Pack 1.
    I'm using Unity 4.6.3f1 Pro.

    Nearest trees look like they're washed out, distant ones look like they're not even receiving lighting.

    I'm in deferred/linear color space. Changing it to Forward doesn't change much.



    Have you managed to solve this issue?
     
  4. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    @makeshiftwings Thanks for reporting. Will take a look when 721697 is verified.
     
    makeshiftwings and NeatWolf like this.
  5. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I've been talking with someone at Unity support who was looking into the bug; it seems like it's not creating the baked textures correctly in the tree creator. I've also got Big Environment Pack, and when first imported, it seemed ok but a little off, but then after pressing the "Refresh" button in the tree creator inspector to regenerate the textures, it was completely wrong, like in my original post. I think the original baked textures that come with BEP were created in Unity 4, and at some point during Unity 5 they changed the way those textures get generated... there used to be a bug where the fog color would get multiplied into the baked texture for example, and that was fixed. 5.1 I think was fine, but 5.2 seems to have broke it again and now the baked textures are either too dark or washed out.
     
    NeatWolf likes this.
  6. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I'm using Unity 4.6.3f1 Pro, so I'm using the Unity 3.5.7 submitted version of the package.

    I think there's something wrong when I set the color space to Linear. As long as I stay with Gamma baked textures look ok-ish.
    I really hope they're going to solve this bug in the next Unity 4.x/5.x version, it makes *lots* of assets from the store unusable or glitchy.

    Many people could think it's a problem of the Asset, and may ruin the Rating and Reviews of that Asset.
     
  7. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    This problem usually happens when fog is enabled. The tree creator re-generates the tree textures with the fog baked in. Turning off fog and rebaking the tree fixes the issue for me.
     
  8. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I never enabled fog in my project. I tried to enable it, rebaked, disabled it without any perceivable difference.
     
    Last edited: Aug 28, 2015
  9. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Hey @makeshiftwings @NeatWolf I worked on this issue today. I think I have it fixed. It is indeed related to incorrect texture generation under linear color space. But the code seems to be wrong since forever :) Anyway the fix could appear in a future 5.3 release and (maybe) 5.2 patch release.

    Good day,
    Yao
     
    NeatWolf likes this.
  10. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Just to be clear that TreeCreator is considered to be a deprecated feature in Unity 5.x. We will of course work on regression bugs (like the above one), but we will not make future improvements to it. We *might* be considering open source the TreeCreator in the future, but I'd guess we will go through quite some details before it actually happen.

    Cheers,
    Yao
     
    NeatWolf likes this.
  11. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Great! Nice to know it will be fixed!

    So, if the Tree Creator will be deprecated, what should be safely used for trees? Meshes with LOD? SpeedTree?
     
  12. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Existing TreeCreator trees should stay intact. You are safe to continue use them. SpeedTree is a much powerful tool for higher quality trees, but currently it might not deliver the best possible performance on less capable devices. But trust us, we are trying to solve the problem.
     
    NeatWolf and ImpossibleRobert like this.
  13. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I figured it would be phased out and replaced by SpeedTree eventually but I was hoping it would last a little longer. SpeedTree still has some lighting quirks as well when used alongside the Standard Shader and they're almost impossible to customize unless you pay for a separate SpeedTree subscription.

    But thank you for looking into it! Hopefully it can get fixed in a 5.2 patch down the road.