Home Technical Talk

Hi/Lo Baking - Silhouette Issues

polycounter lvl 11
Offline / Send Message
Sastrei polycounter lvl 11
Hi all,

I'm baking hi poly versions of Lego models to low poly game models for use in my mod for HW2 (http://boards.polycount.net/showthread.php?t=52808). However, I'm having issues with where segments of the mesh intersect.

In the high poly, these are smoothed, subdivided cylinders, while in the low poly, it's a simple octagonal cylinder. Naturally, this produces a round silhouette on the low poly model, which doesn't match up with actual geometry. I've included a pic to hopefully show better what I'm talking about. Note the areas outlined in red.

silhouette_errors.jpg

So my question is this - is this a problem encountered in "typical" models and if so, how is it corrected or addressed? I should note also, I can't simply bake the chunks seperately, as many individual Lego pieces have these problem regions, and it would be an absolute nightmare to try to manage them.

Thanks in advance, and my apologies if I missed a previous post on this topic!

-Stefan-

Replies

  • nezach
    Options
    Offline / Send Message
    Oh man, I think I had that Lego set! Too cool!

    I see your problem. Not 100% sure what's happening in your model and UV layout without the wires. Do you need the parts separated/dead UV space in those particular areas? If you don't I would delete those faces and bridge the remaining open edge faces. Remember to crease the edges for sub-d time. Possible bonus: More UV space!

    If not, well there's correcting by hand. The AO spread on those faces looks pretty uniform, just clone, blur, or copy pasta until it looks how you want it.
  • Sastrei
    Options
    Offline / Send Message
    Sastrei polycounter lvl 11
    Here's the high poly shaded, lo poly with baked AO, and lo poly shaded views.

    Okay, so is there a way to get Photoshop CS2 to bleed an edge pixel of a selection by a certain amount? Like UV margins, only with Photoshop selections instead.

    I'm not entirely sure what you mean about the dead space in the uv and the open areas. The texture error in the bake is caused by the round hipoly object butting up against another object. But since the lo poly geometry isn't nearly as round, it leaves a black circle on the texture, which is unsightly to my eye.

    Oh, and a note on the mesh topology. On the low poly, that main cylinder simply goes through the box, they are not manifold.

    6951_bake_error_02.jpg
  • Illusions
    Options
    Offline / Send Message
    Illusions polycounter lvl 18
    Simple suggestion: Bake AO for the low to itself as an extra AO map, then in Photoshop, use the low poly AO bake in the regions with the problem.
  • nezach
    Options
    Offline / Send Message
    Sastrei wrote: »
    I'm not entirely sure what you mean about the dead space in the uv and the open areas. The texture error in the bake is caused by the round hipoly object butting up against another object. But since the lo poly geometry isn't nearly as round, it leaves a black circle on the texture, which is unsightly to my eye.

    Oh, and a note on the mesh topology. On the low poly, that main cylinder simply goes through the box, they are not manifold.


    Ok, by dead UV space I mean its not being used on a detail that's going to be seen. If you have a face with something abutting it or another chunk O geometry inter penetrating it, the covered areas still have UV space assigned to them but that area could be considered "dead" as far as usefulness in displaying textures to the viewer.

    Clear as mud still?

    Now, it may be there's a reason to keep the geometry all modular and seperated, in which case that's all part of the plan and will have to be lived with at some level. If not, then you could free up that occluded texture space for details that are actually going to be seen with some (minor IMO) rebuilding to make objects manifold.

    In Photoshop you can set the selection Feather by pixel value, or you can go into Quick Mask mode and use standard filters and tools on the selection area.

    Hope this helps.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Can't you just add some more polys to that cylinder so that the silhouette matches a bit better? It looks really low poly at the moment, maybe unnecessarily so. Adding 8 more edges to round it out would only add 16 triangles.
  • Pedro Amorim
    Options
    Offline / Send Message
    i think you need to use the exploded mesh technique so that problem doesn't occur. That happens probably because of intersecting meshes.
  • Sastrei
    Options
    Offline / Send Message
    Sastrei polycounter lvl 11
    Bitmap - exploded mesh? Will google it up (and a quick search turns up nothing for Blender), and I think I know what you're talking about, but I'm not sure it's possible in Blender. You're right though, all the same.

    MoP - Adding more polys I agree would likely minimize the issue, however, the model shown at the bottom of the post clocks in at 6924 triangles already with 8-vertex cylinders on all the round stuff (it's fairly optimized too), so I'm hoping to avoid adding more polys. Since many cylinders of differing sizes butt up against each other in the different models I'm making, I'm hoping to avoid changing the resolution of those cylinders, since I assume it would look odd (and does to me, at least). I'll try it out though.

    Nezach - Thanks for clearing that up. I knew what you meant by dead space in the uv's, but not how it was related to the problem. Oh and what dead space there is I traded for a reduced poly count, so that was a conscious decision. Thanks for pointing that out though, I'll have to remember it if I have similar areas in other models. I can see what you're saying about how to solve the problem though. Scale in the areas with a bad bake on them, so they're hidden by the other geometry, right?

    Thanks for the photoshop tips, but they all seem to involve adding to the image - there's no way to scale down a selection and stretch a 2 or 3 pixel margin at the edge of the selection, is there? I realize I'm not saying it very accurately, can't think of how to say it better.

    Also - I bevel the meshes instead of creasing them for the highpoly - any opinions on which is the better one to use? Also, that lo-poly can't be subsurfed, it would look horrendous. The high poly is made of individual pieces (each brick is a discrete mesh).

    Illusion - Thanks for the tip. I do that already in fact. Used it to solve the problem on a previous model, but while it would solve the problem on that main segment, it wouldn't work for the smaller cylinders at the front of this model.

    Oh, another note on the geometry, the model's mirrored down the centerline if it wasn't apparent already - conscious decision again, the tradeoff between a few extra polys and extra texture space (though that may sound hypocritical in light of my previous comment).

    And a final note - I'm somewhat of a perfectionist (or just OCD), so if there's something that I'm missing because I want it to be perfect, and either no one will notice or it's simply a waste of time to be perfect on in these models, just bitchslap me and tell me to settle for "good-enough". :)

    542014792_28ad1b893d_o.jpg

    And a final note, because it inevitably comes up - I think the models look fine with only textured studs (those bumps on top of Lego bricks), and that they add far too much to the poly count to physically model them. Any opinions on studs/no-studs?

    Thanks for the comments so far!

    -Stefan-
  • rooster
    Options
    Offline / Send Message
    rooster mod
    needs studs man :)
  • EarthQuake
    Options
    Offline / Send Message
    First off what is meant by exploding your meshes, is simply making a copy of your lowpoly after its uved, offset each piece by some generic unit. And then offset your peices in your highres mesh as well, then bake out your normals.

    Heres a little bit i wrote up on the exploding mesh stuff, and AO workflows.
    EarthQuake wrote: »

    After you have your highres, and lowres meshs:
    Uv your lowres
    Make a copy of lowres mesh
    Explode copied version in low, and in highres
    Save out orig version
    Bake from exploded meshes
    Load up the final lowres mesh in the "Simple AO tool", bake a texture the same resolution as your other textures and bam, composite this image in with the other ambocc texture, edit out the shadows on parts that need to move etc.

    This could also be done with max etc if you dont like the quality of the simple ao tool for lowres meshes, i usually blur the map a little and spend a few seconds painting out errors. Also be sure to make a layer mask for parts of your mesh that would need to move, so it doesnt have ambocc on it.

    Theres actually a few extra practical advantages to doing it this way as well:

    1. When using floating geo, you'll often get ambocc artifacts that you need to paint out, if your mesh is exploded and you have seperate layers for high and low frequency ambocc its easier and quicker to paint out these errors that it is when you have the small shadows along with the large shadows both in the same texture.

    2. Matching the exact silhouette of the lowpoly is actually a more desireable result than that of the highpoly.
    Example: You have a 32 sided cylinder intersecting with some other shape, if you bake the ambocc directly from the highres you'll get a perfectly round shape. If you bake it from the lowres you'll get a shape that actually fits your model instead of just hurting the mesh by point out how jagged your lowres really is(via the contrast from the 12 sided guy casting a perfectly round shadow, not matching up correctly etc).


    Heres a comp of what goes into my lightmaps for textures
    1. AO from exploded
    2. AO from lowres
    3. 1+2 combined
    4. Extra fluff, gradient baked down, NM thrown into crazy bump to create detail map, then overlayed, etc
    5. Final diffuse

    lmcomp.jpg
  • nezach
    Options
    Offline / Send Message
    Thanks for reposting that EarthQuake. I learned a bunch of good stuff there. Question based o the images, are you setting your "dark" on the AO pass to something like 50% grey, or do you correct levels after output?

    Sastrei, it sounds like you are looking for the Expand and Contract options under the Select>Modify menu in Photoshop.
  • EarthQuake
    Options
    Offline / Send Message
    I correct the levels, or simply change the opacity of the layer until i get the results i want. Never be affraid to manually tweak ambocc maps! Also adding a bit of color for things like skin etc can really go a long way with ambocc. Same principles apply as they do in paining, you wouldn't shade skintones with pure black so never multiply your ambocc as pure black for that stuff either =)
  • Sastrei
    Options
    Offline / Send Message
    Sastrei polycounter lvl 11
    I think I've found a partial fix based on what you've all been saying - involves selecting an area off the uv map and using that to delete the problem areas in the hi poly bake. I'll post pics later and if I can get all the model tidied up, just wanted to drop a note in the meantime. Definitely learning alot, and understanding the idea of "do it in post!"

    -Stefan-
  • Sastrei
    Options
    Offline / Send Message
    Sastrei polycounter lvl 11
    Earthquake - Thanks for the tip on tweaking the baked maps. I was too bent on using them as is, when a quick fix in Photoshop worked in most instances. Your workflow as well was very helpful to see - mine was almost exactly the same, sans exploded mesh of course. It also reinforced that I was on the right track with many other aspects of the bakes.

    Nezach - While I don't think the question was directed at me, I set the energy level to 2 (so twice normal) for my ambocc bakes. Blender also has a new noiseless ambocc, called approximate, but it produces some funky results at times. And no, select/contract wasn't what I was looking for, but it was what I ended up using. :)

    And so, here's the fruits of the labor! In the Homeworld2 engine, if y'all want I'll upload the texture map too.

    6951_ingame.jpg

    -Stefan-
Sign In or Register to comment.