HowTo:FullUnwrap6Seams2

From VsWiki
Jump to: navigation, search

Placing Seams (Part 2)

With the seaming up of the towers, it seems to me we've done well over half the seaming up work, so I decided to break the rest into a separate wiki page; --and because it was taking me forever to scroll to the bottom every time I saved changes :D

So, what remains is pretty much just the "greebles". The biggest greebles are the legs. Legs?! Yeah. This ship has legs; didn't you notice? Not for landing, but rather for boarding other ships. Anyways, the rear legs are larger than the front ones, so we'll start with them. They are mostly split, smoothing group -wise, but not enough... If I select one of the outer polys and Ctrl-L, we see that one smooth group is too non-flat:


blender_shot36.jpg


I wish all problems were so easy to solve...


blender_shot37.jpg


Proceeding to the front end of it...


blender_shot38.jpg


This piece is a prime candidate for unwrap from bottom view (top is already split; so are sides), except the front-facing part, so we seam it off:


blender_shot39.jpg


The magnetic shoe is fully split, except the outer rim...


blender_shot40.jpg


That's because the outer rim can so shade smoothly and give the impression of being round, from a distance. Of course, smooth shading can fool no one at close range...


blender_shot41.jpg


...but this is just a little greeble, anyways; and splitting the 8 sides would increase the number of vertices in the mesh too much for what it's worth. But, coming back to our present mission: How do we unwrap it? We coul place one seam and unroll it with Cylinder unwrap, but that would give us a long strip we might not know where to place. Or we could unsplit the sides from the top; but that would give us smooth shading with the top. What I think I'll do is leave the sides split from the top, but unwrap them together from top view; then pin the top edge vertices, and LSCM. So, nothing to do.


The piston will take a bit more work...


blender_shot42.jpg


