Jump to content
The Dark Mod Forums

Performance, sealing complexity, func_static


chedap

Recommended Posts

(yet another thread about optimizing the map by turning details into func_statics)

 

So, I have a somewhat complex interior scene with 1300 drawcalls that runs at about 50fps on a dated Core2DuoE6300/RadeonHD4890 machine. Apart from curved surfaces and models, it's entirely made from worldspawn brushes.

TVip49ps.jpg9CGGoB2s.jpg

 

Adding AI to the scene costs 5 fps per guard. Maybe I can improve that?

I remember that detailed brushwork is bad for pathfinding and so I decide to spend a day taking said interior apart piece by piece, replacing visible sides of brushes with patches, projecting textures onto them and simplifying the sealing geometry to this:

JD601Fas.jpg

 

The actual scene is visually indistinguishable from before. At this point everything is still worldspawn, though aside from sealing brushes, everything is patches/models. On that same PC, viewports in DR start to stutter a bit (render window msec counter has doubled), but in-game it's still 50fps, still around 1300 drawcalls. The fps drop when adding AI (1, 2, 3 guards) is exactly the same as before despite a much simpler ws-brushwork.

 

So, let's group patches into func_statics and add noshadows to them.

 

Attempt 1: let's try to keep modularity intact. I group together walls consisting of panels + wallpapers + trim at the top. I group ceiling panels (6 patches each). Same with the columns+arches.

Testing it in-game reveals a 10fps drop and 1800 drawcalls from the same spot. Huh. To be expected, I guess, since (I assume) each func_static calls for each texture independently.

The scene allows us to add noshadows to most of the walls/ceiling, and that'll give us a whole 1 (one) fps increase. Eh.

 

Attempt 2 then: to hell with modularity, let's just group all patches with the same texture to suit drawcalls better. Maybe then we can make trims non-solid.

Testing in-game, 1450 drawcalls. While an improvement over modular approach, that's still 150 extra drawcalls (and 5 fps less) compared to just worldspawn patches, and turning select surfaces non-solid seems to not have any effect at all.

 

 

So it all boils down to this: compared to my initial brushwork, I spend more time, have worse performance in DR, and gain no tangible benefits. Am I missing something else here? So far it seems to me that the effect of complex sealing geometry on performance is a bit overblown, and modular approach is quite inefficient unless you export all func_statics as models first.

Link to comment
Share on other sites

Btw, I just had a great idea - can you make a self-contained pk4 that can be run as mod with stock Doom 3? I could test it in Doom 3 BFG engine to give people an idea about performance gap between idTech 4 and Doom 3 BFG engines! (main thing is not to use anything specific to TDM, such as scripts/ARB shaders/defs)

Link to comment
Share on other sites

Did you check light counts (overlapping) ?
Most of the scene is being lit by just one central light. Obviously, it overlaps with the wall lamps, but that's it. There are a couple extra ones around the chandelier (so it doesn't look flat), but they don't intersect or reach any walls, and so shouldn't be affected by changing brushes into patches.
If you're getting 50 fps, you probably don't need to optimize.
That's 50 fps without AI, in interior, without visportals open. Also, I would like to eventually make windows transparent and add curtains. I'm not necessarily aiming at the lower-end hardware, just decided to test whether getting rid of brushwork would help.

 

Btw, I just had a great idea - can you make a self-contained pk4 that can be run as mod with stock Doom 3? I could test it in Doom 3 BFG engine to give people an idea about performance gap between idTech 4 and Doom 3 BFG engines! (main thing is not to use anything specific to TDM, such as scripts/ARB shaders/defs)

Just in general or my case specifically? I wouldn't know what's different between TDM and vanilla Doom3, but I do have before/after versions of the scene for potential testing. Edited by chedap
Link to comment
Share on other sites

There is a bunch if FS along the walls and ceiling that could be set to "noshadows" "1", also where are the VP's in that shot..?
noshadows applied to most walls gave me like a 1 fps increase. And it's a room isolated for testing purposes, single leaf, no VP.
Link to comment
Share on other sites

How much sub-division do you have on those rounded arches?

 

So the radii of the wall lamps are not large enough to intersect with one another?

 

(The default light entities have somewhat large radius values as I recall)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

How much sub-division do you have on those rounded arches?

 

So the radii of the wall lamps are not large enough to intersect with one another?

Should be 6 or 8 subdivisions, nothing that criminal.

showlightcount: http://i.imgur.com/YtNyXdM.jpg

And wall lights do intersect, I meant that aside from a single light volume filling the room, there are also several smaller ones illuminating the chandelier itself but not touching any walls.

Link to comment
Share on other sites

Yeah, the cyan and especially the white region are the killers. You might wanna consider reducing the radii both inside and outside

the room too if there are lights outside that intersect with the room geometry. Since light brightness is proportional to light size

in Doom 3 you may need to color the light more brightly (rgb) than the default or even use a more harsh falloff.

 

I think some authors have even resorted scripting light removal based on distance to overcome light count bleed.

 

It's a good looking scene so just add "the amount of sodium" when considering any tarnish these optimizations may introduce...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yep, tris counts aren't the first thing to look for, as idTech4 can handle a lot of them. If you get performance issues, the first thing to check is the light count. But it seems Biker has solved this.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

IF those are electric lights, they should. If you are using torches or candles with lights attached to them, than you can't let them show up.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

You can pass along the spawnargs you set on the extra lights though. That's what I usually do; add a new light in DR, get it the size/colour I want, and then delete it and pass those spawnargs onto the attached light. I can't remember the syntax off the top of my head though--maybe someone else can help with that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...