Batch Rendering Question
by Greg G · in Torque 3D Professional · 04/14/2010 (1:23 pm) · 6 replies
If I have a building that is made up of 4 separate materials (Color, Spec, Normals, & Overlay) and another building that re-uses those same textures but has unique material names because I need to have a unique overlay for this second building are the buildings going to be rendered the same batch?
In other words, what ultimately determines what gets rendered in what batch? Is it the name of the material, the, color texture, or something else?
In other words, what ultimately determines what gets rendered in what batch? Is it the name of the material, the, color texture, or something else?
#2
My confusion is coming from reading this: udn.epicgames.com/Two/MeshOptimization.html#Optimizing%20for%20Batched%20Renderi...
In there it says to keep the number of materials on screen to as few as possible, but by needing to have a single unique Overlay texture (not shared between models) I am wondering if this breaks batch rendering, and causes the entire building to be rendered in its own you unique batch. Even if some of the textures it uses are shared with other props in the scene.
Here is an image:
04/14/2010 (2:12 pm)
Thanks for the response, but i'm still a little confused...My confusion is coming from reading this: udn.epicgames.com/Two/MeshOptimization.html#Optimizing%20for%20Batched%20Renderi...
In there it says to keep the number of materials on screen to as few as possible, but by needing to have a single unique Overlay texture (not shared between models) I am wondering if this breaks batch rendering, and causes the entire building to be rendered in its own you unique batch. Even if some of the textures it uses are shared with other props in the scene.
Here is an image:
#3
eg: I have an object with one texture on it - it takes 1 drawcall to render diffuse+normal+spec.
I have an object with two textures on it - it takes 2 drawcalls to render 2xdiffuse + 2xnormal + 2xspec.
I have an object with 2 texture layers - it takes 2 drawcalls to render both layers
etc
04/14/2010 (3:35 pm)
Anything in one material layer diffuse/normal/spec renders in one pass (glow requires a second)eg: I have an object with one texture on it - it takes 1 drawcall to render diffuse+normal+spec.
I have an object with two textures on it - it takes 2 drawcalls to render 2xdiffuse + 2xnormal + 2xspec.
I have an object with 2 texture layers - it takes 2 drawcalls to render both layers
etc
#4
04/14/2010 (6:51 pm)
Thanks a bunch that cleared it up for me.
#5
04/15/2010 (10:39 am)
Oh another question does the introduction of a second dynamic light equal another draw call?
#6
04/15/2010 (10:59 am)
The light in AL is something like a screen space pass - it is per screen pixel based. It has nothing to do with objects and polygons,it is just a processing of pixels. This is how light pre-pass rendering works.
Associate Steve Acaster
[YorkshireRifles.com]