Ways of modelling a game asset for Unity or Unreal Engine

Hi there,

I am new to Blender and want to use it for creating game assets for Unity or Unreal (I am not sure now which engine I like more).

I have some principle questions about creating such assets which have multiple identical parts. Let’s say I want to create a cage. So the cage consists of the following parts:

  • Bottom Frame
  • Bottom plate
  • Four wall grids, which for themselves consists from several cylindrical bars
  • Top Frame which is identical to bottom frame
  • Bars of the top frame which are like the bars from the side wall bars, but maybe with another length

So if the cage is big there are much identical bars. Coming more from a CAD world, I would create one bar and use several instances of it in the design. So if I alter one bar all other instances are also changed. Also I woul UV map only one bar.
But I don’t know if a game engine handle such things. So the question is:

Should I create all the bars one by one and create one big geometry from it, and then UV map the whole thing, or can I use references to one bar and UV map all the components one by one?

I hope I have made my question clear enough ? It’s a bit complicated for me, since I am no english native speaker, I am German, so if you like to answer in German thats ok, too. :slight_smile:

Thorsten

You’ll have to merge all copy-pasted details into single mesh, as *.fbx exporter (most commonly used for game assets) doesnt support instancing of any kind. However, you absolutely can UV unwrap only single bar, before making copies. Simply put, UV coordinates are stored in the mesh vertices, and “survive” copying or editing the mesh. If you are OK with texture repetition, it will save your the space on your texture sheet

1 Like

Ok, thank you DeckardX08, I will experiment with that later. At the moment I ran into another problem. If I join some objects, I get hidden parts of faces. I can leave them, but I think it is cleaner to remove them. But how?

See the yellow marked area of the highlighted face:

I think I have to split that face at the upper right vertex of the vertical bar. But how do I do this? What do you think, is it necessary to remove suche hidden faces from a game asset?

You’ll get better results with clean topology- hidden/overlapping faces don’t do well in any context, definitely not in a game editor

If you want to automate it, try Boolean modifier in Union mode. Not always guaranteed to work though

Those example on screenshot are absolutely fine.
Hidded faces are fine*

*but it depends. Check the link below.

Let say its a wooden crate cage on you screenshot. Its absolutely fine to have all that wooden planks as separate meshes, cause now you can easilly map them to tiled texture or texturing 2 or 3 planks unique and overlap other on UV to reuse texture.
Thigs like this are pretty common in game model of any kind. Take cheap indie game or AAA project - you will be able to find stuff like this in any of them.

Im highly recommend to read this article to get better understanding of game models optimization.

Hey, thank you for that article. It is really very informative. It is also a very complicated matter. But if I am right I learn these things for my cage example (warning, long response :slight_smile: ):

  1. Since my bars have only very small areas connecting to the outer frame, it is not necessary to cut holes into the frame. That is also true for the corners of the frames. But I should remove the caps of the bars.
  2. Bars and frame are very tall objects, so it may be better to apply a couple of row cuts to them. I get more polygons then, but they are not so tall, and that can be more efficient, because there is not so much discarded pixels.
  3. There would be a risc of Z-buffer conflicts if the bars stand exactly on the frame. So maybe I should “dig” them a bit into the frame. On the other hand this conflict only appears on the inside of the bar, which is never visible. So maybe it’s not a real problem

What’s not in the article, how much memory uses the texture. As I see it seems that a texture sheet is always square and there seem to be some fixed resolutions. Let’s say 1000x1000 or 2000x2000 pixel).
Since my cage is a relative big object these maybe resonable resolutions. But what if I have a small object, lets say a small knife. Then this maybe a too big resolution. Let’s say it would be enough to have 200x200 pixels. Is it possible to use such small texture sheets? And have the texture sheets to be square or are rectangular textures also possible?
Back to my cage: it consist of only three identical parts, a bar, the uprights of the frame and the horizontal parts of the frame. If I reuse the texture coordinates I would get only three very small but high texture parts. So a rectangular texture sheet would be appropriate. If I only can use square texture sheets I can use several different bar texture parts without increasing memory use. Or does the GPU some compression to avoid storing unused areas in the texture sheets.

For my simple example all these performance and memory considerations may be obsolete. But if the scenes become more populated, I think you can run into performance issues especially in the texture memory.

BTW: I imported my first cage to DAZ3D and it works fine, but I saw the the whole structure appears to thick (not a DAZ problem, it’s simply my fault when selecting the proportions). Now I have the problem that I need to create the whole thing anew, because of the destructive workflow of Blender. Once the transforms are applied which seems necessary to export as fbx you cannot alter the primitives anymore, because they don’t exist anymore. Ok, I can edit the mesh itself, but thats time consuming.

You should always use powers of two as your square texture dimensions- 256, 512, 1024, 2048, and 4096 pixels per side. This significantly increases performance :slight_smile:

1 Like

Blockquote
There would be a risc of Z-buffer conflicts if the bars stand exactly on the frame. So maybe I should “dig” them a bit i…

Well, this is writed in the article, yes, but, as a real life example: im personally never expirience such specific type of z-fighting inside Unreal Enigine 4. And actually i never saw this in any game, so im not sure, but probably its more of a broblem of some specific engines or old edgines/gpu.
Im personally doesnt worry about cases like this, cause, again, im never expiriece such problem in UE4.

Nope.
Textures are mostly time are square. But you also can use rectangular one in case when rectangular texture will be more efficiently for unwrapping you models.
As example: https://80.lv/articles/recreating-a-warhammer-weapon-in-hand-painted-style-001agt-002mrs-004adk/
There’s some tutorials about unwrapping to 2:1/1:2 UV and making you textures rectangular.
Rectangular textures are widely use in games. IRL examples: some door’s textures in Resident Evil 2 Remake. Some textures in HL:Alyx. Tons of games use this. Its totally okay.

About texture sizes. Its never 1000x1000 despite the fact what 1000 are can be divided by 2 without remainder.
Texture size are always* “power of 2”. Like: 8x8, 16x16, 32x32, 64x64… 1024x1024, 2048x2048 and so on. In case of rectangular textures its can be 512x1024, or 128x64 and so on.
The reason for that are quite technical. Basically its all about so called “Mip-mapping”. If you want to dig a bit deeper you can check this one:

*there’s can be some exceptions. Most common are specific textures. Let say in some game when you characted are vunded and you see some king of blood on you screen borders, or he wearing some gas mask and you see some scratches and rist stains on glass of the mesk. This specific textures can be non power of 2 texture like 1920x1080 and any other common screen resolution.

1 Like