Home Technical Talk

Silhouette Masking

polycounter lvl 18
Offline / Send Message
Illusions polycounter lvl 18
Ok, I'm posting this before it leaves my brain, cause I just had one of those dreams that seems like a really innovative idea. Here it is:

Currently game engines render the silhouette of an object using the edges of the polygonal model it is rendering. However, with next-gen game assests there already exists a better representation of what that silhouette should look like contained partially within the normal map. In order for an even better representation, depth difference between the polygons on the low poly, and the high poly would be needed.

What a silhoutte masking map would be is a normal map, but with an alpha channel containing the difference in depth between the low poly and high poly models. When rendering, the in game camera would take into account the extra alpha channel to mask out the extra silhouette being drawn on the low poly that was not present on the high poly.

What this would accomplish is that low poly models built around high poly models would have silhouettes that look closer to that of their high poly cousins. What it would not do is allow a cube to look like a beach ball.

Since I'm not a scripter, and do not have a genius grasp of math, I have no idea about how to go about coding this, but I do know how it would work in theory, even the generation of the extra depth map (when the normals are being generated, the tracer would also take into account the difference in space between the high poly and low poly, and write that as a value in the alpha map. Black would be 0 difference in distance, white would be max allowable distance).

What this means is that we could spend those extra polys on adding details like chains, rivets, etc. instead of trying to make the silhouette look smoother.

Thoughts, comments? Cause it sounds good and patent worthy in my head, just need to bounce it off of people to make sure it isn't a crazy dream. crazy.gif

Replies

  • rooster
    Offline / Send Message
    rooster mod
    sounds a bit like silhouette mapping, but I don't know the tech? heres something I found: http://people.deas.harvard.edu/~xgu/paper/Silhouette_Map/silhouette_intro.html
  • pyromania
    Offline / Send Message
    pyromania polycounter lvl 18
    Relief mapping has a method for correctly rendering silhouette thats very close to your idea. It uses a height map instead of the difference between the high and low meshes.

    PDF
    http://www.inf.ufrgs.br/%7Eoliveira/pubs_files/Oliveira_Policarpo_RP-351_Jan_2005.pdf
  • Illusions
    Offline / Send Message
    Illusions polycounter lvl 18
    @ Rooster: Theirs seems to go about it an entirely different way, and seems to change the geometry as well. Mine would just be an extra channel added to the normal map, and an extra procedure added to how the camera renders the final output. The visual outcome would be similar though.

    @Pyromania: Dammit, thats pretty much what I was thinking of for how the silhouette would work. Oh well, it was a good epiphany moment while it lasted.
  • rooster
    Offline / Send Message
    rooster mod
    hm, from what I understood it renders the low rez/normal mapped model and clips the silhouette based on stored silhouette data, but I'm hazy on how that data is actually stored. It seems that those varying detail models are the result of different detail silhouette maps, and not the actual model geometry being altered

    I could have the wrong end of the stick though grin.gif

    edit: yeah maybe I'm misinterpreting the 'progressive hull simplification' part
  • Illusions
    Offline / Send Message
    Illusions polycounter lvl 18
    Well I could be wrong also, their explanation of how it works very vague.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Why not just model the silhouette you want? I think people are going a bit to far with the make a box, but then use a map to make it look round. Polygons are way cheaper than relief mapping and look better. One of the only games I've seen in a while that made use of the geometry budget on xbox360 was Tomb Raider Legend. Some dude at work the other day asked me if I could bake out an occlusion map for some windows I had modeled on a 500 polygon church, why would you want to remove the detail and replace it with a map? What would be the point? I've been alotted 100 000 triangles for one set, why the hell would I want to remove detail and replace it with a flat texture?
  • Illusions
    Offline / Send Message
    Illusions polycounter lvl 18
    [ QUOTE ]
    Why not just model the silhouette you want? I think people are going a bit to far with the make a box, but then use a map to make it look round. Polygons are way cheaper than relief mapping and look better. One of the only games I've seen in a while that made use of the geometry budget on xbox360 was Tomb Raider Legend. Some dude at work the other day asked me if I could bake out an occlusion map for some windows I had modeled on a 500 polygon church, why would you want to remove the detail and replace it with a map? What would be the point? I've been alotted 100 000 triangles for one set, why the hell would I want to remove detail and replace it with a flat texture?

    [/ QUOTE ]

    This is for adding detail, or reallocating it once you've reached that polygon limit, not removing it entirely.
  • EarthQuake
    [ QUOTE ]
    [ QUOTE ]
    Why not just model the silhouette you want? I think people are going a bit to far with the make a box, but then use a map to make it look round. Polygons are way cheaper than relief mapping and look better. One of the only games I've seen in a while that made use of the geometry budget on xbox360 was Tomb Raider Legend. Some dude at work the other day asked me if I could bake out an occlusion map for some windows I had modeled on a 500 polygon church, why would you want to remove the detail and replace it with a map? What would be the point? I've been alotted 100 000 triangles for one set, why the hell would I want to remove detail and replace it with a flat texture?

    [/ QUOTE ]

    This is for adding detail, or reallocating it once you've reached that polygon limit, not removing it entirely.

    [/ QUOTE ]

    I'm going to have to agree with malcom here. Just make your model have enough polys so you have a decent silouhet. Its going to be much cheaper than any other crazy alternative you can think up to fake it. Instead of making super low res models that look horrible and need super advanced shaders to look nice just spend a little more time on the low res, most decent engines are much more dependant on draw calls and fill rate than polycount, and shaders like that start to eat that stuff up really quickly if you had it on multiple models. Its cool stuff for tech demos but entirely useless for actual games imo. Besides, you're going to have LODs in most cases anyway, so dont drop so low for your level 0 mesh that you would even consider doing something like this.
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    I'm all about modeling, it's fun. I was wondering what polycount I should start using nwo for my next gen reel. When I made my first reel back in 2000 I was making characters with a 5000 poly limit they had all their fingers moving eyes, mouth. For the last six years I have kept polygon counts low 2000 or less tris. Now I'm wondering if I should just make all my new models with higher polycounts. say make a tank or character with 5000 tris. Thanks.

    I have seen books showing off how to use alphas to keep polycounts really low. However in many of the examples it seemed that using the lower poly version with the alpha was just as expensive, but looked nicer in certain views.
  • Eric Chadwick
    Sage, I think EarthQuake said it well... fill rate (shader instructions) generally costs more framerate than vertex count (polys). Even alpha-test (clipmapping, screendoor, billboarding, whatever you like to call it) which is super-simple is actually often slower than pure polygons. Or at least that's true for us on PC hardware, I'm unsure about it on consoles.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Sage we had 5000 poly characters on the ps2, you're welcome to go up to 24000 for one human depending on the game.
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    I believe the majority of the ones we did for Stacked, were about 5000. But with 10 on screen (50k) it left little budget for my environments frown.gif
  • EarthQuake
    5-10k is generally a good range, depending on how complicated the character is.
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    Thanks for the feedback, very helpful.

    Alex
Sign In or Register to comment.