project-navigation
Personal tools

Author Topic: Rediculously sized map  (Read 12516 times)

Wanderer

  • Guest
Rediculously sized map
« on: May 10, 2007, 07:36:53 am »
Hello folks.  I need some recommendations.  I'm in the middle of building a map, specifically a building.  The intention is to have 4 floors, plus a landing strip outside.  To try to simplify the process, I'm building each floor independently.

Below are screenshots I've taken of the floor in the game.  The problem is, this single floor is up to nearly 6 megs.

The mapfile itself is available at: http://www.filefactory.com/file/91f1f7/.  (Btw, I'm looking for a better online publically free file repository if anyone knows of one.)

There's 647 brushes, and 109 entities (including spawn points and whatnot), and builds out at 5.9mb.   For comparison, the farm08n.map carries 1011 brushes and 174 entities, and builds out at 4.8mb.

I've ripped out the nearly invisible brushes that I was using to help 'realism' the map, like little legs underneath the separators in the bathroom.  I've even ripped out the sinks of the bathrooms, trying to remove brush count and lighting issues.  My assumption is the majority of this comes from the radiosity sequence in the compilation, but I'm not sure why.  If you take a look at other maps, they make my lighting scheme seem weak.  I rarely place lights next to each other and I try to keep a minimalistic approach to it.

There are a few obvious brushes that could be removed, but they would change the style of play, like the one that splits the wide door in the entryway.  Also it might be helpful if I noted that the top face of each of the walls is a different texture then the wall itself (concrete), and that I regularly multi-texture the brushes, so that each room has its own wallpaper.

The map loads just fine and is easily manipulated in UFO:AI, so while I intend (eventually) to corner off the walls to remove displayed brush faces for the generator, I'd like to do the surgery first and clean up this map some.







---------

Changes made to try to determine cause:
Original Build: 5746 kb
Remove angled table in kitchen: 5737 (-9kb)
Remove table and chairs at 246 704: 5695 (-38 kb)
Removed two lights in back staff office: 5695 (0 kb)
Added Roof to block out exterior lighting: 5733 (+38 kb)
Moved entire map to 0,0 coordinate (was starting at 0,128,64 to properly paste all texture shifts into another map):  5738 (+5 kb)
Removed basement stairway and stepon/actorclip: 5720 (-18 kb)
Brought map to begin at 0,0,0 coordinate: 5710 (-10 kb)
Removed all civilian/alient spawn points ( 12): 5710 (0 kb)
Removed 'toilet paper rolls' in Men's bathroom (2x5 brushes each): 5695 (-15 kb)

If each brush costs ~1.5kb, and at this point at 590 brushes, I should be at ~800kb.  There's obviously one (or a few) brushes here that are causing the majority of the issue.  I'll continue this test when I have more time, and hopefully with some feedback that will help me target a specific issue.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #1 on: May 10, 2007, 11:42:25 am »
i size is more related the your lightmap - not to your geometrie

the size without a lightmap is 860392b

Wanderer

  • Guest
Rediculously sized map
« Reply #2 on: May 10, 2007, 05:59:07 pm »
Quote from: "Mattn"
i size is more related the your lightmap - not to your geometrie

the size without a lightmap is 860392b


Maybe I don't understand enough about lightmaps, but when I rip out every 'internal' light for the map (with a roof, so it's not getting the worldspawn lighting except for the windows), file builds out to 5677 kb instead of 5695 kb, (-18 kb).  I'd have expected shadow building to be much more of an intense file size issue.

Back to the drawing boards.

Offline XaverXN

  • Squad Leader
  • ****
  • Posts: 110
    • View Profile
Rediculously sized map
« Reply #3 on: May 10, 2007, 07:05:02 pm »
I compiled your map on my linux system, with quite simple lighting setting, and its still 5,7 MB. So it's not a compiler error of yours and not due to extraordinary compiler options (to the extent of my small knowledge, of course).

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #4 on: May 10, 2007, 08:17:31 pm »
the lightmap will be there, too - but only black in this case

the size should be no real problem - even if you will add more levels it should not increase by 5mb for every level - no panic ;-)

Wanderer

  • Guest
Rediculously sized map
« Reply #5 on: May 10, 2007, 08:38:17 pm »
Quote from: "Mattn"
the lightmap will be there, too - but only black in this case

the size should be no real problem - even if you will add more levels it should not increase by 5mb for every level - no panic ;-)


Well, that's excellent news. :) Yay!  I'll stop worrying so much about it until I finish off the map then... However, might as well share my research.


--------------------

For anyone interested, I did take this apart inch by inch, to find out where the prices were.  Some of the findings were pretty surprising to me:

