Jump to content
The Dark Mod Forums
Sign in to follow this  
cavador_8

multi core enhancement is awesome!

Recommended Posts

I haven't played the darkmod in a little while and I just discovered a new setting in the advanced video section called multi core enhancement. I cannot express enough how awesome this setting is! With multi core enhancement on, I can play any mission at 4k resolution with absolutely no frame rate drops. Was this implemented with version 2.06? Maybe I just never noticed it before? Whoever is responsible, I am truly grateful. In my opinion, this is the most brilliant setting ever for the darkmod! :D:D

Edited by cavador_8
  • Like 2

Share this post


Link to post
Share on other sites

Thank Cabalistic. This was ported from his TDM VR branch.

 

Though I guess you could also thank John Carmack since the VR branch was influenced by

the BFG renderer.

 

And you certainly will want to thank Duzenko and Stgatilov who helped refine parts of this change

and improved the way that the lightgem works with it.

  • 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...)

Share this post


Link to post
Share on other sites

YES! I thank each and every one of those guys! :D THANK YOU, THANK YOU, THANK YOU! I love this setting. Please don't ever remove it. I just redownloaded "In the Black" and I am now flying through it at a solid 60 fps, whereas I had lots of frame rate issues with that mission when it first came out. Thanks again!

Edited by cavador_8
  • Like 1

Share this post


Link to post
Share on other sites

Thank Cabalistic. This was ported from his TDM VR branch.

 

Though I guess you could also thank John Carmack since the VR branch was influenced by

the BFG renderer.

 

And you certainly will want to thank Duzenko and Stgatilov who helped refine parts of this change

and improved the way that the lightgem works with it.

 

Continuing this chain you will eventually be thanking Isaac Newton.

 

(I just dropped by to make this joke)

  • Like 1

Share this post


Link to post
Share on other sites

Currently, we mostly split up the frontend and backend between 2 cores.

 

Scripts can spawn threads that take advantage of any available cores but mission authors

rarely use the thread feature in their scripts.

 

To my knowledge, SIMD calculations for shadow volumes also take advantage of all the SIMD units

on all cores too. It would be cool to have some testing data on this one.


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...)

Share this post


Link to post
Share on other sites

Currently, we mostly split up the frontend and backend between 2 cores.

Two TDM threads plus the invisible OpenGL driver thread

Adding more threads are not likely to help due to RAM access quickly becoming the bottleneck

 

 

Scripts can spawn threads that take advantage of any available cores but mission authors

rarely use the thread feature in their scripts.

For all I know there's a naming confusion. The script idThread's all run on the main thread.

  • Like 1

Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

Does it use the features given by hyperthreading?


"I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass."...

- 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.

Share this post


Link to post
Share on other sites

I wonder if something like multi core enhancement could be implemented in the dark engine for Thief 2? It seems like lately more and more Thief 2 fan mission creators are pushing the boundaries of the dark engine at the cost of frame rate. For instance, I just played an excellent mission called CNSD. It was a wonderful experience and the mission was very well designed, except that in many places the frame rate takes a dive to the 30s-40s. Would something like multi core enhancement be feasible for Thief 2?

Edited by cavador_8

Share this post


Link to post
Share on other sites

Thief 2 is still a DX6 engine at its core. It would have to be re-written in many places to accomodate for higher complexity. Just throwing more raw power at it won't do (see Gecko's efforts).

Share this post


Link to post
Share on other sites

Still amazes me the fact that we talk about the Dark Engine of Thief/Thief2.....20 years later :D

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Share this post


Link to post
Share on other sites

It's worth noting that it is still an "experimental" feature, because it does have some negative side effects for some people. I got random crashes with it on.

Share this post


Link to post
Share on other sites

There's no clear answer for Thief 2. Supposedly the "newdark" executable was compiled using leaked source code. Therefore it's possible that the newdark team could radically alter how the render engine works ( in fact, they already did to some degree ). Whether anyone in that group would dare to try Multicore / SMP is anyone's guess.


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...)

Share this post


Link to post
Share on other sites

It's worth noting that it is still an "experimental" feature, because it does have some negative side effects for some people. I got random crashes with it on.

So far, I haven't experienced any crashes with this setting on. I am using the 416.94 Nvidia drivers on Windows 7. I have been testing several fan missions and they have all been running at a solid 60 fps. I have only encountered frame rate issues with two missions, A New Job Mission 1 and Briarwood Manor. Multi core enhancement doesn't seem to help these two. In A New Job M1, if you exit the tavern and enter the short tunnel in front of the tavern and turn around and face the tavern, the frame rate drops into the 30s for me. In Briarwood Manor, the entire outside area dips into the 30s.

Edited by cavador_8
  • Like 1

Share this post


Link to post
Share on other sites

Stability (and speed) is very likely to improve with 2.07. Right now, most of the trouble people might experience is probably due to the two threads both calling to OpenGL. 2.07 introduces the vertex cache enhancements which removes the need of the frontend thread to access OpenGL.

 

As mentioned, the multi-core enhancement is really just a dual-core enhancement at the moment, splitting the renderer into a "frontend" and "backend". Frontend is basically the CPU path collecting what and how to render, whereas the backend is the path actually issuing OpenGL render commands. I did experiment with splitting up the frontend further over multiple cores, and I do have some working code lying around that improves frontend speed. However, the gain is not as spectacular, and it currently does not help, because in those locations where it actually helps, the backend uses at least as much time, and so speeding up the frontend without also speeding up the backend does not result in any net FPS gain. When we get around to overhauling the GL backend, this might be worth reinvestigating :)

  • Like 2

Share this post


Link to post
Share on other sites
I have been testing several fan missions and they have all been running at a solid 60 fps.

 

TDM struggles with higher resolutions, but that depends on other settings too. I have framerate drops in 1440p, but I use e.g. high quality soft shadows. It's probably more sensitive to that in 2160p, unless soft shadows are off.

Share this post


Link to post
Share on other sites

Yeah, I don't use soft shadows. I can't tell the difference too much with shadows so I figured it's not worth a performance hit. I have a gtx1080 with 16gb ram and an i7 processor so I guess that's why I can play the darkmod at 4k and get 60fps with multi core enhancement turned on.

Share this post


Link to post
Share on other sites

Now that I have had more time to play some missions with multi core enhancement on, I believe it still needs some improvement. It's really inconsistent. For example, sometimes in WS4 The Warrens near the docks I get 60 fps. Then sometimes it drops to 30 fps in this area, even with multi core enhancement on. Perhaps in version 2.07 this function will be fixed and more consistent?

Edited by cavador_8

Share this post


Link to post
Share on other sites

What's the baseline fps you get without it on that map?

 

The enhancement is only effective if frontend and backend take roughly the same amount of time. There are situations where this is not the case; in those instances the enhancement will not help.

Share this post


Link to post
Share on other sites

In WS4 The Warrens, I am getting 60fps until the docks area. Then sometimes in the docks area I still get 60fps. However, sometimes it dips into the 30's and 40's for no apparent reason.

Share this post


Link to post
Share on other sites

Scripts can spawn threads that take advantage of any available cores but mission authors rarely use the thread feature in their scripts.

Is there wiki article about this..?

Share this post


Link to post
Share on other sites

The only way I can maintain a solid 60fps in any mission is with multi core enhancement ON and post processing OFF. This way, I always get a consistent 60fps in the docks area in WS4 The Warrens.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...