Object Life Span + Rendering questions

rated by 0 users
This post has 1 Reply | 2 Followers

Top 75 Contributor
Posts 44
SunBurn_Community_Licensee
bioroid Posted: 09-21-2009 1:13 PM

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.

Top 10 Contributor
Posts 4,546
Employee
SunBurn_Studio_Licensee

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 tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Page 1 of 1 (2 items) | RSS