Jump to content
The Dark Mod Forums

Slow Performance Fix


Jay32

Recommended Posts

The Doom 3 engine simply didn't have as much work to do as the TDM engine does. It is calculating complex AI, more lights, larger maps, light gem calculations, and also complicated sound paths. It's not just a bunch of new models and textures on top of the D3 engine, the TDM engine is an entirely different beast.

 

If the engine could be updated to take advantage of multi-core processors, it would probably help quite a bit. I would be curious to see if assigning light gem calculation to a second core if available would make any difference. I know turning off light gem calculation increases fps a LOT for people who have tried it. Of course, the AI can't see you then but it at least shows where one of the biggest hits is coming from.

  • Like 1
Link to comment
Share on other sites

I don't imagine there's much to gain from parallelization with so much of the light gem being handled on the GPU in the form of additional render passes.

 

You could opt for a simplified calculation on the CPU. It should be possible to lookup light texture values directly using a set of sample points and approximating the lighting from there. The six vertices that make up the prism would be an ideal match. Of course it's easier to say all this than to do it. You have to account for things like light color, flickering shaders, player leaning, and shadow volumes. But then I wonder how much work would be spent replicating things the renderer already does.

 

Another possible route is simplifying the additional render passes. There's no reason to do per pixel lighting calculations on an non-textured, non-smooth shaded, primitive. Maybe there's a way to fold the light gem illumination into the existing interaction shader so you don't need additional passes at all.

Edited by rich_is_bored
Link to comment
Share on other sites

tdm_lg_weak is on the CPU.

 

The normal Lightgem is on the GPU and CPU.

 

Rich has brought up something I discussed in bug-tracker before.

 

Making a sorta low resolution representation of the light texture data in tables to have a Lightgem that's still pretty

accurate but has lower impact and gaining the benefit of better AI behavior in relationship to lit alerts as well.

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

 

 

I have an Nvidia Geforce GT 730 with an i3-2130 (3.4Ghz)

 

Performance is better on 2.04 than 2.03 for me and tdm_lg_interleave works as expected in most cases.

 

Driver settings:

 

Do you have vsync enabled?

 

Is your power profile set to maximum performance?

 

Is the profile set to Single Display?

 

Are threading optimizations enabled?

 

also, please post your Darkmod.cfg

Vsync enabled in driver and in darkmod, i tried enabling and disabling vsync in both places, still performance stays on the same 20 fps level.

 

Power profile is balanced.

 

Single Display enabled.

 

Threading optimization, enabled, i tried disabling it, performance is the same.

 

I noticed that if DarkMod is running fullscreen 1366x768 i see max 30FPS when in mission (with tdm_lg_interleave=0) but in window mode 1366x768 (with tdm_lg_interleave=0) there is 50-60 FPS. What can cause that?

 

All these test was performed on "Chalice of Kings" mission.

 

Below is my DarkMod.cfg

 

