- Home /
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:
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?).
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!
I have watched tons of online videos, but they all have conflicting information, or techniques that aren't relevant/applicable to my situation.
In a simple level like this, is it possible to assign textures to a wall using the workflow outlined above? For complex levels, it's just WAY too much work to go back and forth between photoshop when you have massive UV maps.
How can I apply a texture to my object face, and have it implement into my TextureAtlas?
I am trying to add my answer but I keep getting moderated :(
Weird! Can it be in a comment? I'll accept the answer later as an answer if you can post by then!
Sorry, about the wait...I had already posted an answer so I didn't want to post a duplicate comment; the issue is fixed now; you can check my answer ;)
Answer by Graphics_Dev · Mar 02, 2016 at 04:15 PM
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 ;)
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
Thank you, but my major issue is with the texturing workflow.
How can I easily assign textures to faces which are also assigned to my texture Altas?? Do I have to seriously go 1 island at a time, find it in photoshop, and drag a texture image onto it, save it, and preview it in blender, then repeat? This is the workflow I have seen online and its INCREDIBLY impractical for texture atlases. Some people use clone brushes and 2 uv maps, but this doesn't seem to work in new versions of blender.
the $$anonymous$$AIN question is... What is the easiest workflow for assigning textures to every face in my level
No idea what you mean by "1 island at a time, find it...". That's all wrong though wherever you saw that. Just add textures to your materials. They can use generated coordinates, UVs, procedural generation, whatever. Just get it to look nice in Blender (BTW I only use the Cycles render engine anymore but that's a completely different topic). For example, you can make a wall material with a seamless wall texture on it that is mapped with generated coordinates. When you are DONE the texture atlas addon will create new UVs for you so that you can bake out a final texture: this is all done automatically; you don't need Photoshop for this.
If you have no clue what I just said (or have any questions), please let me know so I can better help you :)
That sounds EXACTLY like what I've been looking for. I'm going to try that once I get home, and will mark this as the answer if its what I needed. Thank you SO much. I really hope this works.
Answer by Girish-sruthkia · Mar 01, 2016 at 05:27 AM
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.
Answer by MalachiteBR · Mar 01, 2016 at 03:36 AM
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.
Thanks for your answer. What software do you use to create levels and texture them?