MOH Light Compile error

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

E:\Games\ALLIED~1\MOHAA.exe +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +devmap BK_Town

I think the problem with this shortcut might be the long pathname (>8 characters for a folder name). Try this:

"E:\Games\ALLIED Assault\MOHAA.exe" +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +devmap BK_Town

You could also try renaming 'allied assault' to something shorter like 'mohaa'.

Better vising should make the light compile more efficient, though don't expect it to be a real lot faster. Making brushes detailed will dramatically decrease your vis compile time though.

Don't worry too much about the filesize of your bsp. I think it strongly depends on what compiling options you use.

8.8 megs also isn't extremely much... one bsp for the modern warfare mod exceeds 21 megs ;) but runs ok.
Image
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Post by diego »

jv_map wrote:
I think the problem with this shortcut might be the long pathname (>8 characters for a folder name). Try this:

"E:\Games\ALLIED Assault\MOHAA.exe" +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +devmap BK_Town
I think I tried "ALLIED Assault" once and the batch file did not like the space. But discovered last night that this file does not like to be run outside of the MOH directory because it can't find the config file. I've moved it into the "Games\Allied Assault" directory so I can probably just remove that portion of the line.

Will the console still pop up with that localization error when this is working correctly? It shows up now everytime I run AA even without using this batch file.
jv_map wrote:
Better vising should make the light compile more efficient, though don't expect it to be a real lot faster. Making brushes detailed will dramatically decrease your vis compile time though.

Last night, I went through my entire map with the filters on. I found a few brushes that were being used as building trim details, or interior elements that needed to be converted to detail, but not very much. More importantly, I found a several floor areas that should have been structural but were not.

I also added the area portal brushes inside my doorways of windowless rooms.
----------------------------------------------------------------------------------
Here are my new results:

1454 portalclusters
4198 numportals
7313 numfaces
visdatasize:267544
Compile time: 15 minutes (was 70)

Average clusters visible: 185 (was 235)

I think that is a big improvment. I also realized that my staticshadows were not working because I had not used the -final flag for MOHlight. That made my lighting compile time jump from 30 minutes to 8 hours. But at least it looks correct. I'm not sure if it improved the light clamping. I ran a verbose compile this time and I didn't have time to sift through it all this morning.
_____________________________________________________

Now for the bad news:

I'm having problems with the area portals. All the doors I added them too are now leaking into the void. I read a lot of threads and tuts about them before putting them in. But obviously, I'm still doing something wrong.

The area portals are touching structural brushes on all sides. They are thinner than the doors, but they are wider and taller than the doors. Each doorway in my map has a wood frame around it made out of detail brushes. The doors sit inside these frames, but when details are filtered, you can see around the edges of the doors to the interior of the rooms.

So, should I make those doorframes structural?
Also, when I have details filtered, you can see that some of my structural brushes that were hidden by the details have the Caulk texture on them. Does that prevent them from compiling as a solid structure?

