Bad Apple  Bad AppleBad Apple
 Maps Drivel
----------

Completed maps

The Junkyard

Tutorials

 

 

 

 

 

q3map2

simland

Bad Apple

Lighting problems in simple maps

There's a problem in the Quake 3 engine that is commonly referred to as the fullbright bug. If you have just done your first compile of a simple test map and it appears unlit in game, then this bug is probably what is up. Apparently, what is going on is that the renderer doesn't render any lightmaps if all the lightmap data is held in a single texture or 'page'. Since in more complex maps this is never the case, id has quite understandably never considered it worthwhile to fix it.

Obviously, a small box room is a pretty good candidate for being to fit all of its lightmap data into a small space, so it's a common problem met by first-time mappers. Check the compiled map's size. Look in your baseq3/maps folder for the yourmapname.bsp file. If the file size is less than 400K there is a good chance the engine will be unable to render the lightmap due to the bug.

Try some of the following tricks if your map seems to be fullbright. Do all of them, not in any particular order.

Toggle the console. This used to work in older versions of Q3A, and would cause the engine to start rendering the lightmap stages. I haven't tried this recently, but in some of the later point releases I was unable to create a test map where it has worked, but it is still worth a try since it's the solution that requires least effort.

Cheat to get the BFG. Assuming you loaded your map into Q3A using the /devmap command, you can use the console command /give all to get all the weapons and select the BFG. Something about the BFG's shaders seems to kick the renderer into gear when they are loaded, and hopefully you will be able to see your lightmap now.

Check that your map didn't leak. If you are using a recent version of GTKRadiant and have compiler monitoring switched on in the preferences, you will have received an obvious warning about any leak that you shouldn't have ignored :P If you are using an older editor you may need to investigate further.

Check that the size of the compiled yourmapname.bsp is significantly larger than 400K - if it is then the lack of lighting is almost certainly due to a leak. If your map leaked there will be a file called yourmapname.lin in your baseq3/maps folder with a very similar timestamp to yourmapname.bsp. Load your map in Radiant, then choose the Load Pointfile option from the menu. A red line will appear, starting at an entity, and eventually escaping through a gap into the void outside the map. Fill in the gap. Compile again, and keep filling holes until the compile doesn't report another leak. (On some systems you will need to get the 2D or 3D views to refresh before the red line is drawn.)

Check that you have actually run the light stage of the compile. It's easy to do this if you aren't familiar with the tools. If you're compiling from the Radiant menu, make sure the option you are using actually has 'light' in it. If you're using a front end, make sure the relevant boxes are checked. If you're using a batch file, you're probably smart enough to know how to light your map, move along :)

If none of the above helps, don't panic - you can easily add some junk to the map just to prove that the tools work. For the sake of a demonstration, save your basic room map as lighttest.map, so that you don't mess up your original file with stuff you won't want to keep. Add another hollow box that is about 1024 units square and 512 units high directly around the outside of your original room, the exact size doesn't matter, you want it fairly big but not huge. (If you know how to use CSG hollow it's OK to use that here for the sake of speed, since this is only a test map not your great magnum opus). Draw a brush that is about 64 units square on the XY plane and stretches from floor to ceiling in this outer space. With the brush selected, choose the Cylinder option on the Curves menu. Use the space bar to clone the cylinder and position a few of them in the outer room. Finally add a light in the outer room - if you don't have an entity in there the BSP process will ignore everything out there and you'll still get an unlit map.

Hopefully when you compile this map, all the crap outside the main room will lead the compiler to create at least one additional lightmap page. Of course, you still have your original file without all that junk to edit once you're happy that lighting does actually work, because you saved the new version with a different filename.


Copyright 2001-2011 Tom Waters - goriki@hotmail.com

Bad Apple is not intended for readers under 18 years of age, goats, emus, flukes, capybara, users of CSG subtract, or people who like the name Gary.