0
$\begingroup$

I was thinking, (first of All, I am new to blender), I am making a 2D/3D mobile game in unity, Everything is 2D but I wanted to give off a 3D vibe. For many reason, 3D models( low poly) are readily available, easy to make (for me). I can make low poly 3d models in blender now ( very beginner level). My Unity game is a platformer game.. But I am confused whether to go for full 2D or Full 3D or somewhere in between. Lets suppose I want a 2D game since 3D is more performance heavy...

Is it possible that I make a model in 3D but slice it in half Since I am always showing only one side of the model. Is it possible that I Make the model in 3d (just as i want) and after making it, Slice the model in half and export it to unity. That will save the tris count etc and would serve the purpose as well as will be an optimization hack aswell.

what do you guys think?

$\endgroup$
2
2
$\begingroup$

You can. You could, for example, adopt the view of your camera, relative to the object, select all faces with a big box select, select invert, and delete. You'll probably need to copy normals from an original copy of your mesh for your new border verts.

Note that this saves you vert count, which saves you performance on the vertex transform part of rendering, where each vertex is transformed from object space to camera space. But it doesn't really do much (anything?) for fill rate, the actual drawing of faces on the screen, because by default, backfaces will be ignored by your GPU anyways-- they'll get "culled" at an early point in the rendering pipeline.

Vertex transformation is what keeps Counterstrike under 300fps even with a very modern computer at a very low resolution. Fill rate is what makes a game get slower as you increase the resolution. They tend to operate roughly in parallel-- that is, if your performance is limited by your fill rate, because you're rendering 30 screen-sized fog planes at 4k, reducing the number of vertices you need to transform isn't going to do much to improve your framerate.

Also, be aware that it's not only the camera that determines which parts of a model you need to expose to the rendering engine. Faces can be invisible to the camera, but visible to shadowing lights, which means hidden faces can cast shadows on visible faces. There are other rendering techniques, like mirror planes, that also render from different perspectives.

If you have a fixed camera relative to your objects, both angle and field of view, and all shadowing lights are fixed relative to your objects, and your objects are well-spaced from each other, then you can go one step further, which is to just render your objects and draw them on planes. If you render a heightmap and a normal map as well as color, and a heightmap from the perspective of your shadowing light(s), you can use these to calculate 3D effects like specular lighting and shadow buffers.

Realistically, that's difficult to do with even a single shadowing light, as if your objects are locked to a single position relative to both your light and camera, they're locked to a single position relative to each other as well. But without any shadowing lights, and the use of an orthographic camera, or by accepting some error, it's doable.

$\endgroup$
1
  • $\begingroup$ Hi there, Thanks alot for detailed reply. Very interesting things I learned from your answer. The planes concept is very tempting. the things I actually want to draw in blender in 3d and then slice are low poly stones, Trees, Boxes, walls, make a terrain(mountains etc) in 3d and then "Zing" Slice it in half for 2d, etc.. everything that I want to slice in half is static. (So sorry I forgot to mention; its for a mobile game). $\endgroup$ – Talha Muhammad Feb 7 at 19:43
0
$\begingroup$

Sorry, but this technique will not work. If you cut a walking human in half, you will get a human awkwardly jumping on a single leg. Yes, you can cut each leg in half, but then this technique is no longer simple: now you also have to cut each finger in half, and perhaps resign or do some detailed tweaking on cloth and other small elements. In the end, a better solution emerges, where you use Python to automatically assign Holdout shader to faces in a trial by error fashion, checking each render if there's any transparent pixels on it (meaning the face was visible to the camera). But going through all of this will take a lot of time, and in the end you will very slightly optimize a very small part of your visuals, effectively spending a lot of time for an unnoticeable change - the opposite to what you should do, according to the 80-20 rule.

Especially considering how hard it is to start in gamedev, and how many successful projects are, I'd say, poorly optimized, focusing on optimization at the start seems to be a wrong strategy.

$\endgroup$
1
  • $\begingroup$ Thanks for your reply, The Things I want to cut in half will all be static. $\endgroup$ – Talha Muhammad Feb 7 at 19:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.