Sorry that these posts are getting so long :(
Diego
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Diego wrote:I think I tried "ALLIED Assault" once and the batch file did not like the space.
Spaces in the filename shouldn't be a problem when you type the file name within quotes ("file name")
Will the console still pop up with that localization error when this is working correctly?
Yes.
I also realized that my staticshadows were not working because I had not used the -final flag for MOHlight. That made my lighting compile time jump from 30 minutes to 8 hours. But at least it looks correct. I'm not sure if it improved the light clamping. I ran a verbose compile this time and I didn't have time to sift through it all this morning.
In my experience -staticshadows works without the -final switch :?... Anyway I also found -staticshadows causes a truly dramatic increase in compile time and every now and then leads to bad results when it comes to model lighting. You might want to consider using common/caulkshadow or likewise textures to produce static shadows manually.
I'm having problems with the area portals. All the doors I added them too are now leaking into the void. I read a lot of threads and tuts about them before putting them in. But obviously, I'm still doing something wrong.
What exactly do you mean by leaking into the void? Do you get compile errors or can you see artifacts in game?
So, should I make those doorframes structural?
Yes I think you should try that.
Also, when I have details filtered, you can see that some of my structural brushes that were hidden by the details have the Caulk texture on them. Does that prevent them from compiling as a solid structure?
No; caulk is structural, opaque (for the compiler at least) and solid.
Sorry that these posts are getting so long :(
That's ok :wink:
Image
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Post by diego »

About my area portals:

I was using the Portal shader, not the area portal. Also, it does work much better if the doorframes are structural and the brush fits within the frame.

About my Batch file:
My map is automatically put into a pk3 file before copying it into my main folder. I'm changed it to a BSP file in the maps directory and it is working correctly now.

With the showtris on there is a whole lot of crap being drawn that does not need to be. I'll try turning the blocksize back on and see if that helps. This map wasn't built along that grid so it might not be very effiecient or effective. So I'll try to experiement with some manual vis too. Hopefully, that will eliminate my light clamping errors.

Any other suggestions? I'm all ears :)
Diego
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well the portal shader should definately not be used for areaportals. Basically this portal shader is inherited from quake 3 where it was used as a 'projection screen' for portal cameras, but this functionality doesn't seem to work in mohaa :(
Image
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Post by diego »

Ok, I tested my compile with a blocksize of 1024. This greatly reduced my clamping errors.


====== Entity Lighting Lights ======
Num lights per leaf clamped from 74 to 60
Num lights per leaf clamped from 78 to 60
Num lights per leaf clamped from 71 to 60

That's a big improvement. Also, the fast compile for light takes only 2 minutes instead of 30. (By the way, I also thought my staticshadows was working a few weeks ago without the "final" flag on. That's why I never thought to set that one. But as long as I can get it to work, I'm happy)

Vis compile now takes 2 hours instead of 15 minutes. I also tried a fast vis. That only took a about 2 minutes. The polygon overdraw was the same. Also, I didn't see any light clamping errors at all when MOHlight ran. So I'm not sure what is being calculated differently between the two version.

But Alas, the blocksize does not improve my polygon overdraw problem. Ive decided that my framerate is really not as good as I thought. Now that I can see all the tris being drawn, I'll just suck it up and start experimenting with the manual vis_leafgroups and hintbrushes.

On a fast vis compile, are manVis and hint brushes calculated? or is it just structural brushes and blocksize?


LOL, All I wanted to do was learn how to light a map because the guy that built this one for our clan didn't want to finish it. It was a fun map, but I couldn't deal with ambient light at 70,70,70, empty rooms, and a handful of textures.

What the hell have I got myself into? :wink:
Diego
AccadaccA
Lance Corporal
Posts: 13
Joined: Sat May 10, 2008 8:48 am
Location: down under (Qld, Australia)
Contact:

Re: MOH Light Compile error

Post by AccadaccA »

After searching this forum for "malloc" I came up with and read three related threads including this one.
I think that we have found the limit of whatever "malloc" is as my error reads exactly the same amount of bytes even although I hardly have any lights (less than 20 - 30 which are at Key = "light" value = "125" or less) and the quantity of everything else deigo's error reported exceeds the count that I have.

(Light compile)
Total Models Lit: 335
Total Vertecies Lit: 59990
Total Vertecies that were in Solid Leafs: 1069
Data Size: 237222 bytes

************ ERROR ************
SetupGrid: malloc failed on 1604923808 bytes


diego wrote: 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
Spooky?

Strangely enough another related post/thread (possibly diego's other thread) also mentioned a similar error I have, the following:

(Bsp compile)
WARNING: static model brush [mins = (-22.6 -0.5 105.4), maxs = (-0.1 12.5 117.4)] outside map bounds

Although I do NOT have anything even remotely close to the skybox (viewed from all 3 axis's X, Y & Z) even zoomed in so the model tree textures are displayed they are all more than 128 units from the skybox walls, floor and ceiling.
I have moved & resized my 3 boundry trees (smaller) and have resized my skybox (larger) but I still have one listing of the above error/warning.

The map plays and everything shows but it's all without the night effect lighting I once had and reverts back to broad daylight. :(
BTW, I am only using lights as boring ol' white lights and ambient light to light shadows. No farplane, weather effects, etc.

Any help to resolve these issues would be greatly appreciated. Thanx

P.S. Big thanks to jv_map for his help in activating my account here. Cheers Jeroen :wink:
AccadaccA
Lance Corporal
Posts: 13
Joined: Sat May 10, 2008 8:48 am
Location: down under (Qld, Australia)
Contact:

Post by AccadaccA »

Ok, after posting the above I went through my map and deleted all of my lights and replaced them individually, one at a time not cloned with the spacebar. All are set with the "light" value of 75, everything else at default, zilch.

Surprisingly I now have 60 lights and not the 20 - 30 that I predicted earlier, Dang, who would have guessed? :lol: , although I did add heaps more (forgot to light the sewers), but that is not an issue.

There is one building (the pub) that has many entities to light which could possibly cause this grief but it has worked earlier and I haven't changed anything in there since (except replacing the lights lastnight).

Compiling the Light does the exact same error :cry:

Just to varify, my MBuilder configuration is:
-v > C:\Logs\bsp.txt
-fast > C:\Logs\vis.txt
-fast > C:\Logs\light.txt


I guess I'll have to start stripping my map down (compiling between stages) to try and find the cause. :lol:
We dont stop playing games because we grow old,
we grow old because we stop playing games.
Post Reply