Announcement

Collapse
No announcement yet.

Speed Tree 8 for Unity - Alpha Cutoff

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Speed Tree 8 for Unity - Alpha Cutoff

    Code:
       // transparency
        OUT.Alpha = color.a * IN.color.a;
        clip(OUT.Alpha - 0.3333);

    In Speed Tree 7 for Unity we could adjust the alpha cutoff amount in the shader, but in version 8 the alpha cutoff is a fixed value. It creates a problem as the leaves look too transparent in the distance. We need to be able to adjust this value again.

  • #2
    Hello,

    This problem occurs because when the opacity texture is downscaled into the mipmaps, it blurs the white and black parts, ending up grey (and closer, if not past, the alpha cutoff value).

    Adjusting the alpha cutoff on the shader will indeed help the trees in the distance by making it thicker, but it will also affect the tree up close, too.

    Instead, you can adjust the problem where it occurs - in the mipmap generation. On the texture, make sure "mip maps preserve coverage" is enabled, and play with the cutoff value there. This will help the mipped opacity not go grey.

    Hope this helps

    Comment


    • #3
      Mip Mapped Preserved is ticked for all leaf textures.

      I have edited the speed tree 8 shader to change the alpha cutoff and it improves the look of the leaves significantly with a different value.

      It makes no sense to not have a setting for alpha cutoff in the shader, when previously you did.
      Last edited by camta005; 01-25-2019, 09:24 PM.

      Comment


      • #4
        @camta005 Which version of unity did you use with Speedtree 8? I tried 2018.3 and 2019.1 and got this error "SpeedTree file does not contain run-time data. Be sure to re-save it using the Unity-specific version of the SpeedTree Modeler"

        I'm pretty sure the tree I got was a Speedtree Game 8 UE/Unity compatible

        Comment


        • #5
          Originally posted by SpeedDude View Post
          @camta005 Which version of unity did you use with Speedtree 8? I tried 2018.3 and 2019.1 and got this error "SpeedTree file does not contain run-time data. Be sure to re-save it using the Unity-specific version of the SpeedTree Modeler"

          I'm pretty sure the tree I got was a Speedtree Game 8 UE/Unity compatible
          I was using Unity 2018.3.2f1 and I exported the models from Speed Tree 8.3

          Comment


          • #6
            Thanks! I'm grabbing Speed Tree 8.3 now. I didn't know there needed an extra step

            Comment

            Working...
            X