Home Technical Talk

Lightmaps seem sucky.

polycounter lvl 18
Offline / Send Message
John Warner polycounter lvl 18
I'm workin on some environments in the unity engine. we're using lightmaps rendered from maya to light the scenes.

My beef with the lightmap thang is that it's impossible to get the surface brighter than the local color of the texture, because the lightmaps are applied in multiply mode.

Right now we can use lightmaps to shade our environments, but we can't really illuminate anything. this is a bit of a pain in the ass, because we could get some awesome effects if we could do that.

does anyone have any solutions for this issue, or any tips for a better workflow?

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Don't you have any control over how the lightmaps are applied? Or are they some sort of hard-coded material?
    If you have access to the shader you could easily change how they are blended.
  • John Warner
    Options
    Offline / Send Message
    John Warner polycounter lvl 18
    Hey MoP, yeah, we can get access to the shader... but we dont know much about how to actually do it. oorrr we didn't, anyway:

    my friend just msned me and told me that we can take the whole color range and multiply it by like 4 or something.. so it basically expands the entire range. he says that it looks great.. so we're gonna give it a lil' shot.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah if you have access to the shader you can pretty much do anything you want with the lightmap blending over the underlying textures - it's just maths... think of it as numbers instead of colours and stuff makes a lot more sense.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    Try adding the lightmap and then multiplying it again, or try multiply with a lerp. There's all sorts of things you can do with the shader. You can always play around in shaderfx to get the look you want, then write the actual shader code. I've found it's much faster to prototype and experiment that way.

    Also, if you find something in photoshop that works and you don't know how to implement it, here's a source for the math involved in blend modes:

    http://www.nathanm.com/photoshop-blending-math/
  • John Warner
    Options
    Offline / Send Message
    John Warner polycounter lvl 18
    hmm yeah alright. awesome. thanks a lot guys. We're shelling out the cash for unity pro today.. so well be able to edit the shader stuffs...
Sign In or Register to comment.