Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Big is too Big for a Map?
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#1
How Big is too Big for a Map?

I'm in the middle of trying to put together this map and it's going to be pretty large (having three floors and a cellar). I've tried to condense down some of the rooms, but it still might be more than some systems can handle.

So how big is too big for a map? What are some tips to help keep everything optimized? I did read on the wiki about utilizing L-shaped hallways and such, but has anyone learned other tips with their time working with the editor?

01-07-2015, 04:53 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: How Big is too Big for a Map?

I think size is irrelevant. It matters more on poly-count, as in the amount of polygons the models in the area use. For example if you place several hundreds of grunts next to each other, you'll probably drop in performance. If I remember correctly, the grunt has just over 2000 polygons, whereas a normal chair may only use 200.

I think the ways Amnesia try to handle too much rendering at once is to hide whatever isn't visible, however that might be miscalculated if it doesn't meet certain requirements. I don't really know what these requirements are or how to properly set up a level that it can utilize this feature, but it should be very much possible. As you said, the L-shaped corridors allow the game to separate the rooms and completely disable them until they're in use. If you cramp everything up, I can imagine this feature being disabled so that it doesn't de-render visible assets. I think the article also mentioned that you should patch everything up properly, because a single hole in the walls or floors can also prevent this feature from running.

Other than that, I don't know exactly how to prevent such performance issues. Of course you can go the manual way and disable/enable entities as you move through the level, but it might be tedious. However if you have certain models with very high poly-counts, consider disabling them whenever the player is away. A single grunt can have the effect of 10 chairs.

(This post was last modified: 01-07-2015, 09:22 AM by Mudbill.)
01-07-2015, 09:19 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: How Big is too Big for a Map?

I've made some big maps (My sort-of-dead CS is divided into four parts. Each part has one map.) and I got some advice.

For optimization, I think that having little detail helps, but destroys the intriguing part of the map. So some small stuff aren't really detailed, but detailed enough. Also, try not use a lot of models with high polygons. For size, I've learned never to go beyond 5 - 10 MB.

Again, my opinions. I could be COMPLETELY wrong.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 01-07-2015, 09:21 AM by PutraenusAlivius.)
01-07-2015, 09:19 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: How Big is too Big for a Map?

(01-07-2015, 09:19 AM)Mudbill Wrote: Of course you can go the manual way and disable/enable entities as you move through the level, but it might be tedious.

I would only do this with looping particles such as flies, rain, light dust, etc. Too much of them in the camera view will produce visible downed performance on low end computers. Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
01-07-2015, 09:30 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: How Big is too Big for a Map?

Yeah, I was thinking particles in particular, but then I just imagined such a feature being built-in to begin with. Of course I don't know if it is, but I would find it weird if it wasn't. Makes little sense to me to play particles infinitely away from the range of the player.

01-07-2015, 09:51 AM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#6
RE: How Big is too Big for a Map?