unbindall
bind "ENTER" "_impulse51"
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveup"
bind "-" "_impulse50"
bind "0" "_impulse10"
bind "1" "_impulse1"
bind "2" "_impulse2"
bind "3" "_impulse3"
bind "4" "_impulse4"
bind "5" "_impulse5"
bind "6" "_impulse6"
bind "7" "_impulse7"
bind "8" "_impulse8"
bind "9" "_impulse9"
bind "=" "_impulse49"
bind "[" "_impulse48"
bind "\" "_mlook"
bind "]" "_impulse47"
bind "^" "_impulse0"
bind "a" "_moveleft"
bind "c" "_impulse24"
bind "d" "_moveright"
bind "e" "_impulse46"
bind "f" "_impulse44"
bind "g" "inventory_use '#str_02396'"
bind "i" "inventory_cycle_group '#str_02391'"
bind "k" "inventory_cycle_group '#str_02392'"
bind "l" "inventory_use '#str_02395'"
bind "m" "inventory_cycle_maps"
bind "o" "_impulse19"
bind "p" "inventory_cycle_group '#str_02389'"
bind "q" "_impulse45"
bind "r" "_impulse52"
bind "s" "_back"
bind "u" "_impulse51"
bind "v" "inventory_hotkey '#str_02397'"
bind "w" "_forward"
bind "x" "_impulse23"
bind "y" "clientMessageMode 1"
bind "z" "_zoom"
bind "BACKSPACE" "inventory_hotkey"
bind "PAUSE" "pause"
bind "UPARROW" "_forward"
bind "DOWNARROW" "_back"
bind "LEFTARROW" "_left"
bind "RIGHTARROW" "_right"
bind "ALT" "_strafe"
bind "CTRL" "_button5"
bind "SHIFT" "_speed"
bind "DEL" "_lookdown"
bind "PGDN" "_lookup"
bind "END" "_impulse18"
bind "F3" "_impulse17"
bind "F4" "savegame quick"
bind "F5" "loadgame"
bind "F6" "_impulse20"
bind "F7" "_impulse22"
bind "F9" "loadgame quick"
bind "F12" "screenshot"
bind "MOUSE1" "_attack"
bind "MOUSE2" "_impulse41"
bind "MOUSE3" "_zoom"
bind "MWHEELDOWN" "_impulse14"
bind "MWHEELUP" "_impulse15"
seta gui_mediumFontLimit "0.30"
seta gui_smallFontLimit "0.15"
seta radiant_entityMode "0"
seta net_socksPassword ""
seta net_socksUsername ""
seta net_socksPort "1080"
seta net_socksServer ""
seta net_socksEnabled "0"
seta win_ypos "52"
seta win_xpos "55"
seta sys_lang "english"
seta s_decompressionLimit "6"
seta s_useEAXReverb "0"
seta s_useOpenAL "0"
seta s_libOpenAL "openal32.dll"
seta s_numberOfSpeakers "2"
seta s_doorDistanceAdd "450"
seta s_globalFraction "0.8"
seta s_subFraction "0.75"
seta s_playDefaultSound "1"
seta s_volume_dB "0"
seta s_meterTopTime "2000"
seta s_reverse "0"
seta s_spatializationDecay "2"
seta s_maxSoundsPerShader "0"
seta s_diffractionMax "10"
seta r_screenshot_format "jpg"
seta r_debugArrowStep "120"
seta r_debugLineWidth "1"
seta r_debugLineDepthTest "0"
seta r_cgFragmentProfile "best"
seta r_cgVertexProfile "best"
seta r_forceLoadImages "0"
seta r_shadows "1"
seta r_offsetunits "-0.1"
seta r_offsetfactor "-2"
seta r_skipBump "0"
seta r_skipSpecular "0"
seta r_skipNewAmbient "0"
seta r_renderer "best"
seta r_brightness "1"
seta r_gamma "1"
seta r_swapInterval "0"
seta r_useIndexBuffers "1"
seta r_customHeight "768"
seta r_customWidth "1366"
seta r_fullscreen "1"
seta r_mode "-1"
seta r_multiSamples "16"
seta image_downSizeLimit "256"
seta image_ignoreHighQuality "0"
seta image_downSizeBumpLimit "128"
seta image_downSizeSpecularLimit "64"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_useCache "0"
seta image_cacheMegs "20"
seta image_cacheMinK "200"
seta image_usePrecompressedTextures "1"
seta image_useNormalCompression "2"
seta image_useAllFormats "1"
seta image_useCompression "1"
seta image_preload "1"
seta image_roundDown "1"
seta image_forceDownSize "0"
seta image_downSize "0"
seta image_lodbias "0"
seta image_anisotropy "16"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta gui_filter_game "0"
seta gui_filter_idle "0"
seta gui_filter_gameType "0"
seta gui_filter_players "0"
seta gui_filter_password "0"
seta net_clientDownload "1"
seta net_master4 ""
seta net_master3 ""
seta net_master2 ""
seta net_master1 ""
seta net_clientMaxRate "16000"
seta net_serverMaxClientRate "16000"
seta m_strafeSmooth "4"
seta m_smooth "1"
seta m_strafeScale "6.25"
seta m_yaw "0.022"
seta m_pitch "-0.022"
seta sensitivity "5"
seta in_toggleZoom "0"
seta in_toggleCrouch "0"
seta in_toggleRun "0"
seta in_alwaysRun "0"
seta in_freeLook "1"
seta in_anglespeedkey "1.5"
seta in_pitchspeed "140"
seta in_yawspeed "140"
seta gui_configServerRate "0"
seta com_numQuickSaves "2"
seta com_guid ""
seta com_preloadDemos "0"
seta com_compressDemos "1"
seta com_product_lang_ext "1"
seta com_videoRam "2048"
seta com_showFPS "1"
seta com_purgeAll "0"
seta com_machineSpec "-1"
seta g_spectatorChat "0"
seta net_clientLagOMeter "1"
seta r_postprocess_bloomKernelSize "2"
seta r_postprocess_bloomIntensity "0.253968"
seta r_postprocess "1"
seta net_serverDlTable ""
seta net_serverDlBaseURL ""
seta net_serverDownload "0"
seta mod_validSkins "skins/characters/player/marine_mp;skins/characters/player/marine_mp_green;skins/characters/player/marine_mp_blue;skins/characters/player/marine_mp_red;skins/characters/player/marine_mp_yellow"
seta g_mapCycle "mapcycle"
seta g_voteFlags "0"
seta g_gameReviewPause "10"
seta g_countDown "10"
seta g_password ""
seta g_testModelHeadJoint "Spine2"
seta g_testModelHead "atdm:ai_head_citywatch"
seta g_showBrass "1"
seta g_showProjectilePct "0"
seta g_showHud "1"
seta g_showPlayerShadow "0"
seta pm_walkspeed "70"
seta g_showcamerainfo "0"
seta g_damageScale "1"
seta g_decals "1"
seta g_doubleVision "1"
seta g_bloodEffects "1"
seta g_projectileLights "1"
seta g_muzzleFlash "1"
seta gui_CenterY "0.5"
seta gui_CenterX "0.5"
seta gui_Height "1.0"
seta gui_Width "1.0"
seta r_fovRatio "0"
seta r_aspectRatio "1"
seta ui_showGun "1"
seta ui_autoSwitch "1"
seta ui_team "Red"
seta ui_skin "skins/characters/player/marine_mp"
seta ui_name "Player"
seta si_serverURL ""
seta si_spectators "1"
seta si_usePass "0"
seta si_warmup "0"
seta si_teamDamage "0"
seta si_timeLimit "10"
seta si_fragLimit "10"
seta si_maxPlayers "4"
seta si_map "game/mp/d3dm1"
seta si_gameType "singleplayer"
seta si_name "DOOM Server"
seta tdm_lod_bias "3.0"
seta tdm_voice_from_off_volume "0"
seta tdm_voice_player_volume "0"
seta tdm_music_volume "0"
seta tdm_ambient_method "0"
seta tdm_door_auto_open_on_unlock "1"
seta tdm_bow_aimer "0"
seta tdm_lp_debug_hud "0"
seta tdm_lp_pawlow "0"
seta tdm_lp_randomize "1"
seta tdm_lp_auto_pick "0"
seta tdm_lp_autopick_attempts "3"
seta tdm_lp_pick_timeout "500"
seta tdm_lp_sample_delay "10"
seta tdm_lp_base_count "5"
seta tdm_empty_model "models/darkmod/misc/system/empty.lwo"
seta tdm_lg_split "0"
seta tdm_lg_model "models/darkmod/misc/system/lightgem.lwo"
seta tdm_lg_weak "0"
seta tdm_lg_interleave "1"
seta pm_rope_snd_rep_dist "32"
seta pm_min_stepsound_interval "200"
seta pm_stepvol_crouch_creep "-7"
seta pm_stepvol_crouch_run "4"
seta pm_stepvol_crouch_walk "-2"
seta pm_stepvol_creep "-5"
seta pm_stepvol_run "8"
seta pm_stepvol_walk "0"
seta tdm_underwater_blur "3"
seta tdm_rope_pull_force_factor "140"
seta tdm_inv_use_visual_feedback "1"
seta tdm_door_control "0"
seta tdm_inv_use_on_frob "1"
seta tdm_inv_loot_sound "frob_loot"
seta tdm_inv_hud_pickupmessages "1"
seta tdm_hud_hide_lightgem "0"
seta tdm_hud_opacity "0.793651"
seta tdm_grabber_reverse_control "0"
seta tdm_bounce_sound_min_vel "80"
seta tdm_bounce_sound_max_vel "400"
seta tdm_throw_max_vel "900"
seta tdm_throw_time "1200"
seta tdm_throw_max "3500"
seta tdm_throw_min "600"
seta tdm_phys_show_momentum "0"
seta tdm_ai_hearing_hardcore "1.5"
seta tdm_ai_hearing_challenging "1.0"
seta tdm_ai_hearing_forgiving "0.6"
seta tdm_ai_hearing_nearly_deaf "0.2"
seta tdm_ai_hearing "2"
seta tdm_ai_vision_hardcore "1.5"
seta tdm_ai_vision_challenging "1.2"
seta tdm_ai_vision_forgiving "0.6"
seta tdm_ai_vision_nearly_blind "0.2"
seta tdm_ai_vision "1"
seta tdm_melee_difficulty "normal"
seta tdm_melee_max_particles "10"
seta tdm_melee_forbid_auto_parry "0"
seta tdm_melee_auto_parry "0"
seta tdm_melee_invert_parry "0"
seta tdm_melee_invert_attack "0"
seta tdm_melee_mouse_thresh_ "0"
seta tdm_dragged_item_highlight "1"
seta tdm_drag_encumber_max "0.4"
seta tdm_drag_encumber_maxmass "55"
seta tdm_drag_encumber_minmass "10"
seta tdm_drag_jump_masslimit "20"
seta tdm_drag_af_free "0"
seta tdm_drag_af_ground_timer "800"
seta tdm_drag_damping_af "0.4"
seta tdm_drag_damping "0.0"
seta tdm_drag_stuck_dist "38.0"
seta tdm_drag_force_max "100000"
seta tdm_drag_limit_force "1"
seta tdm_collision_damage_scale_horiz "0.5"
seta tdm_collision_damage_scale_vert "1"
seta tdm_frob_fadetime "100"
seta tdm_frob_width "10.0"
seta tdm_frob_distance_default "63"
seta pm_lean_toggle "0"
seta pm_lean_door_bounds_exp "8.0"
seta pm_lean_door_max "40"
seta pm_lean_door_increments "10"
seta pm_lean_to_valid_increments "25"
seta pm_lean_forward_stretch "15"
seta pm_lean_forward_height "0.4"
seta pm_lean_forward_time "400.0"
seta pm_lean_forward_angle "2"
seta pm_lean_stretch "2"
seta pm_lean_height "0.4"
seta pm_lean_time "400.0"
seta pm_lean_angle "15.0"
seta tdm_reattach_delay "100"
seta tdm_crouch_toggle_hold_time "400"
seta tdm_toggle_crouch "1"
seta tdm_footfall_sounds_movetype_specific "1"
seta pm_mantle_minflatness "0.707"
seta pm_mantle_height "0.2"
seta pm_mantle_reach "0.5"
seta pm_weightmod "1"
seta pm_push_max_mass "200"
seta pm_push_heavy_threshold "0.15"
seta pm_push_accel_time "1000"
seta pm_push_start_delay "1000"
seta pm_push_maximpulse "300"
seta pm_pushmod "0.15"
seta pm_max_swimspeed_mod "1.4"
seta pm_crouchmod "0.54"
seta pm_creepmod "0.44"
seta pm_runmod "2.12"
seta tdm_savegame_compress "1"
seta tdm_force_savegame_load "0"
seta tdm_mainmenu_confirmquit "1"
seta tdm_debug_aastype "aas32"
seta tdm_allow_http_access "1"
seta tdm_proxy_pass ""
seta tdm_proxy_user ""
seta tdm_proxy ""
seta tdm_fm_restart_delay "0"
seta tdm_default_relations_def "atdm:team_relations_default"
seta tdm_show_trainer_messages "1"
seta tdm_menu_music "1"
seta tdm_wideScreenMode "5"
seta tdm_interaction_vfp_type "1"
seta tdm_ai_show_aasfuncobstacle_state "0"
seta tdm_show_health "0"
seta tdm_ai_debug_greetings "0"
seta tdm_ai_debug_transition_barks "0"
seta tdm_ai_opt_update_enemypos_interleave "48"
seta tdm_ai_opt_interleavethinkframes "0"
seta tdm_ai_opt_interleavethinkskipPVS "0"
seta tdm_ai_opt_interleavethinkmaxdist "0"
seta tdm_ai_opt_interleavethinkmindist "0"
seta tdm_ai_search_type "4"
seta tdm_ai_visdist_show "0.0"
seta tdm_ai_search_show "0.0"
seta tdm_showko "0"
seta tdm_showsprop_radius "0"
seta tdm_showsprop "0"
seta tdm_spr_debug "0"
seta tdm_sndprop_disable "0"
seta tdm_ai_acuity_susp "1.2"
seta tdm_ai_acuity_L5 "1.5"
seta tdm_ai_acuity_L4 "1.3"
seta tdm_ai_acuity_L3 "1.1"
seta tdm_ai_show_conversationstate "0"
seta tdm_ai_show_enemy_visibility "0"
seta tdm_ai_sight_scale "1000.0"
seta tdm_ai_sight_thresh "1.0"
seta tdm_ai_showelevator "0"
seta tdm_ai_showdoor "0"
seta tdm_ai_debug_blocked "0"
seta tdm_ai_showAASarea "0"
seta tdm_ai_showgoalpos "0"
seta tdm_ai_showdest "0"
seta tdm_ai_showalert "0"
seta tdm_ai_showtasks "0"
seta tdm_ai_showanimstate "0"
seta tdm_ai_showko "0"
seta tdm_ai_showfov "0"
seta tdm_ai_debug "0"
seta tdm_ai_bumpobject_impulse "250"
seta tdm_ai_tact "20.0"
seta tdm_ai_sight_combat_cutoff "20.0"
seta tdm_ai_sightmin "15.0"
seta tdm_ai_sightmax "40.0"
seta tdm_ai_sight_mag "1.0"
seta tdm_ai_sight_prob "0.7"
seta tdm_ai_showname "0"
seta tdm_ai_showbark "0"
seta tdm_ai_sndvol "0.0"
seta tdm_player_wait_until_ready "1"

 

 


