Uh, so the Tree Editor is about to be legacy now or what? This means one can’t create trees in Unity with built in tools if using URP or HDRP.
I certainly hope not. Speed Tree is asking for a subscription model for indie projects. Any indie project. I may just buy a few trees on the asset store, because for a little arcade style game, this is not especially feasible. I mean there are other options out there and I don’t even know if I’m going to make a profit on this one, I kind of doubt it.
I have found that switching the shader to URP>Lit seems to be stable and is not auto-replaced by the editor. That’s what I’m going with for now. It seems to even work after a compile, but note that Unity trees attempts to replace it sometimes when it’s selected. Honestly, I’m not one to huff and puff, but that’s just bad design; I should at least know why a clearly compatible material is being opted out of.
Anyone have any luck just using the details for trees? I’ve gotten them to work well enough. I don’t entirely understand the difference between the two, save that trees seem to allow for physics interactions.
You can try using the shaders and fix in this thread: (Case 1227083) Tree Nature/Soft Occlusion shader in URP
https://forum.unity.com/attachments/treecreator-zip.683934/
- Shaders go in asset folder
- Other file goes in the CGIncludes folder in the editor (remember to paste it in there every time you install a new editor)
NOTE: the editor folder is not in the game project, you need to find the editor in explorer and paste it in that way
I saw that SpeedTree was actually free in the past XD https://assetstore.unity.com/packages/3d/vegetation/speedtree/free-speedtrees-package-29170
Yeah that works. But I hope they will put it in the latest Unity version if they haven’t already. The latest LTS version however, sadly does not have it. Anyway, I’m leaving a reminder to myself and others here
See below.
To upgrade the shaders on tree prefabs (after implementing the workaround which MichaelEGA had mentioned):
- Click on the Tree Root Node in the Tree component (this is necessary to edit the materials or you’ll get a blank inspector page when you click on the nested materials).
- Upgrade the shaders of the bark and leaf materials that suddenly pop up at the bottom of the inspector.
“Hidden/Nature/Tree Creator Bark Optimized” should become “Nature/Tree Soft Occlusion Bark URP”.
“Hidden/Nature/Tree Creator Leaves Optimized” should become “Nature/Tree Soft Occlusion Leaves URP”. - Remove the Tree component, because it has now become unusable. You’ll get errors if you keep it and it will reset the shaders if you click on the Tree Root Node (making the model pink again).
EDIT: the lighting in URP is quite different, making the trees and everything else look nothing like the original… I couldn’t even get it to look as good as it did before o.o what have they done to the directional light or whatever is causing this… and I also used bloom from the standard assets (incompatible with URP) so now instead the one integrated in URP, with the same values as the one from the standard assets… I also tried other values on both components but it just cannot look the same anymore :c disappointing
This is a ridiculous problem. The workarounds are time wasters. If Unity wants to promote URP AND continue selling the supposedly convertible SRP assets on the store, they need to add the tree nature soft occlusion shader as an option under URP material shaders in the editor.
It’s crazy that this has been overlooked for so long. I would purchase an asset that has the proper trees for my project, but I don’t trust creators I have never purchased from before to have dealt with this issue. BSP has included a URP installer with their tree packages, and I will continue to purchase from them, but I have a couple of other tree packages that are simply unusable in URP right now.
This. It is quite essential.
I know this is old but for people who wants urp tree creator its pretty easy to do
Use below shader files In you project.
Supports terrain wind and most of what builtin dose
TreeCreatorUrp.unitypackage (12.8 KB)
preview
I tried to get this to work, it worked briefly, then I got this error:
A BatchDrawCommand is using a pass from the shader “Hidden/Nature/Tree Creator Bark Optimized” that is not SRP Batcher compatible. Reason: “UnityPerMaterial CBuffer inconsistent size inside a SubShader” (ShadowCaster)
This is not supported when rendering with a BatchRendererGroup (or Entities Graphics). MaterialID: 4 (“redwood_bark”), MeshID: 1 (“lbw_80m_l2”), BatchID: 3.
Any thoughts?
this is the way tree creator trees and wind work: wind usually is added per instance.
the tree creator shaders should not be compatible with the SRP batcher by default at all.
if you want this you will have to tweak the wind calculations. you will loose support for radial wind zones by stilll may get some nice directional wind.you will have to pass it by script as globals.
Cool, I really just want the tree creator shader for turning distant trees into billboards, and for improving the lighting on the leaves, I don’t need the wind. I’m good with C# but not shader code. How would I remove the wind from the hlsl?
oh, you will have to go through all the include files…
I did notice my shared version works with certain urp settings. But I just wanted to share the code so people can use it to make better version of it or YouTube video.
I will be sharing this shader on my GitHub repo after fixing these errors.
I been busy with making a game I didn’t notice the messages on this thread
Hi @A_Shuhair ! Did you manage to update these shaders of yours?
