q3map2 : networked computers light compilation


(oilslick) #1

Hello !

( I apologise for my English, I am learning English only since 2001)

I am working on a system wich enables lighmap calculation with 2 computers.
The principal problem is to make 2 mapfiles with the same lightmap.

So I tried to copy the 2 mapfiles (the exactly same files)on 2 computers.

This is the concept of networked computing. (beta 1 wich doesnt works for more than 1 room with 6 faces only)

  1. I copy the map on the 2 computer with the same quake 3 environnment
    (textures shaders etc…)
  2. I modify the map files and I remove 50% of the lights in one map file
    and the other 50% in the other map file on the second computer (I am
    trying to make a program wich can do the work for me, and prepare the 2
    files for me … (2 or more for use with more than 2 computers)
  3. I launch a bsp and light compilation for the 2 maps on the 2 computers
  4. I extract the lightmap of each maps and merge the lightmap’s TGAs of
    each maps and reinject it in an existing BSP of the map.
  5. done !

I’ve edited the .map and set 50% of the light color of 1 map to 0 0 0 (with the key _color and the value : 0 0 0 ), and the other 50% of the second map, and the 2 lightmaps seems to be the same for the 2 maps.

so I compile the light of each map separately and then I export the lightmaps tga in separate folders. there is normally the same number of tga files for each maps, or it will not work.

Next I merge respectively the lightmaps of each maps in one lightmap file (with the same name.
and… sorry, it doesnt work.

Q3map2 optimises the lightmap to make a bsp light as posible, I need a solution to make the maps to hae the same lightmaps but not the same lights… (I delete 50% of the lights in one map and the other 50% in the second one : the lightmap is not the same)

Iif someone knows a programm to merge 2 tga with a “add” or “filter” functions, send me a mail please.
I am looking for a programmer who can make a program to “split” the .map files in 2 mapfiles with 50/50 lights “on” or “off”

I hope it will be possible to do this easyly, but that is not for today :disgust: :frowning:

I’am working on it…


(Shaderman) #2

You should be able to split the light compiliation of your map with a common/lightgrid brush covering 1/2 for the first and 1/2 for the second computer. I think it shouldn’t be too hard to merge the lightmaps later.


(oilslick) #3

the common/lightgrid don’t split the map… I have tested with 1 brusharound a part of the map, then with 1 brush and hollow to make a “room” around one of the 2 map parts, but in all cases the lights are calculated everywhere… :frowning:


(kamikazee) #4

Blending pixels with pixels ain’t that hard, processing a complete .tga however…


(SCDS_reyalP) #5

@Shaderman: as the name suggests, lightgrid affects the lightgrid (lighting for non-static entities like players), and has nothing to do with lightmaps. One could of course code a similar thing that controlled lightmapping, although it doesn’t strike me as the best approach. In particular, no matter where you split the map, lights on either side of the split are going to be a problem.

@oilslick: I’d suggest you’d be better off modifying the q3map2 code directly. You can the q3map2 source here: http://zerowing.idsoftware.com/
Lighting already has multi-thread support, which might be a starting point.

As an aside, I’m not really convinced of the value of this. Unless you have a lot of systems available, the speedup isn’t going to be that worthwhile (e.g. if you have 2 systems, and 100% parallelization, then a 12 hour compile becomes a 6 hour compile, which still means you have to wait overnight.) Given a modern system, light compiles on all but the most complex maps shouldn’t be taking anywhere near that anyway. I’d wager you’d be able to do a lot of compiles in the time it takes you to get distributed light compiles working. Of course, doing it just because it’s an interesting problem is certainly a valid choice.


(Shaderman) #6

SCDS_reyalP you’re right! Sry for pointing you in a wrong direction oilslick. I didn’t know that it only affects the lighting of dynamic models :uhoh:


(oilslick) #7

Thanks to everybody, the single proble is > I don’t write in any programming language except BASIC stamp for PICs, but the solution seems to be good., I will learn C and C++ in 2 years. Maybe before, but I am going to read the code and try to understand. (the first problem is > I have’nt found the sources on the website Zerowing.idsoftware.com I will wcontinue searching…)
Thanks again everybody !!


(Shaderman) #8

I think this is the code: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.4/tools/quake3/q3map2/


(SCDS_reyalP) #9

You should check the source out using subversion. This is described one the site.