Here's a faster and easier way to hide any materials other than the piece you're interested in:

  1. Select a single face of the thing you want to isolate
  2. Click the question mark icon in the materials panel in the F9 panel. This shows the material of your selection.
  3. Now click on the Select button, below and to the left
  4. Press Shift-H (to hide NON-selected stuff
  5. Press A to turn off the selection

BINGO


blender_shot43.jpg


The top facing and bottom facing rings are already split. All we need is a seam line to unroll the round things cylindrically.


blender_shot44.jpg


The square base is all split, of course. I've just changed my mind about the material for the piston, though... Two things I don't like: The part where it joins to the leg is made of a different material (can't remember which), but the leg is "stainless". I think the material of the force bearing parts should be the same as the leg. Number two, the telescopic parts should be a lighter and more matte material than my "titanium". Why? Because I don't like to see environmental reflections in pieces that are surrounded by other pieces that should show on the reflections but won't. So it should be matte; but at the same time, it's so hidden and dark in there that I almost can't see the pistons at all, so a light material is in order. I have one material that's perfect for this: "Matte White".


blender_shot45.jpg


Much better.

The front legs are a bit more complicated... First let's look at the smoothing groups by clicking on one facet at a time and Ctrl-L-ing:


blender_shot46.jpg

blender_shot47.jpg

blender_shot48.jpg


Simple solution for top and bottom unwraps from view:


blender_shot49.jpg


We'll do the same thing with the magnetic shoes at the front as with the ones at the back --i.e.: nothing to do.

Alright, let's tackle the hoses...

The hoses are going to be HARD to unwrap. Well, we could just cut them in half horizontally and LSCM them, but I don't want to do that; because I want to put corrugations in the bump map; and if I cut the hoses in half it will be very hard to match the corrugations on the two sides. And my corrugations will be either like rings or like a spiral, and that would be hard to do unless the hoses are straightened out. So, I want the hoses straight and in one piece, and the only way I know to do that is the painful way: vertex by vertex, pretty much. So, I'm going to put just one seam running along each hose. The best place to have the seam, of course, is where it's least visible: The underside. But even trying to do that doesn't immediately appear to be easy...


blender_shot50.jpg


Which, of all those lines, is the one at the lowest point, for each of the hoses? :-/

I'm often having to come up with new Blender tricks, and this is an example. This is what I just came up with and will do:

  1. Set the view to orthogonal, from above, transparent mode
  2. Set edge selection mode
  3. Alt-right click then Shift-Alt-right click 4 times in each hose's middle line
  4. Ctrl-E -> Mark Seam
  5. Then select and remove the 6 outer seams withe Ctrl-E -> Clear Seam

Why 4 times? Because I have hoses for the top and bottom engines, and each hose has top and bottom edges overlapping.

Okay, so, 1) Set the view to orthogonal, from above, transparent mode


blender_shot51.jpg


Shift-Alt-right-click 4 times in the middle line of each hose,


blender_shot52.jpg


Ctrl-E -> Mark Seam; then we can rotate the perspective a bit to verify we got 12 seams...


blender_shot53.jpg


Two seams in each hose, --top and bottom...


blender_shot54.jpg


Now, select the seams we don't want only:


blender_shot55.jpg


And remove them with Ctrl-E -> Clear Seam.


blender_shot56.jpg


Done! Well, don't forget the other 3 hoses, bottom engine.

I feel we're getting to the bottom of this thing...

The ring...


blender_shot57.jpg


First of all, what is it? Well, I put it there with the thought that it would telescope out, during a boarding operation, and serve as a pressurized port the marines use to invade the target ship. And what I think I will add to it in the texture is some cutting laser and stuff.

But, how do we unwrap it? I think that from bottom view it will be fine. We could pin down the dark rim and LSCM the rest; but even without LSCM it might be fine... Being that it telescopes out, vertical stretching of the texture might actually look pretty good... From bottom view it is; nothing to do here.

What's next? The big mass drivers, I guess...


blender_shot58.jpg


The fins are already fully split. By the way, I made their material "stainless", but being that they are heat radiators, I might as well make them of my "Hot" material, I suppose. The round muzzle right now is "titanium", but might as well, then, make that one "stainless". I'm thinking of putting as much detail as I can fit, on these mass drivers, including a ring of rivets, possibly, so I'm going to unroll them cylindrically, except the front facing front end... So, I'll seam out the front end, then put a single seam for unrolling the rest; which seam might as well be in the most hidden direction: towards the inside:


blender_shot59.jpg


Done! But what I also notice is that the seaming out of the wing is incomplete: That hole on the left of the mass driver, the inside of it is NOT split from the wing; more like a beveled shading without the bevel. But then again, I'm not happy with the way it shades...


blender_shot60.jpg


Rather than trying to fix it by beveling and adding more polys, I think I'll just split the inside...


blender_shot61.jpg


Better, but still no cigar... What seems to be the problem? Let's zoom in on it:


blender_shot62.jpg


Looks like those quads above and below the hole are not planar, but more like saddles. What I'll do is split the quads into two triangles that match the shading artifact, turn on normals, and look at it from an angle that allows me to see how the two normals diverge:


blender_shot63.jpg


The normals seem to actually converge, though the angle is pretty slight. This is consistent, though, with the fact that the artifact is pretty hard to catch. I'd never seen it until now that I was looking at the mass driver from close to the body. As soon as I rotated the angle a little bit, the shading artifact would disappear. I.e., the pics of the artifact above look pretty bad, but we're looking at it from the worst case perspective.

Shading artifacts, by the way, not always show on renders. Blender's internal renderer is not designed to highlight problems, but rather the opposite: to produce pretty pics at any cost; and accordingly it uses a better shading algorithm than the simple, linear normal interpolation done in a GPU. The best way to catch shading artifacts is to look at your model in Object Mode, Solid shading. The Object and Edit windows in Blender use the GPU for shading, so what you see is what you get in-game. Something to keep in mind...

Anyways, I think that, to correct the problem, all we need to do is grab the bottom-left vertex of the quad in the pic above, and move it "down" (towards the back of the ship, z-axis) a little bit, until the normals look parallel. But we could also move the bottom-right vertex "up" (forward). To be safe, I take a look at potential other artifacts that moving either vertex might introduce... And my descision is to move the bottom-right vertex. Why? Because the bottom-left vertex is at the corner of a long quad, the wing's bevel. Moving it might cause that long quad to become non-planar, and end up moving our artifact from one place to another. The bottom-right vertex is only attached to small polygons in the wing-to-body weld area; and if an artifact is introduced with them, it will be a much smaller artifact.

After trying it...

I was wrong. Moving either of those vertices back and forth, even large amounts, makes no difference to the shading artifact; none at all. This is a perfect example where one needs to learn to "think like a GPU"... very counter-intuitive. The problem is not with the triangles themselves, but with the triangles they attach to. The GPU computes vertex normals by averaging the normals of the facets sharing that vertex. If a neigboring face forms a sharp angle, it will define a crooked vertex normal, and that vertex normal will be interpolated linearly across the triangle. So, two triangles may be perfectly coplanar but shade differently if they are attached to polys that form different angles. Let's take a look at the vertex normals:


blender_shot64.jpg


THAT is the problem.

And I think I know how to solve: Just flip the triangles from...


blender_shot65.jpg


to...


blender_shot66.jpg


Bingo!:


blender_shot67.jpg


Except for a few minor artifacts that yielded to a few more triangle flippings...


blender_shot68.jpg


And you might ask how did I know that flipping the triangles was going to solve the problem. Well, I didn't know it, but I guessed it right, I guess. Thing is, the problem-causing vertex normals were a dispute between the three vertices closer to the hull. By making those 3 vertices define a triangle, rather than be part of two triangles, I was able to "confine their dispute", rather than let it have long range repercussions.

We're getting down to the tiny stuff now... The "knobs":


blender_shot69.jpg


No problemo: Top from top, the rest cylindrical:


blender_shot70.jpg


Next is the radar tower:


blender_shot71.jpg


But what I did, really, was to smooth-shade the whole structure, out of laziness, really. But the thing is, Blender's internal renderer doesn't show how artifactual the structure is, because it automatically "de-smooths" any angles sharper than 80 degrees. To get a better idea of what this would look like in-game, we look at it in Object mode:


blender_shot72.jpg


Looks like the tower got smoked out by an oilfield fire... And come to think of it, putting seams everywhere is not better than splitting polygons. Why? Because if a vertex is on a seam line, it neads a different set of UV coords on each side, which means it needs to be split. So, seamlines produce vertex splits in which the normals are kept the same. No performance advantage at all. So, how about we just split the thing? Click on a polygon, Shift-Ctrl-Alt-F->145:


blender_shot73.jpg


Y to split, then Tab to admire the result...


blender_shot74.jpg


...and we continue splitting until...


blender_shot75.jpg


...all split up, so, no need for seams. :D

What's next? The back of the synthetic aperture radar is already split, but the rest can be split into front view and spherical unwraps:


blender_shot76.jpg


Nah, changed my mind; I'm going to do a front view unwrap, pin dow the central region and LSCM out the rest. So, forget the above; no seams.

The back of the square radar dish is already partly split, and anyhow, I'm thinking of just LSCMing it. The pole that holds it is an 8-sided tube, though, and needs a seam to unwrap cylindrically.


blender_shot77.jpg


The other poles are square, and the cube boxes are cubes :); and not all of it was split but I just did. However the cables are smooth-shaded square section (diamond section, if you prefer) and can use a seam along.