HPL2 uses occlusion culling (objects aren't rendered if they are entirely hidden behind other objects) , as has been said, but from what I can tell it's not too precise.

I'm not 100% sure that hat Mudbill said about having gaps stopping occlusion culling from running is right. I think this would be more relevant to BSP based engines (eg Source) where the culling is pre-processed.

My 'educated' guess is that HPL2 aproximates this effect simply by culling what you can't see based on AABBs (axis aligned bounding boxes), although I could be wrong...

In practise then, this means it helps to space things out. A map laid out like a house, where the walls are 6 inches - 1 foot thick is likely to cause a slowdown. A map with big gaps, as if the walls were 2-4 metres thick or more, should help the process of occlusion culling. This is something I realised since make The Trapdoor, which has some dense corridors which drag the framerate down in places.

01-07-2015, 03:12 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#7
RE: How Big is too Big for a Map?

Yea that occlusion culling never worked for me in Amnesia, it actually takes more fps than giving.
So when I play mods with large maps I turn it off. It saves like 10~20 fps.

The best option is always to make your scenarios as large as you want but divided in small maps.
It's way easier to handle. Everybody wins.

01-07-2015, 05:24 PM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#8
RE: How Big is too Big for a Map?

you can go bigger than you might think. The maps in my current story are each about 20 MB in size, but that's mostly due to the insane detailing. They still run smoothly. The only map that has a drop in performance is one where I have a building interior that is highly detailed, as well as the exterior for that building. If you turn around and look back at the whole thing, FPS tends to drop by about 10.

You can get away with more than you might think, so go for it! Computers these days are more powerful than they were when HPL2 was released. It HAS been about 4 years, after all.

As an example of what you can and can't get away with, look at my story Bitterwood Peak. The entire thing, up until a week before release, was one map. You could go from outside to inside and down to the cellar with no load screens. However, FPS was awful on other peoples' computers, and I was having issues with scripting it all, so I split it up into an inside, outside, and cellar area. That saved everyone a lot of performance.

So, a good way to look at it is to split your maps up by locale- Amnesia doesn't handle 'zones' well, such as going from outside to inside, due to the difference in detailing that comes with it. Just split your maps up based on how you want the player to progress from zone to zone.

[Image: signature-2.png]
(This post was last modified: 01-07-2015, 06:50 PM by Streetboat.)
01-07-2015, 06:47 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#9
RE: How Big is too Big for a Map?

I do know if a map is to large, like 600x600x600 or larger (Way past the default view clipping range which is 300 I think). It will crash the game intermittently.


For Optimization...

(1) The Size of map doesn't matter for the majority of people I believe. The game will care very little if it's 1x1 or 100x100. Unless like I stated above you start going past the View Clipping Range.

It's all the crap we fill up makes it so demanding.

(2) Don't have two lamps or more with "Shadows" ON, intersect each-other.

(3) Turn off most, if not all Light's "Alpha" to 0.

(4) I don't see a reason to splatter Decals everywhere. Especially if they are dark corridors, only use them for important areas or brightly lit places. It bloats the map to a ridiculous size.

(5) The game runs fine enough up to about 20-30ish objects colliding (Varies between each PC system) with each-other and the environment and if they have a simple Box or Cylinder collision. But anymore will cause the game's FPS to tank.

A common issue with map start-ups, the initial lag spike is all your objects falling a few centimeters and colliding with other objects.

(6) Polygons by themselves don't affect the game to much, it might be a problem when things like Shadows are being blocked by polygons, since the game has to calculate them dynamically.

I can't remember who, but someone had to copy a 256 Tris object over a thousand times in the same location to notice any frame drop. So that's like a quarter million polygon budget.



//*******************
What I can think off the top of my head that people may not be aware of.
01-07-2015, 06:56 PM
Find
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#10
RE: How Big is too Big for a Map?

(01-07-2015, 03:12 PM)MrBehemoth Wrote: In practise then, this means it helps to space things out. A map laid out like a house, where the walls are 6 inches - 1 foot thick is likely to cause a slowdown. A map with big gaps, as if the walls were 2-4 metres thick or more, should help the process of occlusion culling. This is something I realised since make The Trapdoor, which has some dense corridors which drag the framerate down in places.

Precisely, this was my concern, as I made the map with the logic of building a real world home, and most every room was a square next to another square, so I've been going through and changing the rooms up, making some smaller or pulling in a few walls to not only make the room look more interesting, but it also help with adding some more kind of "gap space".

(01-07-2015, 09:19 AM)Mudbill Wrote: Of course you can go the manual way and disable/enable entities as you move through the level, but it might be tedious. However if you have certain models with very high poly-counts, consider disabling them whenever the player is away. A single grunt can have the effect of 10 chairs.

For this it would just be SetEntityActive and set it so the script continues with every collide? Which models would you consider this most useful for, like fireplaces, bookcases, etc.?

01-07-2015, 11:35 PM
Find




Users browsing this thread: 3 Guest(s)