Self-shadowed bump mapping

Discussion in 'Art' started by MOOtant, Aug 21, 2009.

  1. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    Valve added new option to their LightmapGeneric shader in Orange Box. You can change old bumpmaps to self-shadowed bump maps after compiling them with Valve's tool (see Valve SDK wiki).

    It runs faster than traditional bump map and looks better. Map/material authors should use this shader option.
     
  2. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    DO EET.

    Looks great on bricks.
     
  3. DrummerX

    DrummerX Empires Tyrant

    Messages:
    1,193
    Likes Received:
    0
    Trophy Points:
    0
    can we some examples useing the default emp materials?

    Been wanting to learn about bump-mapping (i know it's easy, just haven't read up on it)
     
  4. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    http://developer.valvesoftware.com/wiki/$ssbump

    You need to have basetexture and a heightmap. You feed heightmap to height2ssbump and you get a self-shadowed bump map.

    There is no need for traditional bump (normal) map

    It's just a bump map in a different basis (vectors used in radiosity instead of (1,0,0),(0,1,0),(0,0,1) where all channels are multiplied by occlusion factor. That's why colors are different than in traditional bump map.
     
  5. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Oh they released height2ssbump then?

    Does it look as good as the ssbumps in episode 2? I tried it ages ago with a 3rd party tool and it looked like ass.
     
  6. DrummerX

    DrummerX Empires Tyrant

    Messages:
    1,193
    Likes Received:
    0
    Trophy Points:
    0
    Wow that really looks awesome. The link in Moo's post has a couple images that highlights the effects.
     
  7. Jessiah

    Jessiah Member

    Messages:
    2,947
    Likes Received:
    0
    Trophy Points:
    0
    What link?
     
  8. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    http://developer.valvesoftware.com/wiki/$ssbump

    Not all links are blue.
     
  9. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Hmm, I think I still have a sort of heightmap somewhere for the walls in king, I'll do a comparison shot.

    Actually no i won't because it eats all my memory when I try to get it to do a 2048 texture.

    I guess I could try upscaling the normal map from 1024 and then add the full resolution specular map in on top of it.

    For some silly reason source requires that you put the specular map in the alpha channel of the normal map, which means I need to use a 2048 normal map when I actually only need a 2048 specular map. The diffuse map is only 512 I think, it's only the specular map that looks bad at lower resolutions.

    Stupid game.

    Ok I'm processing a 1024 texture, this takes far longer than the other program I used so maybe it's doing something.

    Ok, it takes forever but it does produce a different output image, I'll test it in action.

    Edit:

    It looks absolutely godawful.
     
    Last edited: Aug 22, 2009
  10. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Okey dokey I had a few more goes and I got it to work without looking unspeakably bad.

    However, I am not convinced of exactly how good it is.

    This is king with the normal textures:

    [​IMG]

    And this is king with the ssbumped alternate textures:

    [​IMG]

    Absolutely identical FPS, but a different look.

    The dark bits are darker, the light bits are lighter, the shiny bits are not very shiny.

    Personally, I think the original ones look better, they certainly look more like what I wanted them to look like than the SSBumped ones do.
     
  11. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    True but you weren't planning to use SSMapping.
     
  12. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    I know, but people wanted comparisons, and considering I used more or less the same method I did to make the other ones, this illustrates the difference.

    SSbump is like running the contrast adjustment over the diffuse map before you make the texture.

    That's about it.

    Oh yes and it has some magical macguffins in it to make it look better when you shine lights on it from odd angles.

    However as source doesn't have any capacity for moving lights apart from the flashlight and nobody designs an empires map where you need to use the flashlight constantly, this isn't terribly helpful.
     
    Last edited: Aug 22, 2009
  13. Mkvenner

    Mkvenner Member

    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    0
    from those pics, there isn't a very noticeable difference, maybe try with some different map textures

    is there anywhere with bricks in empires? there should be just for SSBump :D
     
  14. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    There aren't that many maps with older buildings in it, but current district has them in the sewers, iirc. That specific texture is a standard one, so you'll only need to include a new vmt and ssbump map, if you can generate it.
     
  15. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Fffff

    Hang on I'll give it a go. Give me like half an hour.

    That's a standard source material, and it doesn't have a normal map anyway, I'll find a better example.

    It would help if there were actually heightmaps for any of these things, as it stands it's kinda hard to find one that happens to have dark bits on the diffuse map where the recesses are, that's half the reason I chose the king ice texture.

    Ah fuck it, everything either isn't suitable or looks like ass.

    SSbump mapping is pointless as it doesn't seem to have any performance impact and empires doesn't take place in pitch black caves. The only reason I would use it is if I was using the parameter to prevent texture stretching as that requires you to use ssbump mapping if you want any normal maps on it at all.
     
    Last edited: Aug 22, 2009
  16. Mkvenner

    Mkvenner Member

    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    0
    well it wasn't a waste of time at least we know what it would be like
     
  17. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    Heightmap is used to darken bits that are occluded. You shouldn't need to darken the diffuse.

    If you wanted to make ice texture then I can say that you failed in both cases.
     
  18. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    In the extremely unlikely event that I require you to do my critical assessments for me I will ask you to, until then please do not feel compelled to go to the unneccesary trouble.

    My point was that all it does is make the recessed areas darker, which can be acheived by simply drawing on the diffuse map, or even by simply overlaying your heightmap (which you need to generate the texture) over the diffuse map in photoshop. It may have a use if you were constantly lighting the texture from extreme angles parallel to the surface itself (like you do in the episode 2 caves with the flashlight) because this would make the occlusion effects visible, but as empires maps are not and should not be that dark, and because they very rarely use light fixtures, being lit primarily with a single environmental light, there is absolutely no point in using ssbump maps. They evidently do not perform better, nor do they look any better under ordinary lighting conditions encountered in empires. The only reason you would use them is as I said, if you were using the non-stretch shader parameter, because that apparently is not compatible with ordinary normal maps.

    Empires is therefore possibly the least suited game on the engine to use ssbump maps, most games would get a use out of them simply because of wall-mounted light fixtures, but empires doesn't have those in most maps, and when it does they are usually mounted on completely flat concrete, and so would not create any noticable occlusion effects either.
     
    Last edited: Aug 22, 2009
  19. Sherbie

    Sherbie Member

    Messages:
    441
    Likes Received:
    0
    Trophy Points:
    0
    The ice texture could use a specular map to make it look more icey.

    Other than that I think it looks good.
     
  20. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    It already has a specular map.

    As I said, don't feel as though you must offer advice as I have almost certainly already thought of it.
     

Share This Page