My game has 5 different levels with different maps and I think I may want to set up different light rigs for each map. Performance wise, how much of an effect does the lifespan of scene vs frame have?
Is there a way to define the background color for the areas where nothing is rendered? Right now it appears gray, the same as the window color in Windows.
Hi bioroid,
The performance difference between Scene and Frame lifespan is very low, but it can add up as the number of objects per frame increases. For light rigs it should not be noticeable as there are generally only a handful. But with scene objects it can be very noticeable depending on the number of objects (this includes not just the Models, but also their ModelMeshes and ModelMeshParts).
The fog color controls the background color (located in the scene environment object), but you can also override this by clearing the back buffer to your own color between the calls to RenderManager.BeginFrameRendering and RenderManager.Render.
Let me know if this helps!
Follow me on Twitter – development and personal tweetsAwesome XNA Videos – Lighting, Rendering, and game videos