Speedtree not working with UE4 4.20.1

Speedtrees are working fine in the editor, but they are not working well when packaging the project for Windows. (They were working fine in 4.19)

They are not animated anymore, and some just completely disappeared. They appear well if I remove the “Speedtree” node from the World Position Offset in the material.

Is this a bug ?

I found out that everything works when packaging the project with the Build Configuration “Developement”, but it doesn’t with “Shipping” or “Shipping Client”.

Hi,

This issue can be fixed with CL 4225668. Essentially you need to remove the STATICMESH_ENABLE_DEBUG_RENDERING guards in FStaticMeshSceneProxy::AddSpeedTreeWind() and FStaticMeshSceneProxy::RemoveSpeedTreeWind(). To do so you also need to put FStaticMeshSceneProxy::StaticMesh out of the guards (and initialize it properly).

Uriel

Hi Uriel, thanks for your answer!
I’m not sure to understand where to find all that. (for instance “FStaticMeshSceneProxy::AddSpeedTreeWind()”)… Is this in a certain file, in the Unreal editor or in the source code ? Sorry if my question seems stupid, I have no idea what CL 4225668 is…

Hi, yes it requires changing the source code in StaticMeshRender.cpp . “CL” refers to changelist from perforce source control

sounds like Epic should fix that asap!!

I don’t know if this is the same issue, but after updating to 4.20.3 some Speedtree 8 materials (branch, billboard) went invisible and unplugging the World Position Offset node brought the material back. In this case, I noticed that the Speedtree node attached to the WPO node had the wrong entry in the first dropdown menu (‘Leaf’). Setting it to Branch or Billboard as appropriate seemed to fix things.

Maybe this was a new thing in 4.20.3 and maybe reimporting the Speedtrees would also fix it. I didn’t try because I’ve customised things a little.

Hi,

Yes it looks like the same issue. Unfortunately, the fix could not be put in the 4.20 patches because it changed the public classes header. If you are working with 4.20, you need to integrate CL 4225668. Otherwise, the fix will be part of in 4.21