Announcement

Collapse
No announcement yet.

Create BSP files with modified lightmaps.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create BSP files with modified lightmaps.

    So I posted under Quake Central, but I probably should have posted it here (I don't mean to double post).

    http://quakeone.com/forums/quake-tal...bsp-files.html

    If anyone is interested in this tool, don't hesitate to ask. Right now, I don't have an official tool, just proof of concept. But I can make one for people to use.

    The tentative process is:
    1) Run the program with the extract command and 1 parameter specifying a BSP file for input - this will create a wavefront OBJ file with just the lightmap texture coordinates (the OBJ file only allows one set of texture coordinates per face) excluding all faces with water/lava or sky textures, lightmap data file (store offset and size per face to within a bitmap), and a single BMP file containing all the lightmaps (for all faces).

    2) In a model editor of of your choosing (I used blender), import the OBJ file and bake your lighting information into the new bitmap with the same resolution as the 1 from step 1 (the lightmap data used in the next step will require the resolutions to match)

    3) Run the program with the replace command and 4 parameters specifying the name of the source BSP file for input, the name of the output BSP file, the bitmap image and lightmap data file to create a new BSP.

    Right now, the tool works great for static lighting. I have to figure out how to make it work with animated lights (such as the spotlight in rock1/rock2). If no one replies to this thread, I'll assume this tool isn't needed and I will not work on this anymore.

  • #2
    I like having tools that allow us to change maps in new ways. I assume you can figure out a way to write text in light maps with this setup? (I don't have a real model editor to try).

    Animated lights are handled by the mod and the engine. Far as I know, they simply control the brightness of a map (as seen in engine code function R_AnimateLight()).

    Comment


    • #3
      if you want to have some fun with it, fte has a lightmap_scale feature that can be used to override the 1:16 lightmap:worldtexture resolution ratio. set it to 1 if you want insasnely high-res lightmaps that would more gracefully support things like words written on walls.

      each surface has up to 4 different lightmaps. each per-face lightmap references a lightstyle that is used to look up the per-frame style values (64 of these in vanilla, with the format itself having a limit of 255 - the extra one means unused).
      tbh the only practical way I can think of dealing with that is to just preserve those other lightstyles without editing them. its a bit too unwieldly otherwise.
      Some Game Thing

      Comment

      Working...
      X