I wonder how big games do it ?
from Horizon Zero Dawn pdf . for example
I have no problem to do it in any 3d package but we need it inside Speed tree editor to keep all the animation, lods etc.
Is it possible there somehow ? We play with puffiness and it still does it kind of wrong.
Replies
I think there's quite a bit of control over normals smoothness, pufiness etc in Speed Tree.
I'm not sure what they do exactly in terms of flipping based on these slides,
but you may try to experiment with the backside normals (and other backside parameters) in UE4 or whatever engine you're using.
If you are exporting to unreal, then you can export them as an fbx from unreal, make the changes, and reimport. I believe that shouldn't break the vertex ordering.
My dumb workaround is that i just amplify the subsurface scattering, just enough to blow out the hard shadowing.
Have you asked on the speedtree forums? They usually answer questions pretty quick there.
I just happened to do a quick test the other day with exporting the speedtree from unreal to maya and then doing the sphere vertex transfer thing and it seemed to work fine on reimport. (actually that's a major loophole, because to get the fbx export of speedtree you need to spend $1000.)
That's kind of a pain but it does seem to work. I bet the puffiness thing is the proper solution, but I am not sure how it's really working. I only know the basics of speedtree.
I haven't used Speed Tree for like a year, but I've used SpeedTree quite a lot in the past and you have enough ways to control normal smoothing in ST, possibly even in a better way than just transfering from a mesh.
It's not what puffiness is for.
Just read the docs ,it's described pretty clearly there.
The branch/leaf normal shouldn't really break things too much, unless you have a very noisy normal map, but then the shading should also be 'radial' just more noisy.
The purpose of radial/spherical averaging for tree coronas is to have a more consistent/smooth shading, so that the fact that it's made of branch 'planes' is not that apparent, but it's not always the ultimate solution.
Can you maybe show some screenshots of what you have and what you'd like to achieve?
I am working in speedtree currently and got decent results making use of the lighting settings tab. Below screenshot is in unreal. Overall the lighting is decently soft looking, without the hard contrasting shadows.
My material is albedo/opacity and SSS only. The SSS texture I bumped up brightness just a touch.
In speed tree I turned on Normals by pushing N, then I just tweaked the sliders until it looked like normals were mostly pointing outwards... I read the docs but they are kind of vague to me, but these settings below seem to get a pretty soft look. The adjustments (up, right, down) work the same as orientation adjustments for leaf cards. Just rotate along one of the axis. It seems global anchor is the easiest to work with because all the normals behave same way.
Would be great if speedtree put out a video showing how to get predictable results with these sliders in real world scenario. I saw some forum post from them and answers are just, "use the sliders to adjust the normals."
I think you're just very confused and you're expecting SpeedTree to give you some magical solution, for a problem caused somewhere else.
Unless you've set up your tree in some bad way in ST (you haven't posted any shots so it's impossible to tell), but then also don't expect some magical button to fix it, watch some tutorials instead.
I exported Speed Tree trees for UE4, Unity and a custom engine, neither of those showed any issues with shading in terms of averaged normals.
Here's one:
Foliage Normals - UE4 Materials 101 - Episode 33 - YouTube
The trees in Horzion Zero Dawn use the crytek tree technique from crysis - so they're not making their trees in speedtree - they're doing it in another program. I think it's 3dsmax? Horizon Zero Dawn also uses a custom engine (not unreal).
This is the Crysis tech document about that technique.
https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-16-vegetation-procedural-animation-and-shading-crysis
Speedtree uses a different technique using multiple UV channels to store the information.
As for the normals, have you made sure you've got the staticmeshes set to use the imported normals? Instead of regenerating them themselves?
@gnoop
If this is your Speed Tree mesh, then as I said just get back to the basics, watch some tutorials, read the docs etc.
Besides, despite the fact that I posted the shots from the docs about puffiness and told you expressedly that it won't help (in fact it makes the mesh more noisy) in your case you still use it at 1.
When you fix your problem with vertex normals it's just the start of course, you will still have to handle the backsides.
I think both I and other people in this thread have hinted at what the problem is, if you look at the slides from Guerilla it's pretty obvious which
part of the workflow it is (and you seem to be completely missing it).
Either way, in terms of SpeedTree let me just post this.
ps. it's sad a pro soft uses silly cryptic "puffiness" terms instead of vertex normal editor /modifier with "radial" around defined center terms everybody would instantly understand.
There aren't that many variables so you really should be able to get a good result.
Your normals seem pretty radial, maybe not perfectly radial, but they look ok in my opinion.
Maybe you're importing/exporting loses this information somewhere along the way?
The bush you're showing shouldn't look like this in Blender, unless you're really making some mistake somewhere else than just vertex normals.
In terms of the backsides, as I said you can't do any magical things with the vertex normals in the mesh, you can adjust the shading of the backsides in the shader/engine, that's the only solution.
In UE4 you have this node called TwoSidedSign, it let's you select the backsides of the mesh and change parameters for them, so e.g
you can tweak their normals, change their roughness, color or SSS)
For example in one project I worked on in UE4 I modeled some bushes and trees and when Distance Field AO was used, in darkened the backsides quite a bit,
I adjusted the AO a bit, but also adjusted the color and SSS values just for the backsides so it looked more consistent.
Of course it's a bit hacky and not always a good solution, I'm pretty sure Guerilla uses more sophisticated ways to deal with the backsides' shading, but that's the type of things you need to do.
If you're using a custom engine then I doubt anyone here can help you, no one knows the specifics of the shader you're using, you'd have more luck asking whoever's responsible for that engine and shaders.
This seems like more up to date docs.
Try setting 'Parent Puffiness' to 0, then maybe try increasing it with different anchors.
But let me repeat my point once again, I really don't think Speed Tree itself is not your problem.
I downloaded a trial for SpeedTree,
I played with the default desktop realtime bush, and there actually might be something off in terms of how these newer versions handle normals
On Pillars of Eternity I made all the trees in Maya. I didn't use any kind of automated tree making system. 90% of the time it takes to make a tree was creating the trunk and leaf model and textures. The actual assembly of the tree mesh is pretty easy if these are well made.
The animation of the tree was done using a Unity version of Crytek's shader.
the artwork I'm talking about:
https://www.artstation.com/artwork/E3L42
I would suggest duplicating the backfaces explicitly, then projecting the normals in a sphere or dome shape. Some examples here.
http://wiki.polycount.com/wiki/Foliage#Vertex_Normals
This shows projected normals per the whole canopy (normal thief) vs. per-clump (custom normals), and no self shadowing. Different shading results, depends what tradeoffs you're cool with.
The question you have to ask is this..
Does the fact speedtree handles your LODs, billboarding and markup for wind/collision etc. save you a load of work or not? if the answer is yes you're in the same boat as a lot of people and might as well just bend over without complaining.
in the video i linked (or another from same author) he shows how to make shaders to do exactly those things.... in UE4.
with the parent puffiness and all that lighting tab stuff you don't have to work entirely blind. Turn normals on and you can see what they are doing as you move sliders. I'd recommend starting from a default template and just move one thing at a time, otherwise shit gets confusing fast.
I've tried getting by without speedtree, but they are around such a long time for a reason. Making trees any other way sucks, and if you have to make a volume speedtree pays back. it is especially apparent when you want to make quick non-destructive art-director type changes. That's when it really shines. No other way to do that quickly.
Flipped ‘Incorrectly’ means that Abs() the Z components of our Viewspace Normal, it's in the shader and realtime, not in the speed export.
Thanks chena. Why viewspace? it looks fine if I just multiply normals on -1 for backsides in Blender (all 3 values). Or it's becase it works for camera space normals buffer or something?
kown a triangle a backside or not need in viewspace.
'incorrectly' flipped the z of the viewspace normal, i think the purpose is that make all the leaf face towards camera.
@gnoop did you export tree from speedtree, and adjust the normal in blender? I ask the author of <<Between Tech and Art: The Vegetation of Horizon Zero Dawn>>, they generate a smooth mesh from the tree use the maya particles, and transfer the mesh normal to tree vertex. I want use blender to do it. Did you have some tutorial to generate mesh and transfer the normal?
We are trying to make it all in Speed Tree. I actually pretty much hate it. So inconvenient . Vertex normals are never right there.
As of Blender I used data transfer modifier. You make a shape approximation of a tree ( I used Zbrush re-mesher ) but my guess it should be possible to do in Blender too. Not sure why particles is necessary for that. Then data transfer modifier just transfers vertex normals to a tree mesh. Use data transfer modifier + normals at youtube search bar . There was a few tutorials there.
It's possible to do in Geometry nodes too with atribute transfer node.
This is one of those rare moments when I search for an obscure technical problem bugging me, and immediately find a thread with others who feel the same way.
I made an oak tree in Blender for my game enviroment, tested it out in Unity with a basic leaf/wins shader and liked the results. Then I decided to try SpeedTree for a month to see if I can streamline production. I was very sad when there was no easy obvious way to manipulate vertex normals to simulate roundness in the leaf clumps.
I like ST procedural tools for making the trunk and branches, so now I'm wondering if its worth it just for the main body and LOD's, then modifying the leaf clumps in Blender. I still need to play around with some settings before making a decision.