Speedtree light baking issues

Hi, I made 3 variations of a tree in SpeedTree and now I am desperately trying to get them to work in Unreal, which I believe is proving to be a waste of time now!

Issue 1: Light baking multiple trees So, I was testing out the first variation of the tree and sure it didn’t look as great as it was in SpeedTree but I had gotten close to the look I want with tweaking, baking lights for that one tree took maybe 5 seconds. So, I then import the second variation of the tree, match up the settings with the first one’s, bake lights again. The progress bar jumps to around 60% and then stops at 83% and keeps processing maps, and NEVER finishes! If I just keep one tree in the scene light baking starts and finishes fine. Two trees or any scene that has custom meshes will just never stop processing.

Issue 2: Matching up the tree to look similar to SpeedTree version Apparently quite a few people are bumping into this:

c75721bc3d34aab18adf4b07f7ea3fd8dac16d55.jpeg

This is after baking lights. Light maps seem to be setup all right, resolution at 1024. Surely the shadows are not supposed to look so crude (I double checked the environment colour just in case, it was set to a warm yellow, not pitch black)? The difference between the speedTree look and the same tree in UE4 is ridiculous.

As I said I can eventually match up the tree to look similar to the STM version, but the light baking issue is just not going anywhere, even if I set it up to bake lights for the selected object only. I don’t have the strongest computer ever, but this shouldn’t be an issue considering it’s only like 30000 polys or less. Any insight into this will be highly appreciated!

hey,
I have the same issues like you, just with my speedtree grass. It seams that tehre is no solution so far for this problem, thats why i don’t understand how they can sell they’re models in the speedtree store knowing that they don’t work like the should… You should ask speedtree directly in they’re forums… maybe they can help you out with your tree… for my grass problem no help “solution” so far…

https://forums.unrealengine/showthread.php?54541-Speedtree-vegetation-shader-issue

Can you take a screenshot of your material setup, your directional light settings, and your skylight settings?

Do you get the same result when you test it in the Example_Map? -> because then we know if it’s probably your light setup or something else :slight_smile:


Just the usual speedtree import setup, minus the color variation node.



Directional light settings


Sky light settings

Yep, I was testing the trees out on the standard map (I’m working on 4.3, didn’t want to risk moving version mid-project; I did try everything on 4.5, same results though) and in my project map which isn’t anything fancy, it’s the same standard map just an extra cam or two, my own meshes and a slightly rotated directional light.

I feel like I tried every possible combination by now. Best result so far was to make the mesh movable, but then there are no shadows at all, which isn’t exactly what I need.

Hello,

1024 is huge for a single tree. Make the lightmap more in the 64-128 range and your build time will improve dramatically. That’s probably more than enough for a tree.

To tune the lightmap UVs on the tree, be sure to read our documentation on how to do it at ://docs.speedtree/doku.php?id=making_lightmap_uvs_for_ue4. Just a little tuning can make a dramatic difference.

Depending on what version of UE4 you’re using, you may need to fiddle with a few things. To use the lightmap UVs you carefully tuned in the Modeler, you’ll need to disable the automatic lightmap UV generation on the static mesh. In each LOD of the static mesh, uncheck that option and click build. The most recent versions of the SpeedTree importer disable that by default. The automatic lightmap UVs aren’t usually great for a SpeedTree, mostly because the Modeler knows a lot more about the construction of the tree and can unwrap it much more nicely. It looks like you already have the twosidedsign node in your material, so that shouldn’t be a problem for you.

And like previous posters indicated, you’ll have to fiddle with the global light settings a bit if you’re starting with the example map.

Yeah I know 1024 was pushing it, I just have a habit of working with big numbers and then scaling them down. I think I got the build time under control now after fiddling with my PC, although it still tends to get stuck in some cases for no particular reason.

I think I may have solved the awful shadowing issue as well, I don’t know if this is the most optimal way to do it, but it seems to be working: I simply went to the speedtree mesh assets in the content browser and got rid of the ST lightmap UVs and generated new ones with standard settings. After doing this I’m getting what seems to be pretty accurate shadows and none of those black artifacts. I tried this out on other trees as well and they seem to be responding well too. I’m about to make some grass for use with the foliage tool so I can only hope it doesn’t have as many problems as the trees did.