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

Speedtree broken...

Discussion in 'Unity 5 Pre-order Beta' started by netvortex_dc, Dec 29, 2014.

  1. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    Hello,
    i purchased a SpeedTree Sub and a few models to evaluate the new SpeedTree Trees. Unfortunately i came across a few issues that renders the new trees currently useless for my needs.

    - Smooth LOD Function actually breaks Batching, causing a high amount of drawcalls. Without it the effect of trees popping in is quite ugly.
    - The SpeedTree Billboard seems to be broken as well, causes some weird artifacts. (See screenshot below)
    - AO doesn't appear to be working correctly. I have black spots on the tree but it's not smooth at all. (See screenshot below, close-range trees have dark spots all over.)
    - SpeedTree gras needs to be added as actual trees, you cannot gain a decent density this way.



    So compared to the U4 Tree/Gras System this is currently unusable.
     
  2. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Hi,

    Smooth LOD does actually break batching for the moment due to Unity 5 being lack of hardware instancing. For mesh LODs usually this is not a problem since SpeedTree meshes are usually big thus cannot be batched with Unity dynamic batching. For billboards if you prefer you can narrow down the cross fading zone width or even set it to zero. The artifacts you are pointing at in your screenshots are actually the built-in dithering effect (between mesh LODs and billboard LOD). Turning it off improves batching on billboards.

    For the AO issue, what kind of "black spots" are they? Could you file us a bug with the screenshots? (Or if you are talking about the same dithering artifacts like those on the billboards?)

    For grasses again due to the lack of hardware instancing it's not practical to treat SpeedTree assets as grasses and paint them a lot on the terrain. I believe we'll do something about instancing during 5.X...
     
  3. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    regarding AO - the speedtree modeler allows you to bake AO into the tree. I think they have AO baked onto them by default. However, depending on your game, and your render settings, graphics etc, you might not want this AO.

    I already suggested to SpeedTree that the AO could be controlled by a shader parameter, like a simple normalized float or something. but I got a dismissive response from the speedtree guys.

    I have not had much luck talking with the speedtree people, there's a lot of finger-pointing and they claim many of the issues are on Unity's end. (lack of top-down billboards, etc).

    Another huge issue is the speedtrees are not using PBR, they are going to stick out like a sore thumb. And of course the horrible terrain system isn't helping.

    but yeah, I hope they get the speedtree stuff figured out because I've purchased some as well, and for most purposes they're unusable.
     
  4. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    I'm not sure what can be gained from making AO controllable by a shader parameter at runtime. Can AO intensity be set inside SpeedTree Modeler?

    And, to be honest, it's true that runtime features are mostly done on Unity's end. Top-down billboards is among them. It's on the very top of our roadmap for 5.X SpeedTree improvements. That said I'm sorry they probably won't be in the 5.0 initial launch.
     
    Teila likes this.
  5. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    I also find the lack of SpeedTree PBR an annoyance. Is there any plan on changing this, or do I have to talk to the SpeedTree guys for that?
     
    p87 likes this.
  6. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    The AO is baked into the trees in the speedtree modeler. It has options including intensity.

    Being able to change it would be nice. Let's say you have SSAO as an option in your game, that you can turn on/off. If you're using SSAO then you probably wouldn't need to use the speedtree's baked AO.

    I've just noticed that the AO baked into the trees isn't always ideal. It sucks that it's baked onto the tree and there's no way to adjust it. Especially considering you need a SpeedTree modeler subscription to edit the trees. If you don't have a modeler subscription, and you buy some SpeedTrees off the store, there's no way for you to adjust the AO that comes pre-baked into the trees..

    Good luck, I already asked them... they haven't been very helpful from my experience. It does not sound like they are going to offer PBR materials with their trees - they have diffuse, normals, and opacity maps I think. You could use something like Bitmap2Material3 to generate PBR maps, but...

    The second issue is the SpeedTree shaders themselves are not PBR. I asked the guys at speedtree about this, once again were not very helpful. They basically told me "you can render the trees however you want", and told me to edit the shaders.
     
    Last edited: Dec 31, 2014
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah we need trees to have a pbs shader solution. Hop to it everyone, chop chop. Can't be doing things by halves now!
     
    p87 likes this.
  8. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Yes and proper terrain shaders, gosh :p
     
    TheSniperFan and p87 like this.
  9. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    - Drawcall reduction is broken.
    - Smooth LoD is broken.
    - SpeedTree Gras is broken.
    - Billboards (Top-Down) are broken.
    - Billboards alpha smooth is broken.

    Please guys, SpeedTree adds real beauty to U5, give it some higher priority!
     
  10. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    The subscription is dirt cheap and you can cancel anytime, so just pay for one month with the modeller.
     
  11. Killerwhale

    Killerwhale

    Joined:
    Aug 21, 2014
    Posts:
    93
    Not all this stuff is that bad:
    - Smooth LoD using dithering to show. Working ok for me
    - SpeedTree grass is the same like any geometry grass. Never works good ;) But it typically used only in small amount.
    - Billboards (Top-Down) probably not present in any of SpeedTree enabled system by default (due to speedtree engine)
    - Billboard alpha smooth - what is it?
    About AO and PBR - AO is very simple to fix in the shaders. PBR - not so simple, but possible. Already added SkyShop integration to SpeedTree. But a lot of issues with legacy deferred path.
    For me, real issues - no specular, no roughness, no room to insert your own texcoords :(
    So it actually works, but need a lot of careful tweaks.
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Why no hardware instancing?? it could be use on another rendering
     
  13. danugz

    danugz

    Joined:
    Jan 24, 2014
    Posts:
    17
    just joining the bandwagon here. Im a 3d artist, not as technical as most of the people here. I have the speedtree subscription and havent been able to get the trees to play nice in U5. I would love to see someones trees if they got decent results. Nothing looks as good as it does in the SpeedTree modeler compared to what I end up with in unity. Atleast not for me.
     
  14. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    Speedtree could be useful to me if it gets PBR for at least the bark shader and more compatibility fixes with Unity 5. But if not I'd probably just make and animate my own trees with my own LOD and shaders and have much better control over it. Only downside to that is it's a bit of a time waste though, so I guess I'd prefer more ST updates.
     
  15. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Agreed with all the points raised in here. At least if PBR inst setup for trees, why isn't the default speedtree shader including specular? Have any of you guys actually gotten it to work? The trees Im creating in modeler ( and the ones bought from their store) include specular maps, exported into Unity, and while the shader shows a specular color swatch and a shininess slider, it does nothing at all, and there's nowhere to actually plug the map into it. Speedtree was supposed to be an amazing addition to Unity5, but it's definitely not where it should be ( and apparently won't be, considering they do not really answer any questions and point fingers at Unity according to one poster above me.)

    @zeroyao, I can't seem to find a way to look at Unity 5's road-map, I understand why it is not readily available information, but what improvements for Speedtree will there actually be during the 5.x development? Speedtree in Unity 5 was a major reason that my team decided to make the jump to the betas of 5, and if it remains as it currently is, it's going to be very disappointing - I'll still use the trees made in Modeler as fbxs and set them up in Unity 5 and do a custom vertex wind shader, but that will be a pain. Honestly, when I'm being advertised Speedtree in Unity5 and I get a half baked implementation of what speedtree is, it's not a good feeling. I understand things are in beta and will hopefully change in upcoming releases, but not knowing where , how or when this will get there is frustrating.

    TL,DR: Unity dev team, what are the plans for speedtree in UE5?
     
    Last edited: Jan 31, 2015
  16. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    I'd also like to see better support for SpeedTree. I have a specific question about the current implementation though. This is from the release notes...
    • SpeedTree: Disabled static batching for trees.
    Why can't SpeedTrees be static batched?
     
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Last time i remember is it caused by smooth LOD fading from speedtree.
     
  18. Killerwhale

    Killerwhale

    Joined:
    Aug 21, 2014
    Posts:
    93
    As far as I could check the SpeedTree batching was ALWAYS on (project batching settings was just ignored). It's disabled for particular trees only if tree have dynamic shadow (depends on distance and quality settings) or during lod fading stage. Trying to disable it on shader level cause disable render of trees. But this behavior already documented, send as error and fixed by U5 team. Will wait for a next build.
     
  19. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Smooth LOD fading only disables dynamic batching, and I have that turned off. I'd like to static batch all meshes on every LOD (those that satisfy standard batching criteria at least).
    In all my tests none of the tree meshes have ever been static batched (you can use the new frame debugger to check). The billboards are dynamically batched if smooth LOD is off, but I want more than just the billboards.

    I think I may have discovered why it's disabled though. The wind animation uses the local pivot of the mesh to offset the 'phase' of the animation (as shown here). Batching would lose the local pivots of each mesh and break that. Hue variation also requires use of the local pivot, so that would break too.

    Nevertheless I'd still like the option to static batch trees if I don't want those two things. Maybe have it as an option in the import settings window?
     
  20. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Static batching is disabled because the vertex program of the speedtree needs to know the vertex position in model space (the smooth LOD and the wind animation).

    SpeedTree will of course have more improvements during the 5.x cycle. One feature that is already on its way to 5.1 is the animated cross fade, with which the cross-fading effect between the mesh and billboard will be animated so that you'll see less dithering in general. Standard shader is also a top priority but considering the Modeler currently don't generate smoothness map you probably have to author your own PBR textures. Among them hardware instancing in my mind is the most important one but I really can't make any promise on it. Let's just see what will come up.

    Cheers,
     
  21. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    With the changes you applied in Beta 22 i get 120 FPS with RTP + 50.000 SpeedTrees on a 8000x8000 Terrain. Smooth LOD is still disabled but now this is very usable! Good job and thank you for reacting so quickly!
     
  22. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Sorry, as long as there are no Top-Down-Billboards speedtree is an absolute NoGo to me.....
     
  23. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    I guess for Top-Down Games this is very important, but there really is a decent improvement for SpeedTree now in b22.
     
  24. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Top down is also handy if you're on a mountain looking down at a forest. Pretty important stuff.
     
  25. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079


    I just bought Speedtree's $150 pack yesterday and am having similar problems. Everything is really amazing looking and high performance until that dithering is going on. It's most noticeable when turning quality to "fastest" like shown here. (This isn't a setting I'll actually use in the game, it's just to illustrate how nasty it can get. It's not normally anywhere near this bad.) Is there a way to turn off the dithering or something like that?

    Is it supposed to be doing that only when the billboard is fully visible in an effort to blend between the billboard and the 3D model? If so, it looks to me like it's just rendering every four or five pixels even when it's supposed to be a billboard (see far away trees near screen center). Granted, I'm probably oversimplifying things substantially in my ignorance, but it looks a little goofy either way.

    I'd rather have tree billboards popping in and out than this, or even being rendered all the time in my scenes. With the Oculus Rift there's already some screen door effect from the pixel sizes which just seems to magnify all this, then in the reflections off the water which are lower res it gets magnified again.

    Any suggestions?
     
  26. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Yikes that looks bad. Why would it use dithering like that?
     
  27. Killerwhale

    Killerwhale

    Joined:
    Aug 21, 2014
    Posts:
    93
    Dithering is a strange thing. It used not only for billboard transitions, but also to transit between LODs. You can adjust the percentage of crossfading in the settings of imported speedtree model. If you desperately want to get rid of dithering - PM me, an I will send a modified speedtree shaders without dithering. The bad appearance on the screenshot is probably because of "fastest" quality change the LOD percentage in the LOD group settings.
     
  28. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Thanks, that's kind of you. Yes, I'd like to try it at least. Will PM.

    The little dots are still visible on the trees farthest away regardless of the quality settings, there's just less of it. What I don't get is why it's happening at all in the screen shot I posted. I'd think all those trees in the middle should just be billboards because they're so far away. Maybe it's dithering in from fully culled to bill boarded, then dithering back out of that to the 3D models when you get closer? I don't really know how it works, just guessing the best I can.
     
  29. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    You can just uncheck the smooth LOD checkbox on the speedtree model.