Using 4.27, during runtime I need to hide furniture and have its shadows on the floor vanish too.
The scene is very heavy and project time restrictions do not allow for any optimisation, so I must bake the scene to get good FPS.
Is there a way to temporarily force the floor static mesh actors to be dynamically lit at run time?
Everything is imported into Unreal via Datasmith and the floor is comprised of dozens of separate meshes. I can easily loop through them in my player character BP but simply setting mobility to moveable has no effect (the static shadows persist).
Even moving the floor meshes slightly (which breaks static lighting in editor) has no effect at runtime.
I have looked online about spawning at runtime and everything seems to direct toward spawning meshes that are inside a BP. Is this really the only way to do it?
Seems to me you are overcomplicating yourself. If you are willing to “swap” the entire scene to dynamic, just forget baked lighting and optimize you dynamic or hybrid scene from the start.
Unfortunately I cant get good FPS with hybrid or dynamic. This is not for a game, it is for an interior space real time presentation.
The required turn around time for this and future projects (all large interior spaces) is 1 to 2 days tops (with changes throughout) so no time to optimise anything at all.
About the only thing I have time for is reducing 4, 8, 16K textures down to sensible levels within UE4.
Surely there must be a way to duplicate a static mesh actor at runtime?
Thank you for taking the time to set that up Pezzott1 !
Currently I am importing everything from 3dsMax via datasmith and using meta data from 3dsMax to do a lot of auto organising in UE4 at runtime so I can hide/unhide various categories of objects without having to manually set everything up after each import.
I think I can modify my 3dsMax export process to duplicate the flooring on export and adjust the meta info so UE4 understands which floor version is static and which dynamic. Then I can switch the visibility just as you demonstrated.
So in the end I won’t need to duplicate anything in UE4, just in 3dsMax instead!!
If you are duplicating, try this: export them only once and in the blueprint create two Static Mesh Components; set one to Static/Stationary and other to Movable, then assign the static mesh you want for that instance.
This way you’ll only need one blueprint and you can swap out everything as needed. You can even have another blueprint trigger these blueprints per room as the player approaches.
Not sure I completely understand everything there!
Where you say:
“export them only once and in the blueprint create two Static Mesh Components”
If I have, say, 40 floor meshes coming in from 3dsMax, then I make 80 static mesh components in a specially made BP, which I drag into my level.
On event begin I do the static mesh assignments and later control the visibility as needed?
Actually thinking about it maybe I only need to make 40 static mesh components just for the dynamic floors. All the static floors are already in level and baked and can be made hidden in game whenever I like.
Hopefully I will be able to automate the creation of the 40 static mesh components in a loop!