Remove girls Room Toilet: 5671 (-6 kb)
Rip out the Hotel 'back office's furniture, including overlapped brush in wall: 5552 ( -119 kb)
Rip out all tables in the Dining Hall: 5366 ( - 186 kb)
Rip out men's room urinals (41 brushes): 5310 ( - 55 kb)
Rip out all brushes in meeting room (57 brushes): 5140 (- 170 kb)
Rip out the magazine rack and couches in the front area ( 13 + 26 (39 total) brushes): 5079 (-61 kb)
Rip out the front desk, computers, and lights: 4987 ( -92 kb)
Remove all toilets and TP rolls: 4953 ( -34 kb)
Remove other sideways table in the kitchen area: 4946 (-7 kb)
Remove actor clip and dumpster from behind building: 4944 ( -2 kb)
Rip out all brushes from within the kitchen: 4920 (-24 kb)
Rip out couches in girl's room: 4967 (+47 kb) ... WTH?!!!
Extend conference room floor out to cover the 'hole' left by the downward leading stairs: 4967 ( 0 kb)
Rip out soda machine brush: 4966 ( -1 kb)
---- At this point all that's left is floors, walls, ceiling for lighting, and the upward stairs.
---- The only safe assumption at this point is it has to do with Subtracting the windows in the wall causing multiple brushes
---- to be performed on for radiosity.  There is 122 brushes left, with 1 entity, and I'm still at nearly 5 megs on the .bsp.
---- To confirm, gut the internals and then start on the outer walls.
Remove stairway (112 brushes left): 4951 ( -16 kb)
Remove inner walls in bathrooms( 104 brushes left): 4742 (-209 kb)
   -- This is the first significant difference (at least 5%) change seen so far.  the only information of note on these

brushes was that some were not placed 'flat' on the floor.
Remove internal walls surrounding 'entry hall' (98 brushes left): 4541 (-201 kb)

---
Remove bathroom and kitchen internal walls ( 89 brushes left): 2794 ( -1747 kb)
   -- Um, wow.  Half of these don't even get lit.
Combine brushes in bathroom on outer pink wall that didn't need to be separated ( 87 brushes): 2791 ( -3kb)
Undo bathroom and kitchen internal walls removal, redo the brush combining on pink wall.  
---


Remove ONE kitchen wall (farthest left) (95 brushes left): 4391 (-150 kb)
-----
Remove main, freestanding wall between kitchen and dining area: 4060 (-331 kb)
Replace wall, and modify texture, same texture and stretch on all faces: 4391 (0 kb)
Modify wall surface and remove level 2 flag (only level flag active): 4390 (-1 kb)
   -- Alright, I'll bite.  visible on all surfaces now, and takes less room?
----
Remove all kitchen walls to dining area (one additional wall from removing the main freestanding wall): 3895 (-165 kb)
Remove wall from bathroom to kitchen: 3512 ( -383 kb)
   -- That's pretty big.  Wonder if it's because of the nearby doorway...
Remove wall between lady's bathroom and elevator hallway area: 3308 (-204 kb)
Remove primary separation wall between bathrooms: 2930 (-378 kb)
Remove 'extra' wall between elevator hall, men's room, and lady's room: 2887 (-43 kb)
Remove main wall between men's room and dining area: 2821 (-66 kb)
Remove main wall between men's room and elevator hall: 2791 (-30 kb)  
   --I grabbed one extra wall along the way here I didn't do earlier, ergo the different value from removing bathroom

and kitchen internal walls...
Remove wall between hotel office and elevator hall area (and corrected overlapping floor brush from extending the conference

room floor): 2785 ( -6 kb)
Remove wall between hotel office and basement stairs area: 2783 (-2 kb)
Remove Elevator 'door': 2779 kb ( -4 kb)
Remove two brushes surrounding elevator door on same face: 2776 (-3 kb)
Remove shaft wall between elevator hall and shaft hole: 2768 ( -8 kb)
Remove shaft wall between shaft hole and conference room: 2759 ( -9 kb)
Remove remaining 3 conference room walls: 2708 ( -51 kb) -- for 3 brushes

---- At this point I just have floors, outside walls, and a flat roof.
Cover the Elevator Shaft with nearby brush: 2709 ( +1 kb)
Remove men's bathroom floor, cover hole with nearby brush: 2702 ( -7kb)
Remove marble floor top piece, cut so elevator shaft could be built.  Extend lower piece to cover same region: 2702 (0 kb)
Remove hotel office floor, extend front entry floor to cover area: 2696 ( -6 kb)
Remove kitchen floor, extend dining area floor to cover: 2420 ( -246 kb)
   -- Okay, there's a pattern here.  As I go right in the map, less and less does the brush have an effect.  Here, however, we have a 240 kb brush that's no different then the 6 kb one before it, except for the lighting angle.
   -- Worldspawn angles are currently set at 30 210.
