What is the difference between 'Static' and 'Dynamic' in Unity, and why is it important for lighting and batching?

Study for the Unity Certified User Artist Test. Prepare using flashcards and multiple choice questions, including hints and explanations. Get ready to excel in your certification exam!

Multiple Choice

What is the difference between 'Static' and 'Dynamic' in Unity, and why is it important for lighting and batching?

Explanation:
marking an object as static tells Unity it won’t move or change, so the engine can invest in precomputed optimizations. This matters for lighting and rendering performance. For lighting, static objects can participate in baked lighting and lightmap generation. The light interaction gets precomputed and stored in textures, so at runtime there’s no heavy real-time calculation for those objects. Dynamic objects, by contrast, aren’t baked into those lightmaps unless they’re marked or treated specially (for example, via light probes or real-time lighting), so they’re lit differently and with more runtime cost if you rely on real-time lights. For batching, static objects can use static batching, which combines their geometry to reduce draw calls, since they don’t move. That lowers CPU work and can improve frame rates in scenes with many stationary elements. Dynamic objects don’t participate in static batching; they’ll use dynamic batching or other techniques like GPU instancing if applicable, which keeps them flexible for movement but may come with different performance trade-offs. So, static equals non-moving with baked lighting and static batching ready to optimize performance, while dynamic remains flexible for movement but isn’t included in those static optimizations.

marking an object as static tells Unity it won’t move or change, so the engine can invest in precomputed optimizations. This matters for lighting and rendering performance.

For lighting, static objects can participate in baked lighting and lightmap generation. The light interaction gets precomputed and stored in textures, so at runtime there’s no heavy real-time calculation for those objects. Dynamic objects, by contrast, aren’t baked into those lightmaps unless they’re marked or treated specially (for example, via light probes or real-time lighting), so they’re lit differently and with more runtime cost if you rely on real-time lights.

For batching, static objects can use static batching, which combines their geometry to reduce draw calls, since they don’t move. That lowers CPU work and can improve frame rates in scenes with many stationary elements. Dynamic objects don’t participate in static batching; they’ll use dynamic batching or other techniques like GPU instancing if applicable, which keeps them flexible for movement but may come with different performance trade-offs.

So, static equals non-moving with baked lighting and static batching ready to optimize performance, while dynamic remains flexible for movement but isn’t included in those static optimizations.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy