Nózmájner wrote:That's some useful information. I think this and some other stuff should be useful to be summarized in an FAQ or something.
Okay; I'll try and make a wiki page out of it, or add it to an existing one; good idea.
At least I would have some questions, like how about overlapping UV-s in a single model,
Short answer: Don't overlap or mirror anything (almost).
Long answer:
Eventually we will have engine support for dual UV-mappings; and we will (optionally) be doing two unwraps per model:
- A non-overlapping or mirroring unwrap, used for ambient occlusion/PRT bakings, normal-map, light-map/radiosity, damage and decals (faction-specific writings and logos).
- A mirroring and maximally overlapping unwrap, for diffuse, specular and glow textures.
But until we have dual UV's, the worst thing we can do is something in the middle; because then none of the work we do will be re-usable; and going maximally overlapped would leave us unable to have ambient occlusion now. So, by elimination, that leaves us with only one choice: doing a purely non-overlapped unwrap, for now.
However, I said "almost" because there are a few exceptions: Objects that are black in diffuse AND specular AND glow, --pitch black--, are lighting-agnostic, so their islands can all be overlapped together into a tight bunch, and then shrunk to a single texel and put in a corner out of the way.
Similarly, all islands for red lights that have the same intensity of red glow and are black in diffuse and specular, can be bunched and shrunk together. Same with all green lights. Same with all blue lights, yellow lights, etc.
or about intersection of different meshes can be used (I don't like it by he way), or the poly count bounds for different classes and LOD-s, and texture sizes.
Intersecting meshes is not exactly a NO-NO, and sometimes it makes a lot of sense if a boolean union would produce a gazillion polygons, such as when a pipe enters a plane. However, it is much better to have the pipe end exactly at the surface, or even be off the surface by a micron, than to actually penetrate; because when it penetrates, you get dark, semi-buried texels there when you bake an ambient occlusion or radiosity.
Also, the biggest performance concern is over-draw: Overdraw occurs when you have surfaces covering surfaces on the display. Within the area of coverage in screen-space, the GPU will be drawing each pixel twice, and deciding coverage based on z-buffer comparisons, pixel by pixel. As a rule of thumb, you shouldn't have large, hidden surfaces anywhere.
http://dungeonhack.uesp.net/forums/view ... =1775#1775
If you go inside the model, you should see a Great Emptiness, basically; --i.e.: The outside surface viewed from inside, and nothing else. So, if two inter-penetrating shapes are too hard to weld together, but they interpenetrate over an area, do, at least, make a hole in one that roughly removes 90% of the covered area, and trim the other short.
Finally, consider welding the parts together, even if it's not easy; it usually looks much better. Wings that penetrate a fuselage make a plane loook like a toy. Smooth-welded wings look a lot more real and professional. See
Smoothly Welding Complex shapes.
So in conclusion, there's no need to cut down the poly count, and it can be used as a top LOD? If so, the model does need some touch-up, and a LOD of course, and I think, I start working on it today.
Cool!
Should I keep the different sections on different objects, or join them up?
However you prefer to work. I usually keep separate objects during the construction phase, and join them once I consider them finished. At the time of exporting, you'll want to have meshes for the top LOD that don't exceed 10,000 vertexes each. In Blender, my latest idea is to keep metals and dielectrics in separate meshes. That's because in Blender there's a limit of 14 material indexes per object, and that's too few, so 14 metals and 14 non-metals suits me better. Lights and transparencies (cockpit glass) are best put in a separate mesh, because transparencies use a different blending mode; and lights will use the same shader as transparencies, if you eventually target the
CineMut shader family. (There will be CineMut Opaque; and CineMut FireGlass for glass (and plexi-glass, whatever) and emissive surfaces. Note: You'll still be able to use glow in CineMut Opaque, but CineMut FireGlass will have additional features, like defining directionality for lights, so that engine glows look brighter when you're aligned behind a ship.)
And then, for each top LOD object, you have one or two lesser LOD objects. Then you export one .obj per mesh object. That's what I do; though you can have a greater number of objects and select several at a time at export time, if you prefer.
Finally, you may want a separate object for the shield; and optionally another object with tiny cubes where the engine plumes and weapons and pilot are positioned, so you can read their positions easily when calculating the numbers for units.csv.
AND, you may (WILL) want to have "LOD ZERO" for each of your meshes: High poly versions you use for bakings, including ambient occlusion, radiosity, and last but not least, a corrective normal-map.
EDIT:
One more thing, make sure you rotate all your islands so that the direction towards the front of the ship always points straight UP in the texture. This is because if you want to use linear blurs to represent dirt streaks and scratches, you'd rather do so using a global mask, that have to do angled linear blurs for each island. Also, if you later decide to use
LaGrande to make dirt-streaks, LaGrande fades the streaks downwards, always.
By the same token, front- and back-facing surfaces, which don't have a front to back way of aligning them, and on which you don't want streaks, you want to put them all together where you can mask the streaking easily; preferably along the top of the texture.
EDIT2:
Forgot to mention, the engine does not require it, but it is a mighty good idea to provide separate, reduced versions of the textures for each LOD. Otherwise, if a ship is beyond visual range, only the smallest LOD of the mesh is used, AND the lowest mip-map of the textures; but the full textures have to reside in the video-card taking up a lot of space, even if only the last mip-maps are being used.