PDA

View Full Version : How to texture large buildings for 3D games on mobile



gamedesign1
02-02-2016, 04:22 AM
Hi all

I have been asked to model buildings for a mobile game and just wanted to get some advice on best ways of texturing. The game is being made in Unity. Obviously I am restricted on how many textures I can use because of memory restrictions. I am very familiar with texturing for print output just not games. Is it best to use multiple tiled textures blended together using vertex painting? Or is it best to use specific UV mapping for each section to give more control over the final look. Obviously doing it that way ends up with more textures. I find it difficult to choose.

Any help would be greatly appreciated, thanks guys.

Surrealist.
02-02-2016, 04:51 AM
There are a lot of tricks you can employ to save on textures. Items that are mirrored or duplicated can live in the same UV space. Basically if anything that can be duplicated, should and anything that can be mirrored, should have one half of the UV space required for the entire object. Then pack the UV space as tight as you can.

These tricks continue on into baking where your baking mesh is edited specifically so that you do not have UVs overlapping. The final delivery mesh is never the same as the baking one.

There are probably other tricks, but those will get you saving space right away.

gamedesign1
02-02-2016, 05:49 AM
There are a lot of tricks you can employ to save on textures. Items that are mirrored or duplicated can live in the same UV space. Basically if anything that can be duplicated, should and anything that can be mirrored, should have one half of the UV space required for the entire object. Then pack the UV space as tight as you can.

These tricks continue on into baking where your baking mesh is edited specifically so that you do not have UVs overlapping. The final delivery mesh is never the same as the baking one.

There are probably other tricks, but those will get you saving space right away.

Thanks for your help

MarcusM
02-02-2016, 05:54 AM
In mobile especially importat are draw calls. Every new material used is additional draw call. When you have shadows in scene then they are multiplied. Conclusion is, les materials count is better. There are few ways to texture building..

In my opinion if this must be large buildings then cut mesh on equal parts and tile UV on texture. But then there is not Occlusion channel for secondary maps and UV1 in (new)shader..

http://docs.unity3d.com/Manual/DrawCallBatching.html

Danner
02-02-2016, 10:01 AM
It depends on the surface, but for most stuff I use two images. one image tile for the color and fine detail and another as a lightmap (baked in lightwave) to light it.

jasonwestmas
02-02-2016, 01:31 PM
Hi all

I have been asked to model buildings for a mobile game and just wanted to get some advice on best ways of texturing. The game is being made in Unity. Obviously I am restricted on how many textures I can use because of memory restrictions. I am very familiar with texturing for print output just not games. Is it best to use multiple tiled textures blended together using vertex painting? Or is it best to use specific UV mapping for each section to give more control over the final look. Obviously doing it that way ends up with more textures. I find it difficult to choose.

Any help would be greatly appreciated, thanks guys.

It's a mix of having unique UV space reserved along with a space reserved for UV tiling. (sometimes in the same UV map). By tiling I mean reusing the same UV space over and over by overlapping your UVs. Granted your textures should be prepared before doing this because you want to view your textures as you lay out your UVs.

So when you aren't tiling textures, you'll be creating unique features which are shared between other polygons less frequently or not duplicated at all making the feature in that UV space very unique. It depends on how the game is being designed so make sure you understand the game concept.

When creating your texures and normal maps that are baked you don't want to do this with overlapping UVs, it will create baking arctifacts usually. So often you will create a completed piece of your environment that is all baked and then start duplicating it (along with its uvs) and creating new tiled UVs as you go when you need them to save on space for floors and walls and ground etc. The goal is to see how much stuff you can fit onto one texture map set without loosing quality when your character is standing next to it. In which case you need to find out how close the camera will be viewing the prop at any given time.

gamedesign1
02-02-2016, 04:26 PM
Thanks everyone for your tips :)

Surrealist.
02-02-2016, 11:09 PM
Yeah Jason described the process in a little more detail.

But here is my basic process:

High polygon source mesh.

And this particular step can go one of two ways or any combination...

Zbrush (insert your sculpting app here) High Poly Sculpt, or in this case hard surface model using booleans insert brushes etc.

Subdivision Surface or other high poly modeling technique.

Low Poly Mesh

Created over the high poly version with retopo tools, or modeling tools. But in this particular case, probably just modeled around the high poly detailed version.

Auto retopo tools can not be used because with low poly constraints you have to be very specific about what gets modeled and how.

UV Mapping

As described above for the most efficient use of space.

Painting/Baking/Texturing

If you painted high poly the model in Zbrush or other paint app you can simply transfer the details of that to the low poly model and then mix with AO and also generate other maps in photoshop like specular, roughness etc.

As I said I always have a final model for delivery and one for various baking uses.

For AO: I will have all of the mesh available but broken up into parts. Parts that are duplicated and would otherwise overlap in UV space are put along side to cast AO shadows on the mesh I will bake.

An example would be an array of 10 shelves (empty) on a wall. Lets say you only bake the wall and one of the shelves, because each shelf is just a clone and use the same UV space. But 9 out of 10 of them would be present in the file as a separate object to cast shadows on the wall and onto the one shelf you are baking. You would likely bake a shelf from the middle so it gets occlusion from shelves below it and above it.

If the shelves have anything on them, bottles, books etc. You can see how this would get complex and you could also bake shadow errors into the one shelf if eash shelf as a different arrangement of objects. In this case you would not include those objects in the baking file. Likely you'd forgo any shadows cast by them. But when you baked the shelf objects, you'd have the shelves there to cast occlusion on them.

If you have a high poly mesh, it gets more complex still. Now you will bake from the high poly mesh to get other details as well as the shadows. So you have to use an app that allows "from to" option such as Xnormal, Mudbox, Blender, etc. Not sure how to do this in LW.

Hope that makes sense.

For Normal Map: Basically whatever source you have you'd bake the high poly mesh to the low poly mesh to get the details onto the low poly mesh. Same set up as above basically.

If you are using something like Substance Designer, Substance Painter or dDo, you will need a CID map:

For CID: (Color Id Map) You assign basic colors to materials in the source mesh on various parts that need different attributes such as metal or wood. These are conveyed in simple color maps.

They look like this:

132184

For these since it can bleed from part to part I will sometimes use another exploded mesh version.

Like this:

132185

Then in your app of choice dDo SP, SD, you will load:

Mesh:

This again is another mesh, similar to the delivery mesh. Or it could be the delivery mesh. Meaning it has all parts included even if overlapping UVs. It is not an issue at this point. You want to see the final result. The exception would be if you are baking any maps in these apps as a part of the process. Or if you are going to paint directly on the mesh there could be errors of the mesh UVs overlap.

Color ID

Normal Map

AO Map.

And you use the color IDs to assign materials to different parts of the texture.

The Roughness Specularity and Metalness maps drive what the material will look like (wood, or metal for example) on one material in the game engine.

Optionally you then can take the color map (Diffuse Color Map/Albeto Map) that you export afer this process and combine it with the AO map (multiply) and save that out for the color chanel in the game engine.

This is the process for faking high detail and quality into a low polygon mesh.

Alternatively you can go old school and paint all of this by hand.