Level creation, draw calls, and texturing

Hey everyone,

I’m trying to make a game that is highly optimized such that it can run on a wide range of PC’s. I’m new to game development, so I don’t know the best way to go about doing this and have been struggling for about a week.

I realize there are two ways I can make a level:

  1. Make props, walls, floors, etc. in Blender, and import them into Unity. I can then texture them in Unity, but this increases my draw call amount, having multiple props (I read about unity batch-calling… does this account for this?).

  2. Make the entire level in Blender, and use a texture atlas (massive texture) to give the entire level one texture, hence giving it one draw call. I want to make relative large levels, so I am finding this to be pretty difficult, and Blender isn’t the most intuitive program.

I have asked a similar question in the past, but basically:

How should I go about mapping, and texturing my level in a way that is both efficient from a GPU/CPU resource point of view and logistical view (for me… I don’t want to spend a year doing this).

Thanks so much for any input.
Cheers!

This is a pretty complex topic with MANY workflows, but here is something I think will work for you. The cool thing about this workflow is that you can even do lighting in Blender for more optimization…

  • Setup a complete render going material by material (and maybe even lighting read below…) just like you would in, say, movie creation.
  • Add a texture atlas and unwrap with the texture atlas addon (enable in user prefs if not shown in render panel)
  • Hit the Bake Button (with textures selected if you want to do lighting in Unity; full render if you want even more optimization…)
  • Save the atlas
  • Do a save as and save as another file something like MYNAME_GAMEOBJECT.blend
  • Remove ALL UVs except for the texture atlas UVs
  • Give all objects the same material
  • Export as .fbx (after fixing rotation issue…)
  • Import into Unity
  • If you used full render bake you can make the material use an unlit shader
  • If you used texture use some sort of diffuse shader and setup lighting

Let me know if this helps :wink:

For more optimization tips see my answer here

Edit:

Here is a basic setup in Blender for texturing:

Notes:

  • switch to material viewport
  • do a basic unwrap if necessary (otherwise use generated coordinates)
  • set that unwrap in texture panel

Dont over focus on drawcalls, there are lot of factors which affects game performance like fillrate, overdraw, number of vertices, texture memory etc. Create all the props in modular way and create texture atlasses for it, so you take few meshes and textures into unity, level design it and get the advantage using static batching, occlusion culling in unity.
As far as unity document says you can use few hundreds draw calls for pc.

You should create level chunks, if you create your entire level in one huge mesh it will make 1 draw call, but will drain your memory. Its best to make your chunks the size of 1 screen, so the maximum your drawcall will be is 4.

You can create props and stuff split, and then in Unity you can use many level optimizer, even the one that comes with unity like this one: (http://forum.unity3d.com/threads/combine-children-extented-sources-to-share.37721/).

The base idea is to have chunks of level so they get loaded in and out of memory whenever they are needed, so they are fast to load and unload spending less memory than the entire level on memory.