So… I’m seeing major problems around the Indirect Lighting Cache. Let me walk you through what I’m seeing.
The game is a strategy tile-based game - with tiles being grid-based. Right now we have an actor which we spawn many instances and it can change color to show things like where a building can be placed and so on. The problem is to do with spawning many instances of the actor.
Here’s an empty scene containing many instances of the actor:
The framerate WAS always hovering around 120fps before spawning all of those actors (there’s about 777 of them in this screenshot). Now, these actors are just cubes with a basic material on them. Nothing changes - not the material, not the actor transform - nothing.
Here’s what the Unreal Profiler is telling me:
I also used a separate profiler (Very Sleepy) to examine the performance - the rendering thread is spending pretty much all of its time inside FTextureLayout3D::AddSurfaceInner.
I’d love to show you more pictures but apparently I’m limited to only 2 attachments. Still, the actor and the material bound to the actor’s box component are about as simple as possible. I’ve tried everything I can think of using [this document][3] as a guide. The components, for example, are now set to be stationary - I can’t make them static because they do need to change color.
I guess I have two questions coming from this:
- Have I found a bug in the renderer?
- Is using actors to do this kind of thing completely stupid? Should I be rendering a generated custom mesh instead? Or is there a better way which I haven’t even considered yet?
Thanks!