A lot of 2D sprites vs 1 3D model

Hello all,

We have a (rather technical) question for the community. We posted a little news fact about our graphical system we use in our new game U-Boats: U-Boats Windows, Linux game - IndieDB.

The trick was to stack layers of sprites one on top of the other and to use a camera set to perspective (not isometric). We could produce these a lot faster (no need to model, unwrap, texture). And we wanted to try something different. We actually started off with flat 2d and stumbled upon this approach. We want to stay modest about this: it isn’t that big of a deal and we are not the first to do it (see also this: Volume rendering - Wikipedia).



Still it runs very smooth, even on low end pc’s, eventhough the drawcalls are very high. On some occasions we have >600 drawcalls (like in the picture above). For our ship the Helgoland we have 16 sprites, so 16 drawcalls. Way more than just 1 for a simple 3D model. You can see how we did things here:


Some guy on facebook (let’s call him John Doe) argued that if we created a 3D mesh composed out of layers, and then textured it correctly, we could reduce the number of draw calls. So 1 drawcall for our Helgoland, but still have the layer effect we like. We believe he has a point, BUT (and this is where our question comes in) sprites are not rendered the same as 3D models. Which is more efficient? A Helgoland with 16 sprites or a 3D model composed out of flat layers and 1 texture? To make the comparison fair, for arguments sake, the 3D model would have a very basic shader and no lighting.

Maybe the topology of the 3D model isn’t that relevant as long as it’s simple. So second but similar question: Which is more efficient? A sub with 21 sprites or a 3D model of the same sub (low poly)? Again to make the comparison fair, for arguments sake, the 3D model would have a very basic shader and no lighting.

Underlying question: is the rendering of sprites in Unity so efficient that is outweighs the increase of drawcalls (in our system)?

The beta is free to download here: U-Boats Windows, Linux game - IndieDB, in case you want to check that out.

We would love to hear from you guys.

Regards

Astra Game Studio Team
http://www.uboatsgame.com/
http://steamcommunity.com/sharedfiles/filedetails/?id=458997492

You want to use some Atlases.

Since Unity 4.x (can’t remember which version… 4.5 I think), you can do this easily without a third party plugin:

Rendering performance depends on a number of factors. For Sprites.

Geometry:
In Unity, Sprites can be rendered as Rects (simple Quads), Tight Meshes (Tessellated geometry to improve Rendering). Although the VertexData is slightly more for Tightmeshes (Check Sprite Import Setting) there should be notable performance improvements when rendering lot of sprites

Texture Atlas:
Sprites also provide automatic atlasing which is another useful feature to improve Draw-calls. To ensure multiple sprites are batched into 1 draw-call, just set a common PackingTag to those Sprites.

You could also compare performance creating a test scenes and profiling them. Ideally you should take advantage of the above features when using Sprites.

I’m new to sprite stacking and stumbled upon this among other things (sprite stacking is a very underrated and hence low content on the internet, imo) so i wanted to ask @Boi So when u said 3D mesh composed of layers, did u mean rectangular planes with the sprites as their textures? and hence stacking all the UVs of these rectangles would help in the Atlas map?
and after all these years, would you recommend using sprite stacking? I was looking forward to making a top-down 2D game, so i thought sprite stacking would be great and different thing to implement.

PS im sorry to have brought this up after 10 years but i was kinda desperate to talk to someone aout sprite stacking:sweat_smile: