fatcoder
Member
|
Decals and Batching
Is it OK to have hundreds of decals on screen (on the terrain) at once? Are decals batched (i.e. drawn all at once) or is each decal its own batch (i.e. a draw call per decal)?
My scene runs at about 305fps, but if I try to draw 700 terrain decals (using the same material) on screen at once, the frame rate drops to about 220fps.
Is there any way to query the engine for the current batch count per frame? i.e. how many draw calls are being made to the video card. This would be useful for fine tuning.
|
|
04-29-2010 11:09 AM |
|
Esenthel
Administrator
|
RE: Decals and Batching
currently the decals are drawn separately.
why do you need so many of them?
could you show us your scene?
|
|
04-29-2010 11:39 AM |
|
fatcoder
Member
|
RE: Decals and Batching
I'm trying to draw a footpath on the terrain. The player can click on the terrain to place a new footpath tile. Each tile is drawn as a decal.
Here is a screen shot from a game called Rollercoaster Tycoon 3. See the footpath tiles placed on the terrain. That is what I'm trying to achieve. In my game, the player can zoom out, so it means that there could be hundreds of footpath tiles on the screen at once.
Is there a better way to draw these? Perhaps batched as a single draw call.
|
|
04-29-2010 01:05 PM |
|
Esenthel
Administrator
|
RE: Decals and Batching
I understand, I'll add batched drawing of decals to my list.
|
|
04-29-2010 01:19 PM |
|
fatcoder
Member
|
RE: Decals and Batching
Thanks, very much appreciated.
Do you think that batched terrain decals are the best way to draw something like these footpaths on the terrain?
|
|
04-29-2010 11:50 PM |
|
iamcreasy
Member
|
RE: Decals and Batching
(04-29-2010 11:50 PM)fatcoder Wrote: Thanks, very much appreciated.
Do you think that batched terrain decals are the best way to draw something like these footpaths on the terrain?
Really, I dont think this is the best way.Leadwerks has a good road building system...similar to river system of Esenthel.Though Esenthel there are some issues at sharp corners and junctions...otherwise, the river system was a pretty cool solution for Road or this kind of linear streams.
|
|
04-30-2010 04:16 AM |
|
fatcoder
Member
|
RE: Decals and Batching
I agree, if you want to draw spline based roads (or rivers). But in this case, it is tile based. The footpath tiles are placed into an imaginary grid over the terrain. So the tiles snap to the grid and each other. A spline solution would be overkill.
I am thinking that batched quad geometry (i.e. a quad for each tile) is the best approach, and since a decal is essentially a quad, if Esenthel can get the decals batched, then it should work well I'm hoping.
|
|
04-30-2010 11:24 AM |
|