Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: static lightmap on large polygons

  1. #1
    Intern Newbie
    Join Date
    Jun 2001
    Posts
    34

    Question static lightmap on large polygons

    Hello,

    I'm working on a glow effect that illiuminates lower parts of walls if the floor in my scene has a glowing texture. My problem: I cannot use any texture atlas or uv lightmaps and the wall polygons can be quite large so that the base texture can repeat. Can I do this somehow with a single lightmap texture and multitexturing and GLSL or do I have to render smaller polygons in a second passe?
    Since the base texture gets darkened by the ambient vertex color in the first pass I'm afraid that the lighting effect will not be satisfactory when I use multiple passes.

    Any ideas in how to make this work?

    Thanks
    Saski

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    716
    Rasterizer are not very good at these kinds of lighting interactions between objects in the scene; pretty much anything that is not direct illumination from a light source is somewhat difficult to capture. If you have a texture that contains the contribution of static light sources in the scene on a surface (aka a lightmap) it is up to you to combine it with other textures on that surface. I'm not sure I understand the part of the question regarding use of multiple textures.
    When computing lighting in multiple passes you need to make sure that each factor contributing to lighting is calculated in exactly one pass. For example if your lighting model contains ambient, diffuse and specular components you could do two passes: the first one handles ambient and diffuse and the second one does the specular component (but does not add ambient contribution a second time).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •