Bzcommand.com
September 04, 2010, 04:37:39 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the Battlezone Command Community.
FishDotXSI Battlezone Complex Battlezone Realm  Bz2MD  Bzuniverse  BzScrap TimeDisruptor 
 
  Home   Forum   Help Search Groups Gallery Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Add lightmap to your BZ2 maps  (Read 60 times)
GreenHeart
20th Century Mod
Rattler
**
Offline Offline

Posts: 77


20th Century Development


WWW
« on: July 03, 2010, 12:27:07 AM »

Add lightmap to your BZ2 map
By Appel


You can create a lightmap from BZ2 maps using the Winter utility to export a BMP heightmap image and then by using the L3DT program to create the lightmap.

Lightmaps can be overlayed over the colormaps in Photoshop.


Steps:

1. Open Winter utility
2. Load a terrain (some existing map)
3. Export Height to a BMP image, e.g. heightmap.bmp. Also export color to color.bmp.
4. Open up the L3DT program.
5. Import the heightmap.bmp image.
6. Go to Operations > Lightmap > Generate map
7. Tweak with it to find the right setting, don't forget the shadows.
8. Once the right lightmap has been created, export it using the File > Export > Export active map ... save as lightmap.bmp

9. Open up Photoshop, and open lightmap.bmp and color.bmp.
10. Put the lightmap.bmp over the color.bmp, and set color mode to Luminosity. You can tweak with it however you like.
11. Flatten image and save as BMP as newcolor.bmp.

9. Load up newcolor.bmp in the Winter utility
10. Export to the correct TER file.
11. All done. Run the modified map to see the results.


Example of Quarry (before and after).

Lightsource is set to NONE in graphic settings in both images.


Before: very flat


After: as if lightsource are on, but better?


The lightmap image used:



Everything you see on the screen are COLORS. This is important to recognize when thinking about shadows, as they are just darker colors than normal. The BZ2 engine renders them "realtime" when light-source are turned on.

Without colors you could not see anything, and without shadows everything would seem flat.

You can simulate shadows simply by darkening the color behind a hill (that is behind a light-source/sun).

Instead of doing this by hand, you can export the heightmap to a utility that can create a lightmap (all the shadows and bright spots) of the heightmap.

Then you can overlay the lightmap over the colormap. The lightmap will darken the colors where shadows are and brighten the colors where bright spots are.

Now you no longer need to have light-source turned on in-game. It increases your FPS, and also provides nicer shadowing of the environment, making it feel more "real".


It's important to understand the images that the Winter utility allows you to export from a TER file, and also understand how it allows you to import new height and color textures to a TER file.

A BZ2 map is basically a set of textures.
- 1 image texture for heightmap (grayscale, 16-bit each pixel, representing the height value (2^16-1) of each tile vertex.
- 1 image for the color value of each tile vertex.
- and multiple images for texture splatting.






« Last Edit: July 03, 2010, 01:27:39 AM by GreenHeart » Logged

Many failures will take place in the process of attempting to achive your goal. It don't matter how many times you fail, Its how much you've learn each time since its apart of the learning process.
Pages: [1]   Go Up
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!