blender_shot78.jpg


Proceeding to the bottom tower... The front and back sides of the tractor beam dish are split from each other, already;


blender_shot79.jpg


but a few seams are in order here...


blender_shot80.jpg


A single round seam for a sphere? Well, yes; it's really tiny, anyways; and it's an icosphere, which are more efficient, poly-count-wise, but harder to cut. I'll just LSCM it from front and back.

What about those clamps on the boxes?


blender_shot81.jpg


They weren't fully split but I just did it.

Under the engines, that orange control box is fully split, but the cylindrical base needed a seam.


blender_shot82.jpg


And the rectangular box under the engine was smooth-shaded but I just split it. The missile launcher boxes...


blender_shot83.jpg


... are well split already, but their bases can use a seam line for cylindrical unwrap.


blender_shot84.jpg


The light fixtures above the dockings were not fully split, but I just split them.


blender_shot85.jpg


We're basically DONE with the seams! :D

Before starting with the unwrap, though, there's something that's been bothering me all along: The catwalks are a half-assed job. Problem 1 is that there aren't enough posts to hold them or the handrails. I was trying to be miserly with the polys, but we got like 20k polys already and a few more is not going to suddenly kill the framerate. Problem 2 is that in the bottom catwalks, the vertical poles interpenetrate the hand-rails. Problem 3 is that there aren't enough lights, and the few I got there aren't properly adjusted, brightness-wise.

And why are lights important? Lights are mightily important in large ships! They come for free first of all, as they are too local to bother OpenGL with them. Instead, the light they contribute is precomputed off-line (in Blender) and baked to the light map (AKA the "glow texture"). And this precomputation is of high quality, with local shadows and all, so they enrich the final look of the ship more than anything else, really; and here I was being lazy about it...

Anyways, let's begin by tackling Problem 2 (the easiest). Here's the problem:


blender_shot86.jpg


And here's what I'm gonna do about it:


blender_shot87.jpg


Plus adding posts on the other side of the walks


blender_shot88.jpg


Plus, I'm going to cap the ends of the poles.

One thing that may not be clear to you is that we *will* know, in the texture, where poles and rails and catwalk intersect. We will know because of ambient occlusion baking. You'll be able to see the ambient shadowing the end of the poles produce on both sides of the catwalks and rails; so it will be possible, if we want to, to draw some kind of attachments. We could, on the catwalks, put orange bands that cross them wherever there are poles intersecting, which will give a huge feeling of consistency between geometry and texture, and between geometry and bumpmap. Something a lot of modellers and texturers tend to underestimate... Consistency is the most powerful virtue in modelling; and when geometry and texture are consistent, they become greater than the sum of the two.

I'm not going to show pics for every post I do this work for, though; but trust me, it will be at least 2 hours before I get back to editing this page ;-)



... (to be continued) ...




...

(Last step: Align vertices near x=0 to x=0, apply X-axis mirroring, and place the central seam.)