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.
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.
Good.
Not so good.
Looking great…
But walk under the tree and look towards the light…
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.
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.
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.
SpeedTree shader is not affected by reflection probes.
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).
There is a ‘shiness’ slider in the shader inspector for leaves and fronds but looks like it’s not working at all.
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.
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.