Home Technical Talk

Typical lightmap seams that won't go away.

I'm having some trouble with my lighting / light maps.

There's some seams and weird lighting artifacts. Everything is snapped to grid / perfectly aligned, but these things keep happening! Lighting is at a production level too. Any help? And they only happen on certain walls.

Lightmaps are at a 128 at the moment. I've tried upping it from 32 --> 128, but it's still wigging out :|
Even went up to 256, it makes it BARELY less artifacty, but it's still there and I'm not trying to render 512 lightmaps.

Any help?

4Ou4Wbg.jpg
dTKe5LP.jpg
qyQ8d5H.png

Replies

  • stevston89
    Options
    Offline / Send Message
    stevston89 interpolator
    Move the 2 shells at the bottom inward and upward. There is no padding for them to bake at the edge of the map. Same goes for the shells at the top. At least thats what it looks like to me.
  • Abdullah
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Here's a better tip.

    Don't make long walls by snapping together several perfectly flat rectangles.

    What you do instead is put a texcoord multiplied by two variables into your master shader. This makes it possible to change the UV's per shader.

    Now go and make several instances of the shader and only change the tiling in one direction. I usually call them "1x" "2x" etc.

    Then non-uniformly scale your single cube in one direction by the amount you've increased the tiling and apply the appropriate shader.

    This has the added bonus of reducing the number of objects in view at any one time while not increasing the memory cost. It can be a huge performance win. And you get nice continuous wall pieces with zero seams.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Wouldn't having multiple shader instances have a similar impact on performance to having multiple meshes? Or are shader instances "free"?
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    ZacD wrote: »
    Wouldn't having multiple shader instances have a similar impact on performance to having multiple meshes? Or are shader instances "free"?

    Shader instances are very cheap. They're not new versions of the shader code. This is why you create master shaders instead of just making new shaders for each object.

    Also, by using this technique, you're shifting the load from the CPU - which renders scene instances - to a smaller load on the GPU which handles shaders.

    And remember you're only placing one new instance for several meshes you replace. It's the actual in-level instances that are the performance problem so you might only need to create one new shader instance to remove 300-200 meshes from a full size level.
Sign In or Register to comment.