Author Topic: Optimising Sikkmod 1.2 code  (Read 2238 times)

0 Members and 1 Guest are viewing this topic.

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Optimising Sikkmod 1.2 code
« on: October 07, 2015, 05:27:36 PM »
Is there anything that can be done to the Sikkmod code that could help it be less tasking on systems? I know that the best way to do it would be to reinvent the wheel like oneofthe8devilz is doing with his hybrid engine to go about making the same effects as Sikkmod possible but with less stress on the system. But is there something that can be done to the current Sikkmod 1.2 code that maybe Sikkpin was unaware of that has now been realized since the last release of Sikkmod 1.2? Like maybe using an older version of HDR or something like that? Just thinking out loud.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

nbohr1more

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +13/-8
  • Doom Newbie
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #1 on: October 08, 2015, 12:19:10 AM »
Revelator and SteveL have gotten direct access to the depth buffer working in The Dark Mod v2.03.
You could re-engineer Sikkpin's shaders to use the native depth buffer rather than rendering depth to a texture
then decoding it. The Dark Mod team is currently working on similar stuff.

Without making engine changes like that? I don't think you'll be able to optimize what Sikk has done much further.
There are tons of derivative or variants of the Sikkpin shaders out there.

I personally liked the shader that JC Denton made for the Ruiner mod, it wasn't as fancy as Sikk's but it matched the Doom 3 look better.
Add that to Dentonmod and Doom 3 looks really nice and has nice visceral gun effects. If you wanna offer a low-end Perfected Doom 3 then
you might consider using the shaders from Ruiner.

http://www.moddb.com/mods/ruiner

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #2 on: October 08, 2015, 08:41:31 AM »
Now when u say the shaders are u talking about the files in the glprogs folder? Or actual code in the source? I didn't think the source had been released for Ruiner.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

nbohr1more

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +13/-8
  • Doom Newbie
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #3 on: October 08, 2015, 09:09:16 AM »
Just the glprogs folder.

No need for their SDK code.

nbohr1more

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +13/-8
  • Doom Newbie
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #4 on: October 08, 2015, 10:05:17 AM »

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #5 on: October 08, 2015, 10:45:11 AM »
Yeah I just saw that earlier. I guess I completely missed that.

So just using the glprogs files will help speed things up? I figured more work in the source would be needed to use some of those glprog files from other mods.

Can I still use the interaction files that come with sikkmod? I'd like to be able to use relief or Pom as would the users of PD3 I'm sure. And I love the look of the game when using sikkmods non relief/Pom custom blin-phong interaction file.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

nbohr1more

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +13/-8
  • Doom Newbie
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #6 on: October 08, 2015, 11:44:05 AM »
POM is going to be taxing on any hardware whether you have source code access or not. There is NO solution that will make POM perform well.
The entire way that POM works has largely been abandoned by the industry in favor of Tessellation. You could alter the interaction file in ruiner to
include a POM section but you will defeat the purpose of "optimizing".

As I can tell, here are the additional challenge you face:

Soft Shadows = Sikkpin's method requires re-rendering the scene 2x for each shadow and requires the depth buffer trick
DOF = Requires Sikkpin's depth buffer trick
SSAO = Requires Sikkpin's depth buffer trick
SSIL = Requires Sikkpin's depth buffer trick

All those will require Sikkpin's shaders too.

Ruiner doesn't have any code support for any of the above, the only thing you gain from it is the interaction shader and if you don't want that
you can simply stick with Sikkmod and remove the option to enable the above effects.

Does this make sense?


VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #7 on: October 08, 2015, 11:55:00 AM »
This makes perfect sense. Thank u. So using the Ruiner shaders would be a waste of time since the ability to use relief and POM must be kept as an option. I'll just stick with what I got then. When I upgrade my rig I'm sure I'll finally have more then enough to run PD3 with sikkmod features maxed out.

I was wondering something though. How does sikkmod 1.2 run for u without Pom/relief and with all the graphics features turned off? I recently tried this which i haven't ever tried and I don't get the best frame rate as i should. I get around 30-40 instead of a smooth 60 like with vanilla Doom 3. I'm using ATI. Could I have a driver issue?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 900
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Optimising Sikkmod 1.2 code
« Reply #8 on: October 08, 2015, 10:05:41 PM »
Soft Shadows = Sikkpin's method requires re-rendering the scene 2x for each shadow and requires the depth buffer trick

With modern hardware & D3 BFG optimizations, could it be better performance wise to duplicate & offset lights slightly to get "real" soft shadows?  In the mid-late 00's the biggest issue was performance.

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #9 on: October 08, 2015, 10:30:39 PM »
I'm sure that would work but I lack the knowledge to do so. In the near future I'm thinking about paying somebody to optimize the sikkmod graphics features and further push them.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 900
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Optimising Sikkmod 1.2 code
« Reply #10 on: October 08, 2015, 10:34:47 PM »
Did a test in a custom made I made a while ago.

Run though with map as is (timedemo run 3 times) ~622fps.  Triple the lights & (timedemo run 3 times) ~279fps.  So it would be a big performance hit.

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #11 on: October 08, 2015, 10:40:12 PM »
What is this u are showing results for?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

nbohr1more

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +13/-8
  • Doom Newbie
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #12 on: October 08, 2015, 10:46:58 PM »
OK for a performance comparison:

1) HDR / Color Grading / Bloom / Wulfen Textures = 45 to 60 FPS in Mars City (hovers around 50)
2) Add SSAO Crytech (blur quality 2) = 25 to 30 FPS
3) Add Soft Shadows remove SSAO = 15 to 23 FPS (mostly 20 FPS)

4) POM and no other effects? 9 FPS or Less   ;D

Resolution = 1440x900

CPU = 3.4 Ghz i3-2130
GPU = Geforce GT 730 1GB (384 cores)

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Optimising Sikkmod 1.2 code
« Reply #13 on: October 08, 2015, 10:58:48 PM »
That's about me too. AMD 940 black edition with a Radeon 5870 1024ghz GPU. I'm seriously thinking of paying to have the sikkmod source rebuilt to use better methods for the enhanced graphics features. Unless the Friar already has something better. His results seem much better.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 900
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Optimising Sikkmod 1.2 code
« Reply #14 on: October 08, 2015, 11:06:38 PM »
What is this u are showing results for?

Trying to duplicate lights to make real soft shadows vs a shader.