Hey there!
So I asked about this over on the Speedtree forums, and that was really helpful, although I'd still like some more advice in general on this!
So now I'm here asking you amazing folks about leaf normals, and how to get em right, and basically how to know how to adjust them per tree.
Basically, here is a screenshot of my trees in UE4. Not pretty. I I actually think they're good looking trees and materials, they just light like arse!
Here are those two trees in the modeller:
Not too bad right? I mean I think they need some tweaking in terms of knocking back the leaf cards density, letting some more space in the actual texture, and that would certainly help with the lighting (but then again, the amount of space in the texture looks right in UE4), but, the problem is that they just don't light uniformly! I've used leaf cross meshes, just two leaf generators rotated at different angles to form an x. Pretty common with game foliage! But the at intersection of the cards I get this just weird shadow, the underside lights totally wrong, and rather than creating the illusion of that sort of 'spherical cluster' you just get what I've got in the above shot!
I've messed with all kinds of normal settings and I can't seem to get it right!
Here's a close up of that awful lighting:
The underside lights differently to the front side. Looks very bad at the intersection
So then I went into 3DS MAX to create a custon cross mesh, where I edited the normals to fix this issue. Here is the result:
But that did nothing to help. So now I'm at a loss as to what to do! I've tried like everything I can think of! I've seen this cross leaf used so many times, and usually they light nice and consistently and don't have this issue.
Hopefully someone here can lend me some of their expertise on the subject! Thanks in advance
Edit: It seems using more deformed planes fixes most issues. Although that makes the poly-count go crazy... And this above issue still persists just less noticeably.
Replies
In Unreal when you import, make sure that the Normal Import Method is set to "Import Normals and tangents". I think it defaults to "compute normals" which will reset any custom normal editing that you've done.
You might want to check your FBX export settings and make sure that you have "Tangets and Binormals" checked on, if you are trying to export from 3dsmax with custom normals. I don't think that is checked on by default.
So maybe I should have less intersections with my leaf cards? That's where the ugliness is coming from so hopefully that will solve it. Gonna try that today.
What do you guys think?
you could theoretically encode some normal information into vertex colour and/or do something clever with a shader - which is probably what they've done in the witcher
I've tried lots of subsurface, reducing leaves, reducing card density, lowering the opacity in UE4 ETC and nothing helps here. At this point I may as well return to hand done trees because at least I can make those look right : (
Any insight from anyone who uses speedtree would be so greatly appreciated!
https://www.blend4web.com/en/community/article/131/
This shows how normal editing can help low poly trees look better.
I feel like the default specularity is always WAY too full on for a tree, unless its got those really glossy looking leaves, even still, I always set the values a little lower.
Also I think I was limiting myself to too low a poly count. I was aiming for about 8k but now I'm sort of thinking around 12-16k is more reasonable for a tree. Anyone have any experience with poly counts and current gen trees?
Same as a normal map, encode a direction into an rgb value and then do something useful with it in your ue material.
I have no idea on the mechanics of this as I've not tried it with speedtree
Anyway, I've been spending even more time on my leaf cards and making sure they were in that sweet spot in terms of density. I've only been messing with really simple tricks in the material, tints and subsurface multipliers, ETC. However I would really like to learn more about using vertex colours to help with the foliage. Only problem is I can't find much online about actually doing it! I've only used vertex colours on my modular buildings, as part of a height lerp to paint on texture variation and edge wear. Might I trouble you for a little more info or an article you've read or something on the subject? Anyway thanks so much for your help!
(Oh and I haven't said yet but that tree is dope!)
Edit: The only stuff I'm finding on foliage and vertex colours is about wind which is not what I'm after.
What do you think?
Edit: I'm still using tangent space normals BTW.
Edit: And here's a quick close up of what I mean. Sorry for bombarding this thread with walls of text, just trying to learn as much as possible, and as I'm constantly working, I'm constantly posting! :P
I strangely really like them unlit haha.
This is super noticeable with the wind so nicer AA should help is what I'm saying
After reading this I think what I was talking about on the lit leaves is ghosting from the AA with the wind.
Edit: Yep AA ghosting was really bad. Turned off AA to test, and that is the culprit! I already have my settings on cinematic so I'm thinking the best way to improve the AA is with NVidias tech, which is what I was getting at before! Hehe I'm not THAT nooby.
Edit 2: Turning up the Distance Field res and switching to two sided distance fields helps too with creating nice patches of light and shade on the trunk, and now instead of being a blurry mess you can see the leaf shadows clearly!
Anyway back on subject. I feel like I'm on the right track now! Thanks so much I do really appreciate you taking the time to help!
Do you refer to the setting under engine, optimization: Accurate Velocities from Vertex Deformation?