MOH Light Compile error
Moderator: Moderators
MOH Light Compile error
I'm getting this error when MOHlight starts to calculate the light and shadow grids after doing all the model files:
451) Model: static/bush_buckthorn.tik
452) Model: static/bush_buckthorn.tik
453) Model: static/corona_util.tik
Total Models Lit: 454
Total Vertecies Lit: 81737
Total Vertecies that were in Solid Leafs: 1924
Data Size: 322401 bytes
************ ERROR ************
SetupGrid: malloc failed on 1604923808 bytes
It was working fine until today. I added some more lights and some more brushes, but no major changes. BSP and the vis data compile fine. I don't have any leaks. I can post the full logs if that will help.
Thanks.
451) Model: static/bush_buckthorn.tik
452) Model: static/bush_buckthorn.tik
453) Model: static/corona_util.tik
Total Models Lit: 454
Total Vertecies Lit: 81737
Total Vertecies that were in Solid Leafs: 1924
Data Size: 322401 bytes
************ ERROR ************
SetupGrid: malloc failed on 1604923808 bytes
It was working fine until today. I added some more lights and some more brushes, but no major changes. BSP and the vis data compile fine. I don't have any leaks. I can post the full logs if that will help.
Thanks.
Diego
Well, Balls....
Looks like that's it. I've got 512. I was watching my memory usage while compiling. It sits around 350 meg until it hits that point, then it suddenly jumps to something like 2 gig or more before crashing. Not sure why just a few more lights and objects would knock it so far off though.
Looks like that's it. I've got 512. I was watching my memory usage while compiling. It sits around 350 meg until it hits that point, then it suddenly jumps to something like 2 gig or more before crashing. Not sure why just a few more lights and objects would knock it so far off though.
Diego
I've reverted to an earlier version of my map. This one will compile fine. But I've been seeing these errors:
====== Entity Lighting Lights ======
Num lights per leaf clamped from 78 to 60
Num lights per leaf clamped from 88 to 60
Num lights per leaf clamped from 81 to 60
Num lights per leaf clamped from 88 to 60
Num lights per leaf clamped from 67 to 60
Num lights per leaf clamped from 115 to 60
====== Entity Lighting Lights ======
Num lights per leaf clamped from 78 to 60
Num lights per leaf clamped from 88 to 60
Num lights per leaf clamped from 81 to 60
Num lights per leaf clamped from 88 to 60
Num lights per leaf clamped from 67 to 60
Num lights per leaf clamped from 115 to 60
Diego
I am using ambient light for the shadows. But for interiors, I've been using multiple light sources in many of the rooms for a more realistic effect. I've also had problems getting lamp .tik objects to illumniate evenly. Lamp shades and hanging lights always seem to have some surfaces facing away from my light object leaving dark spots on the .tik model.
I've been trying to cut back on how many lights I'm using by substituting fewer lights with larger radii if possible. But it is not uncommon for me to have 3-5 lights in a room --- even as many as 10 in some cases.
In one instance, I have a tunnel that used to have 4 large ceiling lights, but I found the radius of those was so large, it was affecting the characters on the street above the tunnel. So I now I have about 8 small lights placed near the floor to compensate.
In another room, there are wall sconces over each table in a bar. I put one light object for each one of them plus a few for the bar itself. That one has 10 lights.
Is 60 lights a recommended maximum for the entire map? I'll never get it cut down that far.
I've been trying to cut back on how many lights I'm using by substituting fewer lights with larger radii if possible. But it is not uncommon for me to have 3-5 lights in a room --- even as many as 10 in some cases.
In one instance, I have a tunnel that used to have 4 large ceiling lights, but I found the radius of those was so large, it was affecting the characters on the street above the tunnel. So I now I have about 8 small lights placed near the floor to compensate.
In another room, there are wall sconces over each table in a bar. I put one light object for each one of them plus a few for the bar itself. That one has 10 lights.
Is 60 lights a recommended maximum for the entire map? I'll never get it cut down that far.
Diego
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Diego, did you do anything to 'vis' your map? I.e. use hint brushes or vis_leafgroups? Did you do a vis compile at all?
Vis data helps the light compile as the compiler will understand that when one room can't 'see' another room, light can't go from this room to the other one. Using clever vis design the leaf size will probably decrease and there won't be so many lights per leaf. Hence, your light compile won't need to 'clamp' lights, it will use less memory and be faster.

