I know this is a rather complicated question to ask, but I could use some help with thinking what is the best way to optimize a village for Unity. So, here is the case. I have made a couple of houses (like 30 different versions with modelled windows/doors/other objects), a modelled street and some village objects. I am pretty new to all this but I do know how to work with retopology and use as little vertices as I can, this doesn’t also seem like the problem. The problem is that I simply don’t know how to do proper texturing using Substance Painter.
I have exported al the houses individually so I can paint them in Substance Painter. The mistake I made was to give way to many materials to my individuel houses, causing me to end up with maybe 20 textures per house (walls, roof, doors, windows, frames, glass etc.), wich also gives a lot of output textures from Substance Painter to HDRP in Unity. I first used 2K, redid it to 1K which is better but not enough. Resizing with something like TinyPNG doesnt also fix the problem. Now when i Imported this into Unity and attached al the textures to the houses in my village, Unity gets way to slow and I noticed thay my textures were eating al my memory space so this would slow my scene massively down while I haven’t even filled the surroundings and so. Conclusion: I am using way to many textures for my village.
I did some research but somehow I can’t figure out how people put all the textures in one texture map. Like for example, I have a house with walls, 3 doors and 5 windows. Well, usually the walls take up the most space on a UV map. But I have the common problem that if I were to put everything on one map, the textures in Substance Painter would be way to large on my objects, so that I have to scale them up to maybe 5 times. Now, it doesn’t look all that bad, but I have also read that this is not great for performance either, is that correct? So, how do people texture a entire house making it look good and at the same time low in texture sizes?
I really am having a hard time to figure out how to properly texture a large object. I am self taught, did a lot of learning and online research but I simply don’t have anyone in my area to ask for help putting me in the right direction. So if anyone has a great article/book/tutorial or tips to help me out on how to properly do it, that would be higly appreciated. Thanks in advance!!
Yes this is a dilemma when texturing, if all the textures are 4k up, the bigger your scene and the more complex the objects you will soon slow down performance.
I do not think there is a magic way out of this apart from optimising.
The 2 main ways to do this are:
You do not have to, sometimes it is best not to.
Reuse all the textures you can and share them between objects. If you do this you will not have one complex texture for each house, each house can have one texture for bricks, one for roof tiles, one for windows etc. That way with 2 or 3 variations of bricks you can texture all the houses.
Tile the textures as much as possible, it is a waste of memory to unwrap everything and use huge textures that cover all the surfaces. Use tillable texture images and scale the UV mapping, either with the mapping node or by scaling the UV’s.
Thank you a lot for your answer! So, what I am now trying to do is to merge some texture maps using vertex colors. This saves a lot of unneccesary loose textures that would now fit on a combined texture map. It is a lot of work ofcourse but it surely lowers the number of loose textures. I suppose this is one of the ways to go for the smaller objects.
I understand partly what you are saying about the walls. I am using a brick texture in Substance Painter that applies to all the walls of the house. Do you mean that (since my houses don’t need all the walls textured) to not unwrap the walls that don’t need a texture? Or do you mean to make for example a brick 1k image in Photoshop that is 1024 x 1024 px and apply this to the houses. I suppose I would still need to unwrap the walls properly but then I don’t need all different textures per house as I suppose that is what you say. What I did though, was paint for example flowers on the walls of all the individual houses. So, I would either have to figure out a different way for using flowers (maybe make some wall plant/sprites), but that is fine. I think I’m gonna go using this method then since it is a sort of old village that really needs plants haha
Thank you so much for thinking with me! I found it very helpfull and I think I can go forward from here! I just didn’t know on how to texture something so big and also well optimized, but I now also understand that there is no easy of simple way to do it, and that it is not something I just simply didn’t know about. Thanks a lot, it is really appreciated!
You do have to unwrap all the walls, and they should all have texture (unless you only want one camera view).
What I meant was that there does not need to be a huge texture that covers all the UV space. You can use a smaller “seamless tiled texture”. I do not use substance but I am sure there is a way to create seamless tiled textures. A quick search for “tiled brick texture” will give you examples.
You can use the same texture for more than one house (not all the same maybe 2 or 3 variations).
Also faces can share UV space, so the back walls can use the same texture as the front with a bit of offset, they will never be seen “together” in the same view.
You use seamless tileable textures as much as possible NOT bespoke textures for each house.
You use trim sheets for smaller details and to create variations in appearance.
You separate by materials, so that you can consistently reuse the same materials over all houses to keep the final number of materials and textures low.
You use vertex colors as masks to mix textures and add variations.
You build shaders that you can instance, meaning you use the same shaders repeatedly but have different kinds of inputs that change their appearance.
You use an (aggressive) LOD system so that objects further away from the camera get lower detailed textures for VRAM optimization.
I know you use Unity and not Unreal, but I would actually recommend to consider using Epics Mixer tool as it is perfect for creating and adjusting seamless tileable textures as well as for creating Trim sheets.
You can’t use their Megascans library for Unity (without paying for it), but you can use the materials that come with Mixer as well as some free ones from the Megascans library.
Hi @Jela , have you seen this video : https://www.youtube.com/watch?v=TkTQhmNFRnY
It gives good tricks to add many details by mixing several titled textures using vertex colors, multiple UV ect… I found it quite inspiring.
From what I’ve read I think you are on the right path anyway !
Thanks a lot, I see what you mean. I will definitely see if I can make a tiled brick texture in Substance. However, my problem with Substance is that there can’t be shared faces if you were to bake the mesh. Difficult story though, but since I pretty much use the same brick material on all the houses I probably don’t need Substance for the walls anyway. I am definitely going to try to work with your tips and again, thank you so much for thinking with me and explaining further!
Basically you need to design the village with your needs before modeling. It’s not the same to do the texture for a FPS that a strategy game with the camera at 100m of the village. Not the same for mobile or console,…
Thank you very much for your answer, this clarifies a lot. I watched the video thas @sozap hinted me and altogether this makes a lot of sence.
Is this the program that you are refering to? https://quixel.com/mixer
I searched and this looks the closest, I see that it also supports Blender, so perhaps then I can import it to Unity (I do need to research this a little further on how it exatcly works) but just so I know this is the tool you are referring to.
Thank you for sharing this video! Very helpfull and very inspiring, and it really adds to the answers given in this post.
And, thank you for your compliment Great to hear I’m going into the right direction. Being self taught and not having anyone to ask which way to go can be really frustrating So great to hear i’m on the right track
Thanks! It definitely is a struggle to figure out how to do it right, especially when all of this is rather new and there is no simple answer on how to texture an entire village for my projects needs, but I definitely try to keep the use in mind. Thanks for your answer!
I’m self taught too, so I totally get your feeling !
3D is about creative problem solving, so working on your own and get the habit to find solutions by yourself can only do you good in the long term. It gets better once you work with people and share together ideas and workflows.
Having a proper formation in 3D is good too and help you to get knowledge quickly but it’s not as perfect as we might think.