Link to comment
Share on other sites

The LG interleave value determines how often the lightgem scenes are rendered.

 

The higher the value, the less often they are rendered (more frames skipped).

 

I see you have AA and AF set to maximum values. Unfortunately, AA is still pretty expensive in this engine because it's done selectively (CPU work).

Try lowering to 4xAA and 8xAF.

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

  1. Vsync enabled in driver and in darkmod, i tried enabling and disabling vsync in both places, still performance stays on the same 20 fps level.

Power profile is balanced.

I noticed that if DarkMod is running fullscreen 1366x768 i see max 30FPS when in mission (with tdm_lg_interleave=0) but in window mode 1366x768 (with tdm_lg_interleave=0) there is 50-60 FPS. What can cause that?

  1. Assume you mean you disable Vsync in The Darkmod (TDM) and in the nVidia control panel (CP)..?

Set this to max performance in in the nVidia CP and set the power config in windows to High Performance

Try running at 1280*720 instead.

Also set the advanced video settings in TDM to simple/default

Link to comment
Share on other sites

The LG interleave value determines how often the lightgem scenes are rendered.

 

The higher the value, the less often they are rendered (more frames skipped).

 

I see you have AA and AF set to maximum values. Unfortunately, AA is still pretty expensive in this engine because it's done selectively (CPU work).