Change worldspawn lighting angles property to 0 90: 2420 (0 kb)
   -- Nice idea.
One more try with worldspawn angles at 0 0: 2420 (0 kb)
   -- Odd....
Remove ladies room floor and extra marble, extend full marble to cover: 2409 ( - 11 kb)
Remove conference room floor, cover with marble: 2447 (+38 kb)
   -- Just when you think you've got the danged thing figured out.....
Remove dining area floor, cover with two remaining floor tiles: 2551 (+104 kb)
   -- Ooooookay.....
Reset angles in worldspawn to 30 210: 2551 ( 0 kb)
Remove all but last floor brush, cover with last: 2563 ( +12 kb)
Remove outdoor grassy brushes, move remaining map to start at 0,0,0: 1760 kb ( -803 kb)
   -- That's just mean and evil.

-- At this point, single floor, single roof, and just walls with windows on the model are 1760 kb of .bsp.  Examining the brushwork on the walls shows some combinations that can occur.

Combining unnecessary extra brushes after building windows in the walls (down to 59 brushes):1758 ( -2 kb)
   -- Well, that was useful... not.

Wanderer

  • Guest
Rediculously sized map
« Reply #6 on: May 22, 2007, 09:03:50 pm »
I'm afraid that my initial fears are coming to pass for this map.  After including the Landing area, the basement, and the second floor, I'm up to 13 mb in size.  The map size is a little over 4x4 tiles, and doesn't have rediculous volume of brushes nor entities.

Face count has been reduced as much as is realistic.  If I could find one, I cornered it off/moved some brushes around.  Items only build on their proper levels, or when visible either through a window or via cutaways.

I'll post some screenshots and the file eventually.  I want to finish it, and then approach it from the other side, but I'm definately running large.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #7 on: May 22, 2007, 09:45:37 pm »
yes, please post the file

i'm waiting for some playtesting ;-)

Wanderer

  • Guest
Rediculously sized map
« Reply #8 on: May 22, 2007, 09:49:07 pm »
Quote from: "Mattn"
yes, please post the file

i'm waiting for some playtesting ;-)


Heheh, I'd love to playtest... DOH, thanks for reminding me... forgot to put in the multiplayer human start points...

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #9 on: June 22, 2007, 07:14:51 pm »
yesterday i implemented a new memory management subsystem - the hunk overflow bug you had with this map should no longer exists.

also i suggest you to use the gl_wire 1 var to see rendered geometry better - and to be able to optimize the brushflags to only draw those brushes that are visible - set cheats to 1 to use gl_wire 1

Wanderer

  • Guest
Rediculously sized map
« Reply #10 on: June 22, 2007, 07:31:53 pm »
Quote from: "Mattn"
yesterday i implemented a new memory management subsystem - the hunk overflow bug you had with this map should no longer exists.

also i suggest you to use the gl_wire 1 var to see rendered geometry better - and to be able to optimize the brushflags to only draw those brushes that are visible - set cheats to 1 to use gl_wire 1


Actually, I reduced the file size to 12k a while ago, and it's been working fine since then without running into the hunk overflow.  I just haven't had time in my home life to do anything and I can't run the software while at the office. :)

gl_wire 1 var... you mean setting a cvar, right?  Like set gl_wire 1?  Just double checking.

That's a neat item, only drawing visible brushes.  However, all brushes are visible, no?  It's faces of brushes that would be invisible.  Or do you mean when you switch levels, brushes that are on a floor below (and therefore not set for visibility on that level) would not be drawn?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #11 on: June 22, 2007, 08:42:00 pm »
Quote from: "Wanderer"
gl_wire 1 var... you mean setting a cvar, right?  Like set gl_wire 1?  Just double checking.

That's a neat item, only drawing visible brushes.  However, all brushes are visible, no?  It's faces of brushes that would be invisible.  Or do you mean when you switch levels, brushes that are on a floor below (and therefore not set for visibility on that level) would not be drawn?


yes, exactly - and cvar, and yes exactly the lower floor brushes

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Rediculously sized map
« Reply #12 on: July 21, 2007, 06:39:00 pm »
what is the status of your map? any updates? something new to show us?

Wanderer

  • Guest
Rediculously sized map
« Reply #13 on: July 21, 2007, 09:49:17 pm »
Quote from: "Mattn"
what is the status of your map? any updates? something new to show us?


Status: Sister's wedding, Brother's Bachelor Party, two Birthday parties, OT at work, and playing with female friend... IE: Nothing on the map. :)

I'll have some time to kill when I fly to NY next weekend, I'll try to get some time working on it then.

Wanderer

  • Guest
Rediculously sized map
« Reply #14 on: July 30, 2007, 11:55:33 pm »
Update: I should have a finalized version of this shortly.  Got the majority of work I think needed to happen to it completed and just need to get some finishing touches done.