So ive been laying out my UVs for a pretty big scene for the past day and a half or so and i realized that i'm not so hot at it.. Does anyone have any nifty UV tips? Thats a little vague, i know, but i figure if someone has any little tips or tricks or even examples of complicated shaped layed out, it'd be beneficial to (hopefully) more than just me
Some questions i have in particular -
(I use headus UVLayout)
Should i be exporting every asset in my scene one at a time to layout and then compile later? What i'm doing now is duplicating one copy of every asset i have and laying them out in hopes to copy the UVs over to the other's in the scene later. I have them all in one OBJ btw, so the layout in headus is a huge amount of UVs that i want to sort out and take multiple snapshots.. ideally i'd want 2 2048 maps.. possibly 3.. i'm not really sure..
Also, i hear a lot about minimizing seams, stretching, and making sure its easy to paint.. any pointers on which aspect to sacrifice first? haha
Thanks in advance! I hope that this will be helpful to many people in the end :P
Replies
If your building a modular scene it's good to try and keep all your modular pieces square from the get go so that when you go to texture them you can easily unwrap them into a square space.
Also don't be afraid to hack simple shapes up into square pieces. If you have a really simple object that is really long hacking it into two halves with an edge loop down the middle is sometimes worth it so that you don't have to use a rectangular texture.
Maybe that advice is too obvious but thinking like that alluded me for awhile. If you just overlay your texture shape onto your models bounding box you should know pretty quickly what texture size you need and or if you need to hack up the model for it to fit. This can speed things along so you don't spend as much time messing around in the UV editor.
Oh and if you are dealing with a large scene I would unwrap every object one by one and then put them all together into a larger atlas after the fact. If you can get every unique object unwrapped into square and rectangular shapes then merging them and putting them all into one larger textures shouldn't take to much effort. It will also ensure that relevant object stay grouped together to make texture painting easier.
Finally, in order to make sure things are easy to paint I would always try to make sure hard edges are perfectly vertical or horizontal when possible.
This makes the model much easier to paint because you don't have to worry about rotating anything to awkward angles. In fact having all of your shells, islands, whatever, oriented perfectly horizontal or vertical is always better than having them at an angle. This is far more relevant on hard surface stuff than it is organic models but it's still makes painting much easier in either case.
Also try and group objects that share a similar color or texture, and give a little bit of extra padding in your texture between areas that have vastly different textures or colors. This helps both with organization and with making sure you don't have mipmapping issues.
- export several objects that need to share the same texture later as 1 OBJ file (sometimes up to 30 objects)
- load it into Headus, get some coffee and spend to time on unwrapping all of them
- in Uvlayout I group objects roughly together but I dont do any layout- just quick unrapping with smart seams as possible (i.e less as possible, or use on inner edges or logical cuts)
- once done in Uvlayout I import it back to max and layout the pieces there so that they all fit nice together. Sometimes I even stack stuff (either uvLayout using align pins or max using scripts)
- After I am done with layouting all objects together in the UV I use some custom max scripts to apply the sub objects of the imported mesh to existing instances of the scene so that they all (instances of the same sub object) get the same new UV even though they might be rotated, scaled or moved.
The reason why I do such big steps (unwrapping sometimes 30 objects at once) is because it reduces the time dramatically so I can focus more on average quality within the steps and check group by group. Also it ensures that the texel density is equal (normalized) so that all UV shells are scaled the same.
some tips perhaps in Uvlayout:
- in the 3d view: selecting faces and then drop them is somtimes way faster as seam marking, especially with edgy stuff or low poly. Just paint the faces green using [F] and then hover with the cursor over some of them and hit [D] to drop them
- in the unwrap view you can flatten lots of new shells (usually gray shaded) by pressing [F] in a empty spot (pick draw flatten box selection) then mark the shells. They should not change in shape now but appear green instead.
Now select all those shells and from the flatten menu say flatten for 3 min. (or whatever time you want) and hit go.
It should then flatten each shell in a fragment of the total time all automatically - so you can drink more coffee.
- there is a nice way of stacking shells by marking a vertex using the key, then once done select the similar shells and hit the "stack" button in the menu
In case you don't know yet about it: There is also TexTools a collection of maxscripts in a toolbar that works with 3dsmax 9+ and has some extra tools other UV tools don't have, like rendering the UV layout as image into the clipboard and lots of other tools. I use it often in combination with uvLayout.
http://renderhjs.net/textools/
the PolyCount discussion thread:
http://boards.polycount.net/showthread.php?t=60553&page=19
So... you might find some of this useful:
http://www.bradm3d.com/Tutorials_New.html
Ben Mathis has a lot of good tutorials on the subject and is also worth a look:
http://www.poopinmymouth.com/tutorial/tutorial.htm
Maybe give it a try - there is always a way of creating some scripts otherwise to automate the workflow (detach objects from imported Headus OBJ).
I am giving it a shot from one export.. im not so amazing at organizing my UVs so im not sure how its gonna turn out.. i may have to go back and redo it all..
If you have a lot of duplicate items in your scene would you reccommend only exporting one instance and then copying/duplicating UVs to the other instances afterwards, or unwrap them and stack them in headus individually?
im not 100% sure how things like normals would like that.
As I understand this you would add a tiling texture for example on terrain, streets and then add little planes with alpha textures to add dirt and variation. Same should go with some of the houses and props.
I am now working on this street view and wanted to know how would you usually approach UVing/texturing this kind of house? Would you just tile one texture over it and then add additional dirt via planes with masks? Or would you just unwrap it as whole object and do all the work in PS?
At the moment I am doing it all in PS. Here are my UVs, model itself and concept:
http://img12.imageshack.us/img12/1973/concept01f.jpg
Also when trying to optimize this stuff would you add additional edgeloops just so you can mirror something, tile it over etc? For example if one part of the building is in different color would you still use tiling textures and would split it in two textures?
Sorry if that's too much pictures here, will change it to links if needed. Hope I was clear enough
It's a tough call but here's my best guess based on the scene (actually my best 2 guesses).
1) Tile textures with some unique overlays.
2 for the ground, blended using whatever method available
1 for the concrete ground floor (with strategic cuts to start the brickwork in the right place)
1 for the brick
1 for the plaster
and a lot of repeating overlays used in clever ways, broken plaster, dirt broken brick ect.
Depending on the engine, the rest of the game, the rest of the area, and how it handles overlays that might be ok or it could look really bad, lots of possible Z sorting issues, who knows not enough info to say for sure.
This could be quick and easy, but it could be easy for the player to spot tiles and a lot of unique overlays could be just as expensive as uniquely unwrapping everything. You might be able to bake in light maps to a separate smaller texture but they need to be 100% unique and that will require a second UV channel. Still could be worth it. I would only go this route if you could bake light maps.
Or
2) (my personal choice)
Create 1-3 windows, fully textured and tile in all directions. Use these 3 unique pieces to replace all of your windows. (this could be done in the editor).
Create a ground floor concrete tile, cut a row of windows in half and set them in the concrete tile to make your ground floor tile.
There will be a few pieces you'll need to unwrap uniquely (doors, chimneys, a few places here and there that are banged up pretty good) and you can use a few easy to place props to to help break up the repletion.
You could quite possibly fit everything onto the one sheet you have now.
Doing it this way, saves you on texture space, gives you some unique details to play with and using this method you could create entire city blocks, probably with a few more unique tiles but you get the picture.
http://boards.polycount.net/showpost.php?p=756818&postcount=18
The pics are now in the 3D Art section of his site under Dark Sector
http://www.strangefate.com/3Dart/index.html
like I mentioned I wrote a simple script that detaches and attaches faces/verts of the imported mesh back to 1 instance. It requires some user input but it saved me time on this project:
http://mmvr-des.burg-halle.de/blogs/klimawandel/wp-content/uploads/2008/04/market.jpg
it had lots of different objects to be unwrapped and that were already instanced stacked and combined over the place. So I had to come with some ideas on how to update all instances at once and editing all unique instances at once before.
martinszeme :
I would say modular geometry whenever possible with a unique unwrap for each. Thats at least how I see things done more and more.
The advantage of unique unwrappings are:
- AO pass,- looks dirty and unique (and with low poly vertex painting does not always work so well)
- easier to add Object specific details to suppor the shape i.e scratches on edges, signs, smal details,... make it more unique
on the other hand you have tileable texture with the advantage of:
- less memory consumption (usually the most important reason, especially for big big environment stuff)
- easier / saves time
what I noticed is that your UV lines are not all nice lined up,- there are several scripts for that that make sure that UV verts in a row are perfectly on a line so that no pixel shifting or rotation effects appear on your model- it makes it also easier to work in Photoshop (rectangular selection mask,...).
As for what belongs together in a texture space is up to you. I mostly worked on render intense projects (4k texture maps) and so I was kind of annoyed by opening several texture sheets at once in PS just to edit the scene texture wise. Which is why I ended up more and more putting bigger category objects together into 1 texture UV map. For me it was all about time and performance and Mental Ray memory issues.
For real time though I believe some things are similar, you don't unwrap and texture just a crate these days,- instead you make a collection of environment objects that belong together and give them the same texture map.
@Vig
Was thinking about the first method you describe and as far as I can tell it would work great with big, semi-repetitive levels where it would be faster to create 3-5 textures and then produce lets say 20-40 overlaying textures which would then break up the repetition. Will have to try to create street alley or something with similary themed models/environments.
One more thing. I didn't understand what you meant by this line: "Create a ground floor concrete tile, cut a row of windows in half and set them in the concrete tile to make your ground floor tile. " With cut you mean to cut across all windows in ground floor so there would be two textures?
@EricChadwick
Thanks for the link, but those links to images are broken, but thanks for pointing to that thread. Found other great info.
@renderhjs
Thanks for the reply. Changed those UVs using your script - TexTools.
So generally what size would these texture sheets be if they would hold crates, planks, oil tanks etc? 2048*2048? Wouldn't that be worse than lets say 512*512 for each of those objects? Or would that change from engine to engine?
Recently this have been a big inspiration:
http://www.littlelostpoly.co.uk/devblog/?p=420
Trying to figure out how he unwrapped and textured it. Can't seem to comment there.
Create your window tiles 2-3 variants. You could make a half tile of crete, copy a window tile and cut it in half to make a new unique mesh but it only uses half of a unique texture. The top half uses the same existing window texture.
Looking at it now, you could use the bottom half of the purple tile and the top half of the brick to make the ground floor of the building on the right. Which means you can axe the unique half tile of crete and save even more.
Of course all of this requires modifying the concept in subtle ways so you need to make sure those changes won't impact the overall look. Most of the time the concept artists just are not at precise and we would like them to be so they're perfectly fine with subtle changes for the sake of modularity.
Looks like he used tiles and blended them together. You can do this in 3dsmax with a blend material and vertex paint as the mask. I've seen it done in Maya too.
In most editors you start out with a flat plane that's been sub-divided, then you paint push/pull the verts up or down to make your hills. Then you pick two (sometimes more) tiles and paint a mask onto the hills.
As for the plant life, most editors have paint scatter tools. 3dsmax and Maya also have ways to paint place objects on other objects.
I think he's just using Hammers displacement tools with hammers blending tools. Don't think its meshes, but brushes.
Camera mapping:
http://www.cgarchitect.com/resources/tutorials/misc/tutorial2.asp
it can also be nice to blend or bridge seams in texture maps without the need of BodyPaint 3d, Mudbox or Photoshop CS4 Pro. I want to write a script that simplifies that process once I have some more free time.
interesting side info:
The UV map of a camera mapped object is interesting because its a plane projection of what you see through the camera - except that it is ranged from 0 - 1 range within a square
I am sure that there is more room for ideas and tools in that area- like quick mapping of selected faces according to the projection in the view- that way one could take literal snapshots of particular uv faces.
Or some visible face filtering and or selection in your UV map so you know which UV faces are not visible in the camera.
(I'm pretty sure this is an arbitrary question, but i'm still curious! )
I have seen some scenes using a single texture atlas of like 4096*4096 (for dif, normal and spec maps each) for the environments - usually divided into 256,512 or 1024 blocks for element. Of course if you use separate textures instead of the atlas you can use tiling for surfaces better but it could be a rough target.
Doesn't UnrealEditor come with a feature to list up only the used textures? - maybe invest some time to look and sum up what is used for a typical scene - I am sure most of what studios produce is based on experiments and on work in progress stages. So perhaps they calculate less at the beginning before and in the end they crank up some of the textures because they have some more juice left.
I ran into some problems unwrapping my last scene, so ive been trying to learn up a bit on industry standards and such, you've been a huge help