Home Technical Talk

Tips on using vertex colors to light levels??

polycounter lvl 16
Offline / Send Message
Minos polycounter lvl 16
Hello guys. I've been doing lots of vertex baking to light my levels recently and it's quite fun! It's a bit frustrating sometimes however, as results are quite unpredictable most of the time.

I've come across his tutorial and its a nice start:
http://www.urgaffel.com/tutorials/vptut/index.html

It does not go into much detail however. So I've come here to almighty polycount to ask for tips and best practices on modeling with vertex baking in mind. What little tricks you guys know, shortcuts, past experiences with this technique etc...

Thanks in advance =)

Replies

  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    You work at Ubisoft so I assume you already looked at Beyond Good And Evil :P? Its all vertex lit but they hide it very well. Also make sure your rendering the vertex colors with 2 or even better 4 times modulation (TextureColor*VertexColor*4).
  • Minos
    Options
    Offline / Send Message
    Minos polycounter lvl 16
    You work at Ubisoft so I assume you already looked at Beyond Good And Evil :P? Its all vertex lit but they hide it very well. Also make sure your rendering the vertex colors with 2 or even better 4 times modulation (TextureColor*VertexColor*4).

    hmm how do I change this modulation? Is it an engine feature?

    My biggest problem with vertex colors so far is that I'm not able to make my textures bright with it. Ex: If I paint a face pure white it shows the texture at 100% self-illum instead of actually painting it white. That causes my lighting to look sort of washed out.

    Example:
    4337790c02d0b820488417b4a6ed327123071d3.jpg

    I'm not sure if this sort of effect is possible with vertex colors only though. Perhaps it's only a modified texture?
  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    yeah thats something your engine or the shader will have to handle and yes stuff that brightens up the textures is MUST other wise you'd have to add hot spots around light sources with additive decals but its a pain.

    something that i like to do for ground stuff like terrain and streets is bake a highres-lightmap
    than cut around the direct shadow line one line of verts that is guaranteed to be in shadow and one that is guaranteed to be in the sun and than make em tighter or wider depending on how far away form the shadow caster ( penumbras \o/ ) than discard the second uv set and the lightmap and rebake it into the verts

    something i used on this map alot ( the entire map is vertex lit )

    dm-grand-diablo_02.jpg

    also adding an extra tight cut around a buildings corner can give you a cool rim lighting fake effect that makes 3d geometry alot more readable !
  • Minos
    Options
    Offline / Send Message
    Minos polycounter lvl 16
    warby wrote: »
    yeah thats something your engine or the shader will have to handle and yes stuff that brightens up the textures is MUST other wise you'd have to add hot spots around light sources with additive decals but its a pain.

    something that i like to do for ground stuff like terrain and streets is bake a highres-lightmap
    than cut around the direct shadow line one line of verts that is guaranteed to be in shadow and one that is guaranteed to be in the sun and than make em tighter or wider depending on how far away form the shadow caster ( penumbras o/ ) than discard the second uv set and the lightmap and rebake it into the verts

    something i used on this map alot ( the entire map is vertex lit )

    dm-grand-diablo_02.jpg

    also adding an extra tight cut around a buildings corner can give you a cool rim lighting fake effect that makes 3d geometry alot more readable !

    Cool ideas, thanks a lot warby =)
  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    if you develop nds games like in your example, you just can mulitply vertex colors once. therefore everything will just get darker.
    this kind of sucks, but i haven't found a good solution, as there are no add modes. all you could do is paint some of your textures in white and greyish details and then color your level just with vertex colors. this is what i've seen in metroid hunters or the final fantasy games on the ds. and you can use white alpha gradient decals for highlights...
  • Minos
    Options
    Offline / Send Message
    Minos polycounter lvl 16
    fade1 wrote: »
    if you develop nds games like in your example, you just can mulitply vertex colors once. therefore everything will just get darker.
    this kind of sucks, but i haven't found a good solution, as there are no add modes. all you could do is paint some of your textures in white and greyish details and then color your level just with vertex colors. this is what i've seen in metroid hunters or the final fantasy games on the ds. and you can use white alpha gradient decals for highlights...

    Yeah this seems like the solution. I took a closer look at Final Fantasy IV and noticed they used gradient decals for bright areas, as the one in the example image.
Sign In or Register to comment.