Try lowering to 4xAA and 8xAF.

 

That was AA :) i lowered it to 4x, disabled vsync, restarted DarkMod and now it plays smooth 60FPS at 1920x1080 with everything maxed out on advanced gfx options, 4xAA, 16xAF.

 

Thanx guys for guidance :)

Edited by Prometheus
Link to comment
Share on other sites

I'm gonna try disabling AA for the lightgem passes:

 

Lightgem.cpp

 

 

 
m_Lightgem_rv.prevAA = renderSystem->r_multiSamples.GetInteger();

renderSystem->r_multiSamples.SetInteger( 0 )
renderSystem->CropRenderSize(DARKMOD_LG_RENDER_WIDTH, DARKMOD_LG_RENDER_WIDTH, true, true);
renderSystem->UnCrop();
renderSystem->r_multiSamples.SetInteger(m_Lightgem_rv.prevAA)
 
Edit:

 

It seems that this needs renderSystem_init but you cannot include that in the game dll classes where

LightGem lives. Time to look at how virtual classes work I guess.

  • Like 1

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

  • 2 months later...

Yeah. Because of how WGL window creation works, you can't change AA without reinitializing the engine.

We'd need to implement shader based AA to workaround this limitation unless there's some workaround I overlooked.

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

I think this idea is obsolete now but I was operating on the hunch that the whole scene is rendered then is cropped.

I had this suspicion since a forum poster indicated that either lowering AA or disabling the lightgem produced the same Performance boost.

 

Now that we are culling a substantial amount of scene geometry, the benefit of disabling AA is probably minimal. Though I've proven my own pessimism wrong a few times during this dev cycle so who knows. It would be cool to have shader based AA anyway to allow users to change quality and compare without delays.

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

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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.
      · 4 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
×
×
  • Create New...