SpeedTree shader broken ?

Hi,

Possibly not the right place as this is a broader unity issue, so apologies in advance if that’s the case.

Either the SpeedTree shader is broken, or something has changed and I am now doing something wrong. The issue is the way that sun shines through leaves. I never noticed this issue until later 5.3.x releases but also didn’t use earlier 5.3.x releases.

The following images were generated with Gaia 1.5.3, using exact same assets and lighting setup on the same machine across 5.1.0f3, 5.3.4p2, 5.4.0b15. They were all generated on Windows 10, DX11, Linear Deferred, Realtime GI.

First Unity 5.1.0f3 - All good - and probably 5.2 as well, but no longer have that version installed.

Next 5.3.4p2. broken - and imho unusable in a game.

Unity 5.4.0b15 - Still broken - this time with no image FX - which tend to mask the issue.

This leaves Unity without a viable tree system IMHO. Fyi @Dannyoakes

Cheers,
Adam.

Sorry, could you please elaborate on what exactly is broken about this, for the pixel-sensitivity-impaired amongst us?

The way the light shines through the leaves, and also on the edges of the leaves is messed up. Sorry for the lack of correct language, i am somewhat pixel impaired as well.

2606092--182642--2016-04-22_22-14-00.jpg
Good.

2606092--182643--2016-04-22_22-14-24.jpg

Not so good.

2606092--182644--2016-04-22_22-22-29.jpg

Looking great…

2606092--182645--2016-04-22_22-22-17.jpg

But walk under the tree and look towards the light…

I always wondered why my Speedtree assets looked so “meh”. I have this exact same issue with the shading on leaves looking really off and rough.

Some more testing - this will only ever happen with linear + deferred.

1 Like

Yeah, we’ve been talking to the Unity team about this issue. I think it’s related to the lighting changes in 5.3, but they’re working on tracking down the issue.

Yes same thing and I’m using linear + deferred too

The same :frowning: Deferred -Linear .

I am noticing a similar problem, Does anybody know when were going to get some good Speed Tree fixes?

I don’t know but I will celebrate the day when this happens because for a headline Unity 5 feature I really don’t think it’s received enough love from Unity.

5 Likes
  • one for the fix , SpeedTree is realy awsome , but needs better shaders in Unity . Displacement , transmission , more detail maps etc :slight_smile:

On that note I’d suggest that I don’t expect everything to be perfect because I assume that certain limitations are down to the textures SpeedTree provide - Unity can make their shader work better but they can’t, for example, add full PBR if the required info to make PBR work isn’t supplied via textures in SpeedTree for Unity products.

I will celebrate too haha! I also think they really need to make optimized versions of the Speed Tree shaders, since mobile is such a big part of Unity, it seems strange to have such a broken yet built in feature to Unity, it can barely perform well enough on desktop let alone mobile… But, the best would be if they could just fix what they already have, because its currently unusable in 5.4, I would love an ETA, for the fixes from somebody from the Unity staff.

I think that it would be great if the SpeedTree shader would be somehow based on Unity standard PBR shader but still with SpeedTree wind and SpeedTree maps support so it would work with the maps that are exported from SpeedTree modeler (base color, normal, specular) out of the box.

I think that these things are basic stuff that is still missing from the SpeedTree shader. Without them it will be hard to match shading quality of Unity Standard Shader. It’s not related only to 5.4 beta but generally to SpeedTree shader in Unity.

  1. SpeedTree shader is not affected by reflection probes.

  2. There is no input for specular map that SpeedTree generates. Only ‘Base’ (color and transparency) and Normal maps are used. (I’m not sure that SpeedTree specular maps are matching Standard Shader setup so SpeedTree shader would probably need appropriate changes for it).

  3. There is a ‘shiness’ slider in the shader inspector for leaves and fronds but looks like it’s not working at all.

  4. Same for ‘specular color’.

There are more advanced and additional features like subsurface scattering that would be great in the future but I think that we need basic features like the ones mentioned above and bugfixes (like the one that was reported by @AdamGoodrich here).

@sqallpl
5. Vertex AO is not being gamma-corrected, and is being applied to all lighting rather than just the ambient lighting.

We ran into all these problems when making the Alloy SpeedTree shader. It’s kinda embarrassing how broken and unusable the official Unity SpeedTree shader is. The worst part is that it would take a negligible amount of time and effort to fix it.

8 Likes

Adding GPU instancing to my wish list :slight_smile:

Before I plop down any of my money on SpeedTrees, I really am going to need to see some attention given to the issues mentioned above.

So I’ve figured out the problem. It’s that SpeedTree leaves are rendered with face culling off, so it just has the same lighting on both sides of the leaf. The way to fix this is to use the VFACE semantic to invert the normals on backfaces. Sadly, Unity’s surface shader framework doesn’t support that feature.

2 Likes

it does :slight_smile:

@larsbertram1
Oh? Do you have a working example within a surface shader? I’ve only been able to get it to work with raw vertex and fragment shaders.