Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

(Case 1227083) Tree Nature/Soft Occlusion shader in URP

Discussion in 'World Building' started by chanfort, Feb 10, 2020.

  1. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Issue Tracker

    I was wondering if Nature/Soft Occlusion shader is supported in URP? I was recently experimenting with trees in URP and getting issues. If I use Nature/Soft Occlusion shader, trees appear to be rendered properly only in billboard phase. While nearby trees appears pink. Changing material to use Universal Render Pipeline/Nature/SpeedTree8 seems to be working for nearby trees but not for billboard phase. I am also getting warnings in console:

    Code (CSharp):
    1. The tree MyTree must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
    2. UnityEngine.TerrainData:RefreshPrototypes()
    I also didn't found in Universal Render Pipeline/Nature category any other soft occlusion shaders. So I was wondering if URP is supporting terrain trees?
     
    Last edited: May 12, 2020
  2. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Having severe issues with the Speedtree 7 and Speedtree 8 shaders that are part of URP, reporting this test scene soon
     
    Kexo1, aitorarts and URPian like this.
  3. URPian

    URPian

    Joined:
    Aug 13, 2012
    Posts:
    33
    Received the following error:

    Code (CSharp):
    1. The tree __ must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
    2. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Using the said Nature/Tree Soft Occlision Bark turns the trees into everyone's dreaded color bright pink.
    Then one has to switch back to URP/Nature/SpeedTree8.

    Please bring a SpeedTree9 with compatibility with URP dear Team Unity.
     
    Last edited: Feb 24, 2020
    aitorarts and ROBYER1 like this.
  4. URPian

    URPian

    Joined:
    Aug 13, 2012
    Posts:
    33
    The thing about using non-SpeedTree shader is that the Tree won't react to Wind.
    Then one will have to use some non-terrain wind function or buy a probably paid asset store shader
     
    ROBYER1 likes this.
  5. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Using the exact same Speedtree shaders in Built-in renderer produces correct results, seems that there are some issues with Terrain tree lightprobes and the URP-only Speedtree shaders



    I have raised a forum post about this with Speedtree (link below) although I feel this may be something Unity SRP team need to look into?

    @wyattt_ @XiaoxiLiu
    -There is someone working on the Speedtree shader graph who I am trying to inform of this issue, are you able to look into this or notify them?
    Reported as a Bug with (Case 1221827) [URP][Terrain][Speedtree]Terrain LightProbes for Speedtree7/8 shaders bake black

    Speedtree forum post:
    https://forum.speedtree.com/forum/s...ading-and-no-light-probe-support-urp#post8218

    Unity forum post:
    https://forum.unity.com/threads/urp-terrain-lightprobes-for-speedtree7-8-shaders-bake-black.833083/
     
    URPian likes this.
  6. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    This is only partially true. Non-SpeedTree trees are swinging in wind in model phase and are static in billboard phase. And SpeedTree tree branches are moving while regular trees only swing.

    The main problem with SpeedTree trees is that it is possible to use only several hundreds or several thousands of trees while with non-SpeedTree trees we can use hundreds of thousands of them.

    So, since SpeedTree is not a replacement for build-in trees, I think both of them should be supported in URP at some time. Especially after hearing that build-in pipeline might be deprecated in the more distant future :)
     
    URPian and ROBYER1 like this.
  7. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    URPian, xarikrichna and chanfort like this.
  8. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    ROBYER1 likes this.
  9. URPian

    URPian

    Joined:
    Aug 13, 2012
    Posts:
    33
    Upvoted
     
    ROBYER1 likes this.
  10. URPian

    URPian

    Joined:
    Aug 13, 2012
    Posts:
    33
    I would like to report a positive change to the silver edges of the tree leaves.

    Using :
    Tree - SpeedTree sample tree pack from the Asset Store
    Shader - URP/Nature/SpeedTree7 or 8
    Unity - URP 2019.3.2f1

    Located in:
    Window/Rendering/Lighting Settings/Environment^EnvironmentReflections^Cubemap

    There was an inaccurate cubemap possibly loaded by either Bakery Lightmapper or some plugin which I removed and forgot to clean the project after removal.

    Now the SpeedTree has their original "shine" as one can preview in
    https://store.speedtree.com/unity/
     
    ROBYER1 likes this.
  11. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    So, recently I spend some time to make demo project with massive forest containing millions of trees. It highlights current advantages and limitations of Soft Occlusion vs SpeedTree in Build-In and URP pipelines. I also converted some Book of the Dead trees to work with Unity 2019.3.0f6 Build-In and URP pipelines.

    Demo

    Demo projects are available here: https://github.com/chanfort/Tree-billboards-stress-test. Demo contains two projects. One is to show the forest in Build-In render pipeline, and another to show alternative in Universal render pipeline. Player can move around the world with WASD keys, rotate camera with mouse right button and zoom with mouse scroll wheel. Naming in projects is combined from these shortcuts: B - Build-In render pipeline, FB - camera facing billboards, CB - cross-plane billboards, SO - soft occlusion shader, ST7 - SpeedTree 7 shader, ST8 - SpeedTree 8 shader.

    Build-In pipeline project

    This project contains 3 scenes in order to show how forest looks like in Build-In render pipeline.

    B_FB_SO Scene

    Scene named B_FB_SO contains the first example. The demo generates terrain on entering in play mode. There are nearly 2 million trees placed on the terrain. Trees in this demo contains only single LOD and at larger distances trees appear as billboards. Tree shaders are set as Soft Occlusion Bark and Leaves. This allow trees to appear properly in billboard phase. Here is how the scene looks once entered into play mode:

    BuildIn.png

    World is generated within 3-5 seconds and afterwards gameplay runs at impressive 300 FPS on my 16-inch MacBook Pro (in Editor). Number of trees is defined in GenerateTerrain.cs script and can be easily changed. Bringing larger number of trees increases initial time to generate the world. But once generated gameplay performance is decreasing not very significantly with growing number of trees. Player can also see nearby trees swinging in wind. More distant trees are rendered in build-in billboard phase.

    B_CB_SO Scene

    This scene is identical to the previous B_FB_SO Scene except one change, each tree model is set with LOD Group so that the first LOD would appear as model and the second LOD appears as two cross intersecting planes billboard model. This way the camera facing billboards are not used and instead cross-plane billboards are used. Here is how the scene looks:

    BuildInLOD.png

    As we can see, the scene looks similar to the previous one except the catastrophic drop of performance from 300 FPS down to 0.9 FPS! The scene contains slightly less tree instances, around 1.2 million. So the estimate downgrade in performance would be (300 / 0.9) * (2 / 1.2) ~ 555 times. By comparing statistics tab at the top right corner we can also notice this number in this scene Batches: 578433. In the B_CB_SO Scene this number is Batches: 1476. However, Saved by batching: 0 in B_FB_SO Scene. But as we will see from other examples, where instancing is enabled and more are saved by batching, performance increases only slightly.

    B_CB_ST8 Scene

    This scene contains similar setup as B_CB_SO Scene except that instead of Soft Occlusion shaders, SpeedTree8 shaders are used. This allows us to see how BOTD trees looks with SpeedTree8 shader in Build-In render pipeline. Here is the scene view:

    BuildInST.png

    As we can see here, most of the trees appears black with only small areas illuminated by sunlight. However, this might be caused as BOTD trees were not designed to be used as SpeedTree8 models. And it may need a proper SpeedTree8 conversion or even modelling to fix the issue. The performance in this scene improves slightly from 0.9 to 1.2 FPS. But that is incomparably far from what was in B_FB_SO Scene. B_CB_ST8 tree materials are set to use instancing and we can see that Saved by batching: 577132 in this scene.

    Universal render pipeline project

    The remo contains the second project which is set in a similar fashion to use URP.

    U_FB_SO Scene

    This scene is set in a similar way like B_FB_SO Scene in the first project except that the project is converted to use URP. Trees in this scene are still using Soft Occlusion shader from Build-In render pipeline as there are no alternative Soft Occlusion shader in the URP. Here is the result:

    URP.png

    As we can see trees which are close to camera are rendered in model phase and appears pink. This is not surprising as Soft Occlusion shader selected from Build-In render pipeline can't support URP. But the interesting part is that billboards appear to be rendered correctly! That could mean one of two: that billboard phase has been already implemented in URP, or that internal camera facing billboard shader is compatible with new SRPs including URP. Looking from performance perspective, the scene runs at solid 300 FPS in the similar was as it was with B_FB_SO Scene. This is because camera facing billboards are used which are capable to render millions of trees at playable framerates.

    U_FB_ST8 Scene

    The difference introduced in this scene is that instead of Soft Occlusion shaders, URP compatible SpeedTree8 shader is used. Models are left in the same way without LOD Group components in order to use camera facing billboards. Here is the result:

    URPConverted.png

    As we can see, distant trees are rendered in billboards but they are more transparent comparing to Soft Occlusion shader ones. As a result, the forest appears more like it would have dead trees. Performance is still very solid, running at 200 FPS. The drop from 300 FPS might be understandable as SpeedTree8 shader is more advanced than Soft Occlusion and may require more GPU power. When generating terrain, this causes console warning to be printed that Soft Occlusion shader must be used as otherwise billboarding/lighting will not work correctly. This is basically what we see in the picture above. This scene was made as a possible workaround solution in URP in order to be able to render large scale forests. But console warnings and too transparent billboards show that there are issues.

    U_CB_ST8 Scene

    This scene is set in a similar way like BuildInST Scene in the first project except that URP SpeedTree8 materials are used instead. Due to the usage of cross-plane billboards instead of camera facing billboards, we have again catastrophic performance drop down to 1.8 FPS.

    Conclusions

    Camera facing tree billboards are currently the only way to render large scale forests in Unity. The technique is capable to handle millions of tree instances. However, it is currently not supported in the new Universal Render Pipeline which is a candidate to replace Build-In render pipeline in more distant future. Several years ago, a different way was introduced to render several hundreds of trees in smaller scenes using two cross intersecting plane billboards. This is currently the default way to use trees in the URP using SpeedTree.

    Demos were made to show that cross-place billboards can't fully replace many years existing camera facing billboards. If scenes are small, containing several hundreds of trees, cross-fading billboards can be a good choice. However, large scale forests containing millions of trees requires the old camera facing billboards.

    As a result, it would be nice if camera facing billboards would be ported to URP at some time in the future. This would enable us to continue having large scale forests in our games using URP in the future.
     
    Last edited: Jul 10, 2020
  12. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Billboards render correctly in URP as all Unlit shaders work in URP! It would be quite simple to make a replacement Soft Occlusion shader using Shader graph in URP I believe.

    It would be worth testing out the SpeedTree7 Shaders in URP also as they could be more performant?

    Thanks for looking into this!
     
  13. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
  14. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    So, just added SpeedTree7 scenes in both projects (Build-In and Universal render pipelines). Also added several other missing scenes. Repo now contains all possible combinations to compare Soft Occlusion, ST7 and ST8 shaders for camera facing and cross-plane billboards. There are 12 scenes in total, 6 for Build-In RP and another 6 for URP. I also made more consistent naming for scenes, prefab and material folders in projects as well as updated the first post describing details. Here are shortcuts I am using: B - Build-In render pipeline, U - Universal render pipeline, FB - camera facing billboards, CB - cross-plane billboards, SO - soft occlusion shader, ST7 - SpeedTree 7 shader, ST8 - SpeedTree 8 shader.

    Interestingly ST7 trees appears to be completely black in both Build-In and URP scenes. Here is how it looks for Build-in render pipeline (B_CB_ST7 scene):
    B_CB_ST7.png
    and for URP (U_CB_ST7 scene):
    U_CB_ST7.png
    Not sure if trees are black because of shader issues or because I used BOTD trees here. Also noticed that in material inspector colors for bark and leaves looks fine in both Build-In and URP. But interestingly even in inspector for leaves material gaps between leaves does not become transparent for ST7.

    That's great, maybe we will get more fixes for trees soon...

    This thing probably looks most interesting. I looked a bit in SO build-in shaders yesterday but didn't finished yet. Might be keen how complex it would be to upgrade to URP. Camera facing billboards seems to be quite picky (i.e. B_FB_ST8 does not show camera facing billboards at all!), so not sure if Shader Graph would work so well with them, or it would be just simpler to copy shaders from Build-In pipeline and update what's needed in shader files.

    One way or another, it would be nice if Unity would update at least one tree shader for URP which would work for camera facing billboards by default (either SO, ST7 or ST8).
     
    URPian likes this.
  15. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    @chanfort they should render just fine in built in and UniversalRP however there are issues specifically in UniversalRP with terrain painted Speedtree7/8 trees using the terrain tree light probes it generates automatically which turns mine black too.

    Thanks for looking into this, Book of the dead trees actually may be the problem right - I would advise to use these, they are SpeedTree7 by default and free - https://assetstore.unity.com/packages/3d/vegetation/speedtree/free-speedtrees-package-29170

    Did they look fine as prefabs?

    It's really worth sending the project in as a bug report if you haven't already, sounds very tidy and QA will very quickly be able to verify the issue when it's shown clearly the way you have shown it!
     
    URPian likes this.
  16. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Just looked into default SpeedTree models, they work fine. So it's probably issues with BOTD trees. Here is how the scene looks like:
    ST7_Free_CB.png
    However, it runs with only 8 FPS. Changing to camera facing billboards, performance increases to 900 FPS (here are 100k models at the moment):
    ST7_Free_FB.png
    But the issue seems to be that only trunks are visible in billboard phase and no leaves. So camera facing billboards are somehow working in a weird way. It looks like they are not recognizing partially transparent leaves materials. I won't commit these default SpeedTree cases to GitHub since it's quite easy to check.

    I also submitted a bug report (Case 1227083). So will be looking forward to hear back how it goes...
     
    ROBYER1 likes this.
  17. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Thanks so much for verifying, BOTD assets are from a separate 'branch' of what was LWRP anyway so I'd stick to regular assets anyway!

    Did you notice in URP that the dark sides of the speedtrees are a lot darker than normal?
     
  18. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Yes, noticed that speedtrees are darker in URP. I also noticed that terrain is slightly darker as well, i.e. it's possible to see in earlier post pictures where are build-in scenes shown. Terrain in these scenes pas using Nature/Terrain/Standard shader and now in URP it looks more like Nature/Terrain/Diffuse one. It might be something similar happening with speedtrees as well.


    Were BOTD from LWRP at some time? I thought they were always in HDRP...
     
  19. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    I believe there are issues with the main directional light shadow cascade that renders even if you have shadows disabled (realtime shadows at least).
    There was some kind of fix for it here but I haven't got round to trying this branch of the SRP repo.
    https://github.com/Unity-Technologi...mmit/8f9ef5ada3f3025ea9ac26eb5979c0ee3acac946

    Apologies on the BOTD, it was an early version of HDRP, guess it is all SRP anyway :) Thanks again for the tests and let me know if you hear anything back!
     
    chanfort likes this.
  20. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Any update on Case 1227083?
     
  21. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Testers asked a couple of days ago to send reduced project. So I send and they confirmed that they received the project. Now waiting for the next steps.
     
  22. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Also for clarification, I found that terrain painted trees should receive light probes generated per tree (i believe)

    Light probes for trees do not seem to be working for the URP Speedtree shaders, they work on URP Lit shaders etc and were working perfectly fine before on built-in renderer with speedtree shaders before.

    From here: https://docs.unity3d.com/2020.1/Documentation/Manual/terrain-OtherSettings.html
     
    chanfort likes this.
  23. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    So the QA team managed to replicate the issue which is now on Issue Tracker. Feel free to cast votes :)
     
  24. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    I would think the cross-billboard technique could be optimized. Maybe add a few verts to the planes where there is empty space to reduce overdraw. I would probably stick with a basic masked shader for that as well, or even an opaque one. Have you checked the profiler to determine what the bottleneck is?
     
  25. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    It is unlikely to be optimized to the level which camera facing billboards provide. It may bring numbers to tens of thousands at best but I would ever doubt that it could bring millions. No, didn't checked but I guess bottleneck might be likely due to game objects, nested children and inefficient LODGroup component. I think only Megacity demo has reached comparable counts to billboarding renderer.
     
    ROBYER1 likes this.
  26. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Just did a quick profiler test on the simplest case where cross-billboards are used with the same SO shader as in camera facing billboards in built-in render pipeline. Seems to be most of bottleneck in Camera.Render. P.s. Needed to reduce tree count 10x in order to even run profiler :)

    Screenshot 2020-06-27 at 10.32.51.png
     
  27. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    Yeah that's likely because of all the draw calls. You definitely want to have instancing enabled when drawing this many objects. You said it didn't help much, but it should change where the bottleneck is. I'm guessing culling, but I don't know how the terrain tree system does that. If thats the case, one thing you could try is putting the trees as detail objects instead of as trees. I think lod and culling might be calculated differently for those.
     
  28. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    So for SO shader there are no instancing. So instead I checked for ST7 one. And the bottleneck still points to Drawing first and then to culling even we can see that number in "Saved by batching" in statistics popup is over 500k. Also enabled terrain.drawInstanced but doesn't change the result. Camera facing billboards does not use culling so no need to handle that :) Screenshot 2020-06-29 at 10.52.00.png
     
    jRocket likes this.
  29. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
  30. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    That's good news. I guess tree billboards issue might be looked later as well :)

    No, I didn't compared much of performance differences between various shaders. I thing at the moment that usage of game objects, LOD groups and mesh renderers per tree instance might have overwhelming differences from shaders by several orders of magnitude. :)
     
    ROBYER1 likes this.
  31. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Is there any way we can escalate the billboard issue you had? In my project using URP Preview version 9.0.0 preview.35 with Unity 2020.1.0b14 using Speedtree7 shaders the billboards are working perfectly? See in the link below

    https://imgur.com/VWfbGU6

     
    Last edited: Jul 8, 2020
    chanfort likes this.
  32. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Are these ST7 models together with ST7 shaders? If that's the case then it should be fine. When I was trying I was using BOTD models with ST7 shaders. In such case they were black.
     
  33. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Ah yeah was using ST7 models with ST7 shaders. i don't believe you can use BOTD models for anything commercial anyway, they will soon be lost and forgotten I'm sure.
     
  34. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Hmm, that's interesting one, I though BOTD trees are under Unity Companion License so could be used in games :)

    But in terms of ST7 shader the point is not about BOTD but that it might be not possible to use on any custom tree models (i.e. the ones made with Blender Sapling tool, etc.) so seems to be specific to ST7 models only.
     
    ROBYER1 likes this.
  35. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Hey there,

    We are still investigating to see what it would take to support TreeCreator. Meanwhile it's true that SpeedTree doesn't perform as well in terms of rendering a massive amount of them. We'll continue to improve the performance of SpeedTree billboards.

    I'm attaching a workaround version of the Soft Occlusion shaders to be rendered in URP.

    A little information of the workaround:
    • URP actually still renders passes without lighting. That's why the TreeCreator imposters were rendering. The workaround turned off lighting by deleting the line "Lighting On".
    • When lighting is off, the trees are simply lit from _TerrainTreeLightDirections and _TerrainTreeLightColors, which is filled by the Terrain system internally.
    • The Terrain system only selects directional lights. Therefore the mesh trees will not be affected by point lights or spot lights. But at least it's consistent with the imposters.
    • I didn't test much of the result, but noticed the lighting color is a bit off. You probably need to have a better lighting system implemented to replace the builtin one in both the imposter and the mesh shaders tailored to your game's needs.
     

    Attached Files:

  36. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Hi there, thanks for taking a look into that. Very glad to see things started to move here. I will check that zip file what is there.

    Just one notice these camera facing billboards are not exactly just for tree creator. When I was trying to make a tree with tree creator it uses these shaders:

    "Nature/Tree Creator Bark"
    "Nature/Tree Creator Leaves"
    "Nature/Tree Creator Leaves Fast"

    However, Soft Occlusion shaders are different, I believe they were released for general purpose not just for tree creator but also for using trees modelled by any 3D modelling software, i.e. Blender. These are:

    "Nature/Tree Soft Occlusion Bark"
    "Nature/Tree Soft Occlusion Leaves"

    I also noticed that if I use Tree Creator shaders for Blender modelled trees I am getting this warning:
    "The tree MyTree must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly."

    So in summary Soft Occlusion shaders seems to be for general purpose while Tree Creator shaders just for tree creator modelled trees.

    Feel free to use my examples if you are planning in the future to improve SpeedTree performance to be on the similar order like billboards based trees. I have covered most cross-cases for SO, ST7 and ST8 shaders for Build-in and URP in this repo:
    https://github.com/chanfort/Tree-billboards-stress-test
     
    sirleto likes this.
  37. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Yes you are right the billboards are used generally for any tree prefab that doesn't come with a LODGroup. We'll take this into account for future improvement. Thank you very much for the info and the example repo you set up. Much appreciated!
     
    ROBYER1 and chanfort like this.
  38. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Thanks for taking a look into this issue. I just checked these shaders and it looks quite a big improvement already over what it was before. It's quite nice to see that colors between billboard and mesh modes are consistent. Also nice that trees in mesh mode are swinging in just like they do in built in pipeline. It's also exciting to see that it does not generate these warnings which are generated when selecting different shaders.

    Lighting seems to be working quite well, I just checked it seems like it reacts properly to directional light. I missed a bit fog. But I also see that fog does not apply to terrain when the checkbox is ticked in Lighting Settings. So I assume that it's alright at this stage. Another small thing I noticed is that nearby trees in mesh mode while using Soft Occlusion URP shaders does not cast shadows. But I don't see shadows for regular objects as well so I guess it's alright for trees :)
     
  39. Nefron

    Nefron

    Joined:
    Jun 21, 2013
    Posts:
    6
    Zeroyao, thanks a ton for these fixed shaders! I'm already multiple months into a URP project and realizing tree billboards don't work in URP was a shock.
    Any indication when these will be brought to URP by default?
     
    jukibom, chanfort and ROBYER1 like this.
  40. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Yeah, I am also keen about this, i.e. when cginlude's and shaders will be included into Unity engine's / URP package's code. It's only 2 days left since it will be one year since the bug was submitted :) .
     
  41. tejmayankpatel

    tejmayankpatel

    Joined:
    Dec 9, 2020
    Posts:
    2
    8 years later and STILL you have to change the shader to SpeedTree8 in URP for it to render correctly!
     
    Jacal and ROBYER1 like this.
  42. Gabo_campitelli

    Gabo_campitelli

    Joined:
    Oct 17, 2012
    Posts:
    426
    Bump... what's up with trees billboarding in URP
     
    chanfort and Jacal like this.
  43. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    The bug report still says "By Design" :(. Let's keep voting on the bug report to bring more attention...
     
    Jacal and Gabo_campitelli like this.
  44. Gabo_campitelli

    Gabo_campitelli

    Joined:
    Oct 17, 2012
    Posts:
    426
    No more voting allowed. this is the resolution text:


    RESOLUTION NOTE:

    Legacy tree creator trees are not supposed to be rendered in URP, thus the pink shader. The billboard actually shouldn't render either, but it just does by accident. There's a workaround posted that works for 2020.1 and URP 7.0.0: https://forum.unity.com/threads/cas...-occlusion-shader-in-urp.825825/#post-6220065

    Update - URP support for Tree Creator is being considered for a future release.

    I hope they really take it into consideration soon. I develop flight simulators and i am so pleased with URP performance, but equally downer is the fact to lose tree billboarding performance :(
     
    Ruslank100 and Jacal like this.
  45. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Ah, I see. I always thought that voting is always alowed, even after resolution. Let's hope then that Unity will fix it at some point...
     
    Jacal likes this.
  46. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Still no tree creator rendering in URP? Some of us hate Slowtree, I mean, Speedtree. The tree creator is orders of magnitude faster in built-in for mobile and looked just fine, and we want to keep using it for URP.

    I'm worried that "URP support for Tree Creator is being considered for a future release." means 2023. We need this as of 2 years ago already!
     
    Last edited: Apr 11, 2022
    Randallhbarber, chanfort and BroVodo like this.
  47. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    No updates on tree creator for URP yet?
     
    chanfort likes this.
  48. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    If you're waiting for Unity to get something done, you'll probably be waiting a while.

    Have you considered not using URP? Built-in works fine, is stable, has lots of plugin assets, and has Tree Creator.
     
  49. Gabo_campitelli

    Gabo_campitelli

    Joined:
    Oct 17, 2012
    Posts:
    426
    URP performs great on all platforms and to me it has better rendering than standard. If we choose to use a render pipe line, we expect to work as well. Or at least let us know if we are waiting on the nothing. (to me others available tree systems are not suitable)

    Even with standard graphics tree billbords have flaws. It's like Unity doesn't care about impostors in general.
    Why can't we just have an impostor component for all porpuses. that generates the sprites and a billboard material that acutally can work with animations and lighting correctly. Terrain trees included.


    Also now that i'm here. I had to release a URP sim wich had a terrain imported with the billboard trees showing. So to avoid the pink material i have set the billboard distance to 0 from script at runtime so at least you avoid seeing the glitched 3d model. At least something.
     
  50. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    If they did that, then they wouldn't generate any additional revenue from people buying an impostor solution in the Asset Store.
     
    sirleto likes this.