Announcement

Collapse
No announcement yet.

Unity - UniversalRP Speedtree shaders dark shading and no light probe support? (URP)

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

  • Unity - UniversalRP Speedtree shaders dark shading and no light probe support? (URP)

    When importing Speedtree shaders into URP, we noticed that once the light mode was set to baked only on the directional light in our scene, the speedtree shaders bake out completely black from Terrain Light probes. Prior to baking (with all baked lighting cleared), the trees just have a dark side where they are in shadow but this is very dark and looks ugly nomatter what we do with Shadow intensity on the directional light.
    When we took the tree materials and changed them to the default URP/Lit shader, they look just fine with terrain light probes.

    My assumption here is that in URP only, the light probes on the terrain bake out completely black for Speedtree shaders as this does not happen with the built-in renderer, see the videos below. I am happy to share this example scene (both the URP and built-in renderer version) as we are not pleased our trees do not look right in URP now.

    UniversalRP version:


    Built-In version:



  • #2
    Hi ROBYER1 : URP is a new render pipeline so official support for it has not yet been configured by ourselves nor Unity. That said, we can do what we can to help address the issues you're facing as the pipeline develops.

    To aid in our testing and investigation of your built-in pipeline and URP problems, we need some more information from you. We'd recommend sending the answers to the following questions to [email protected] so that we can more formally address your support request along with attached files (Unity scene and/or trees).

    What version(s) of the SpeedTree modeler are you exporting from and what are your export settings?

    What version of Unity are you using? Are there any settings you've modified in your scene?

    Are these custom trees or store-bought SpeedTrees? (If custom, could you open the file, save as with assets, and send us a zip with a note on the problems the file is presenting you in Unity?)

    Comment


    • #3
      I have emailed the address you specified with the details you needed and some simple reproduction links. We are using the subscriber trees and the 'Free Speedtree Assets' example Asset pack from Unity Asset store in the examples. All necessary files are in the .zips linked and you will need to use Unity 2020.1.0a23

      There are currently branches of the Unity Scriptable Render Pipeline github repo where they are working on Speedtree support in URP and HDRP:

      https://github.com/Unity-Technologie...ull/5947/files

      I look forward to your reply!
      Last edited by ROBYER1; 02-21-2020, 04:57 PM.

      Comment


      • #4
        Originally posted by KatLeeHong View Post
        Hi ROBYER1 : URP is a new render pipeline so official support for it has not yet been configured by ourselves nor Unity. That said, we can do what we can to help address the issues you're facing as the pipeline develops.

        To aid in our testing and investigation of your built-in pipeline and URP problems, we need some more information from you. We'd recommend sending the answers to the following questions to [email protected] so that we can more formally address your support request along with attached files (Unity scene and/or trees).

        What version(s) of the SpeedTree modeler are you exporting from and what are your export settings?

        What version of Unity are you using? Are there any settings you've modified in your scene?

        Are these custom trees or store-bought SpeedTrees? (If custom, could you open the file, save as with assets, and send us a zip with a note on the problems the file is presenting you in Unity?)
        I have written up a quick simple guide to demonstrate the issues from the video for you, I have also emailed this over to the support email in the same thread

        Steps:
        1. Make a new Unity 2020.1.0a23 (or a24) project for Android Platform using 3D Template in Unity Hub
        2. Build Settings - Set texture compression to ASTC
        3. Player settings - Set scripting backend to IL2CPP
        4. From the Asset Store, import these example speedtrees (or copy the exact same assets from the repro project with this case as the Speedtree files are unmodified) https://assetstore.unity.com/package...-package-29170
        5. Make a new scene, leave everything as default
        6. Set Directional Light to 'Baked Only'
        7. Create a terrain, leave default settings but set width 50 and height to 50 under terrain settings, Lightmapping settings - Scale in lightmap to '1' (so we can see if any shadows bake clearly)
        8. Lighting - Lightmapping Settings - Lightmapper - set to GPU (preview)
        9. Drag and drop Broadleaf mobile or any other speedtree into the scene
        10. Set the tree to 0,0,0 position in the world and tick it as static, tick 'set children static' also when asked
        11. Drag the tree gameobject back into the project window to make it a prefab
        12. Under Terrain - Paint Trees, click 'Edit tree' and add tree, drag the prefab tree we have just made into the tree edit dialogue
        13. Now paint some of the trees on terrain
        14. Bake the scene lighting in the Lighting window, verify the trees cast shadows and are lit perfectly using built-in 3d renderer with the Terrain light probes (you can see under Terrain-Terrain Settings - Tree & Detail Objects - Bake Light Probes For Trees is ticked by default for this.
        15. --Importing of URP--
        16. Window-Package Manager- All Packages - Universal RP - Install
        17. Right click in project window - Create - Rendering- Universal Render Pipeline - Pipeline Asset (Forward Renderer)
        18. Edit - Project Settings - Graphics - drag the newly created Pipeline asset into the Render Pipeline Asset field at the top of the window
        19. On the Terrain, Terrain Settings - Basic Terrain - Material, add the TerrainLit material from Packages - Universal RP\Runtime\Materials (This seems to be a workflow issue with switching to URP)
        20. Select the original speedtree asset you used in the project window (Broadleaf mobile) - Materials - Generate (or regenerate materials)
        21. Now see the trees that looked fine (then turned pink due to the render pipeline change) are now black, something is obviously off here!
        22. Lighting Window - Clear Baked Data (this is in the arrow dropdown which is part of the Generate Lighting button)
        23. Now the trees look fine again!
        24. Generate lighting again to verify that the terrain tree light probes go black again, you can at this point make a Unity cube marked as static into a prefab and paint a few as 'Trees' on the terrain and bake the lighting to see that the probes on the cubes look just fine but not the URP Speedtrees.


          --Speedtree 8 warping effect repro
        25. Player settings - Set scripting backend to IL2CPP
        26. From the Asset Store, import these example speedtrees (or copy the exact same assets from the repro project with this case as the Speedtree files are unmodified) https://assetstore.unity.com/package...-package-29170
        27. Make a new scene, leave everything as default
        28. Set Directional Light to 'Baked Only'
        29. Create a terrain, leave default settings but set width and height to 50 under terrain settings, Lightmapping settings - Scale in lightmap to '1' (so we can see if any shadows bake clearly)
        30. Lighting - Lightmapping Settings - Lightmapper - set to GPU (preview)
        31. Drag and drop Broadleaf mobile or any other speedtree into the scene
        32. Set the tree to 0,0,0 position in the world and tick it as static, tick 'set children static' also when asked
        33. Set both the material shaders on the speedtree and the LOD models under the speedtree from Nature/Speedtree to Nature/Speedtree8
        34. Zoom the camera back/forth to see the warping effect
        35. Import URP same as above and make a Pipeline Asset
        36. Regenerate the Speedtree materials
        37. Set both the material shaders on the speedtree and the LOD models under the speedtree from UniversalRP/Nature/Speedtree to UniversalRP/Nature/Speedtree8
        38. Zoom the camera back/forth to see the warping effect

        Comment


        • #5
          Would have liked to have found out the possible solution to this issue.

          Comment

          Working...
          X