Vis data helps the light compile as the compiler will understand that when one room can't 'see' another room, light can't go from this room to the other one. Using clever vis design the leaf size will probably decrease and there won't be so many lights per leaf. Hence, your light compile won't need to 'clamp' lights, it will use less memory and be faster.
I didn't really build the majority of this map. Mostly, I am lighting, texturing and adding static details. But occasionally I add more structure to it. I know there are no special brushes in it for vis groups. I have a basic understanding of what it is for, but not enough for me to make decisions on how to break it up manually with brushes.
Do I just put hintbrushes in the interiors of my buildings? 2 sides of the map are walled in with very long buildings with multiple rooms. One of these sides is at a 45 degree angle so I know these rooms must be crossing over multiple vis_leafgroups as they are displayed in Radient. The map also has a couple of big open areas.
FPS is pretty good on the map except when you look in the direction of the trees. It doesn't matter if they are visible or not. Then it drops from 60-80, to about 45. But it did that before I started on it. I figured leafgroups would help that problem as well.
I've been trying to get a better idea how this stuff works and how to implement it on a scale more complicated than the simple box tutorials. But I decided not start thowing stuff in the map that I don't understand.
I suppose it would help if I could see an example of a real map that was using vis_leafgroups and brushes.
I do compile the vis data. But I also have the blocksize set to zero. One of the tutorials here and another elsewhere said to do that. It doesn't take very long -- about 30 minutes. Compile time was about 2 minutes before I started loading the map with objects and lights.
This is starting to snowball into a completely different problem than I expected. I appreciate the help.
Do I just put hintbrushes in the interiors of my buildings? 2 sides of the map are walled in with very long buildings with multiple rooms. One of these sides is at a 45 degree angle so I know these rooms must be crossing over multiple vis_leafgroups as they are displayed in Radient. The map also has a couple of big open areas.
FPS is pretty good on the map except when you look in the direction of the trees. It doesn't matter if they are visible or not. Then it drops from 60-80, to about 45. But it did that before I started on it. I figured leafgroups would help that problem as well.
I've been trying to get a better idea how this stuff works and how to implement it on a scale more complicated than the simple box tutorials. But I decided not start thowing stuff in the map that I don't understand.
I suppose it would help if I could see an example of a real map that was using vis_leafgroups and brushes.
I do compile the vis data. But I also have the blocksize set to zero. One of the tutorials here and another elsewhere said to do that. It doesn't take very long -- about 30 minutes. Compile time was about 2 minutes before I started loading the map with objects and lights.
This is starting to snowball into a completely different problem than I expected. I appreciate the help.
Diego
Here is my data from the vis compile.
1553 portalclusters
4886 numportals
7302 numfaces
visdatasize:310608
creating leaf vis...
Average clusters visible: 266
70 minutes compile time.
Latest Light attempt. This one was with Radiosity on and static shadows:
Total Models Lit: 405
Total Vertecies Lit: 75774
Total Vertecies that were in Solid Leafs: 1769
Data Size: 296282 bytes
====== Entity Lighting Lights ======
Num lights per leaf clamped from 74 to 60
Num lights per leaf clamped from 80 to 60
Num lights per leaf clamped from 73 to 60
Num lights per leaf clamped from 79 to 60
Num lights per leaf clamped from 103 to 60
It appears that all the steps are being completed, but I've noticed that the staticshadows are not being calculated.
1553 portalclusters
4886 numportals
7302 numfaces
visdatasize:310608
creating leaf vis...
Average clusters visible: 266
70 minutes compile time.
Latest Light attempt. This one was with Radiosity on and static shadows:
Total Models Lit: 405
Total Vertecies Lit: 75774
Total Vertecies that were in Solid Leafs: 1769
Data Size: 296282 bytes
====== Entity Lighting Lights ======
Num lights per leaf clamped from 74 to 60
Num lights per leaf clamped from 80 to 60
Num lights per leaf clamped from 73 to 60
Num lights per leaf clamped from 79 to 60
Num lights per leaf clamped from 103 to 60
It appears that all the steps are being completed, but I've noticed that the staticshadows are not being calculated.
Diego
I think the map is kind of big. With the 1024 blocksize turned on, it is about 7x8 blocks. The map really wasn't built within these blocks so I don't think turning the blocksize back on in my compile will be much help.
I've been reading up a lot on vis_leafgroups and area portals and stuff today.
I have not tried any manual vis data, but I have put in some area portals in the doorways of all rooms that do not have windows.
I've also been trying to get my MOH to work with the r_showtris command. But everytime it says cheats are not enabled.
I'm using the following batch file to run MOH:
E:\Games\ALLIED~1\MOHAA.exe +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +devmap BK_Town
I thought this was supposed to auto-load the map, but it has never worked. I just get a console window that pops up saying I have a localization error. I've been searching for a fix for that but the one other post that had my exact error message was never really answered.
-----------------------------------------------------------------------------
That said, this thread has shifted it's focus to a vis data issue. With all the research I did today on the topic, I have a better understanding of the vis_leafgroups and manvis. But everything I have seen has been geared towards improving FPS. My FPS is actually quite good.
So how will all this vis_data help my lighting? I would like to resolve the clamping errors, get my static shadows working again, and make sure I don't run out of memory again when calculating the diffuse grids.
--------------
By the way, I noticed my BSP file is 8.8 megs. Is that bad?
I've been reading up a lot on vis_leafgroups and area portals and stuff today.
I have not tried any manual vis data, but I have put in some area portals in the doorways of all rooms that do not have windows.
I've also been trying to get my MOH to work with the r_showtris command. But everytime it says cheats are not enabled.
I'm using the following batch file to run MOH:
E:\Games\ALLIED~1\MOHAA.exe +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +devmap BK_Town
I thought this was supposed to auto-load the map, but it has never worked. I just get a console window that pops up saying I have a localization error. I've been searching for a fix for that but the one other post that had my exact error message was never really answered.
-----------------------------------------------------------------------------
That said, this thread has shifted it's focus to a vis data issue. With all the research I did today on the topic, I have a better understanding of the vis_leafgroups and manvis. But everything I have seen has been geared towards improving FPS. My FPS is actually quite good.
So how will all this vis_data help my lighting? I would like to resolve the clamping errors, get my static shadows working again, and make sure I don't run out of memory again when calculating the diffuse grids.
--------------
By the way, I noticed my BSP file is 8.8 megs. Is that bad?
Diego

