Jump to content
The Dark Mod Forums

Recommended Posts

Posted
29 minutes ago, stgatilov said:

Perhaps you should add -DCMAKE_BUILD_TYPE="Release", since it is not clear whether build would be optimized or not otherwise.

Also, you can try Tracy profiler to record a performance profile.
Set "com_enableTracing 1", then download Tracy viewer of appropriate version.
More details on wiki page.

With Tracy, you can see a lot of things immediately, e.g. whether it is GPU or CPU which is slow, which parts are slow, etc.

And now I'm concerned if I wasted everyone's time and should feel bad. Did another "svn update" to 10212, completely deleted the build directory, recompiled with the -DCMAKE_BUILD_TYPE="Release" flag: Now performance is back to normal levels, loading times are also lightning fast by comparison. I don't know if the new rev fixed something or "make clean" wasn't enough or that release flag makes such a difference... if it was local all along sorry for that šŸ˜ž

But yes, everything is working like before for me now that this is solved. No performance improvement on AMD Linux... the issue lowenz reported may have been specific to Windows AMD after all, my low FPS may just be the best that is possible. Glad I can at least confirm everything seems to be well for everyone now.

  • Like 1
Posted
24 minutes ago, nbohr1more said:

I experienced a noticeable performance downgrade ( not as extreme ) so I will test again this evening and get hard numbers if anything is off.

Yeah, I guess you are the only one remaining.

27 minutes ago, MirceaKitsune said:

Did another "svn update" to 10212, completely deleted the build directory, recompiled with the -DCMAKE_BUILD_TYPE="Release" flag: Now performance is back to normal levels

I have blocked CMake build on GCC without specifying CMAKE_BUILD_TYPE to avoid such confusion in future.

7 hours ago, AluminumHaste said:

Wait, @stgatilov what did you do? I'm getting incredible performance now on Iris!
I was lucky to get 120 fps in this area a few days ago!

Hmm... I guess you feel like in this joke:

Spoiler

A Jew comes to Rabbi and starts complaining about his life:
- Rabbi, my life is so hard and I'm so tired. What should I do?
- Buy a goat.
- What? I have a wife and seven kids and we all live in a small apartment and there is no possibility to keep a goat there…
- Just follow my advise.
In a week the Jew comes to Rabbi again and starts complaining about his life even more:
- Rabbi, I followed your advice and now my life is much harder than before: the goat stinks and makes more noise than my wife and seven kids! What should I do?
- Sell the goat.

Ā 

  • Like 1
Posted
13 minutes ago, stgatilov said:

Yeah, I guess you are the only one remaining.

I have blocked CMake build on GCC without specifying CMAKE_BUILD_TYPE to avoid such confusion in future.

Hmm... I guess you feel like in this joke:

Ā  Hide contents

A Jew comes to Rabbi and starts complaining about his life:
- Rabbi, my life is so hard and I'm so tired. What should I do?
- Buy a goat.
- What? I have a wife and seven kids and we all live in a small apartment and there is no possibility to keep a goat there…
- Just follow my advise.
In a week the Jew comes to Rabbi again and starts complaining about his life even more:
- Rabbi, I followed your advice and now my life is much harder than before: the goat stinks and makes more noise than my wife and seven kids! What should I do?
- Sell the goat.

Ā 

I don't get it, sorry this stuff goes over my head.

I wasn't complaining about extra performance.....I was ecstatic

  • Like 1

I always assumed I'd taste like boot leather.

Ā 

Posted
1 hour ago, stgatilov said:

Yeah, I guess you are the only one remaining.

Yep. Not sure what was happening but a new compile and compared to 2.11 beta 2 shows matching performance.

No issues here anymore. Performance is great.

Side note, when I want to get fancy with compiles, I add a flag for my own CPU arch:

cmake -DCMAKE_BUILD_TYPE="Release" .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS=-march=ivybridge

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

( doubtful that much is gained at all )

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

Posted
7 hours ago, nbohr1more said:

Side note, when I want to get fancy with compiles, I add a flag for my own CPU arch:

cmake -DCMAKE_BUILD_TYPE="Release" .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CXX_FLAGS=-march=ivybridge

Yeah, I don't think it helps much either.
Compiler can use more instructions, but it can rarely help... maybe BMI could make a difference.

By the way, usually people write -march=native to compile for their CPU.

Posted

Manjaro seems to have gcc-12 so it's nice to know I compiled and tested with that. Wonder how much the compiler usually makes a difference in performance.

Also curious how much running TDM on Wayland over X11 will help with any extra FPS (not expecting more). KDE / Plasma has been slow to become stable on WL but it seems in recent months they finally got there for the most part: If my drawing tablet is also detected by Gimp and power saving works and all, I plan to give it another try soon. IIRC the engine now uses SDL which should already be Wayland native so any potential improvements should be supported.

Posted (edited)

Oh, one more thing now that the main issue has been resolved and this thread can hopefully be a bit generic.

1959883824_olam(2022-12-0822-59-54)(396.32-1095.95116.25).thumb.jpg.56f50dbee5c13d763770ae00b8b7692b.jpg873338084_olam(2022-12-0822-59-59)(396.32-1095.95116.25).thumb.jpg.3048fa6503f1fe451f5edc5509400689.jpg

When enabling r_useEntityScissors some ents will be cut off across visportals and not only. You can see it with a volume light here and the skybox leaving trails, sometimes the tops of guards helmets disappear into the void instead. Is this known and can anything be done to improve it? Are entity scissors possible to optimize to work for everyone in general?

I took note of this one as for me it greatly improves FPS, by more than 10 in some places! It feels sad to let it go to waste. I think the other critique was it might decrease performance if too many entities are present... wonder if a triage can be made to avoid that like making it adaptive, to be able to default it as on with maximum efficiency.

Also what was the driver issue with bindless textures and them blocking multidraw from working? IIRC multidraw was also a huge improvement as the GPU could work with copies of the same data. Is there a setting to re-enable bindless textures in case your driver does support them?

Edited by MirceaKitsune
Posted

Regarding scissors: it will be fixed in 6099, but after 2.11.
If you see some other problems (aside from cut headtops), you can leave a comment there.

Regarding bindless textures, I hope they'll never be restored.
Because in OpenGL they are completely unmanageable: you cannot debug it in any tool, and any error can crash the whole application (or driver). I've heard in Vulkan they did it in less barbaric way, so the their bindless textures are handled by various tools.

Also you understand multidraw incorrectly.
Rendering several copies of same geometry is called "instancing", and can only help when you know objects are the same... which is pretty rare I guess.

  • Like 1
Posted (edited)

Instancing was introduced back in 2004 to better handle vegetation šŸ˜›

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.

Posted

Oh: My thought on instancing was that you're using a single geometry reference for all static and animated models alike. For animated ones of course you deform each one independently, but I imagined the geometry data stored on the GPU is common. Obviously even static meshes are rendered from different angles and lighting.

So say you have 3 guards of the same type rendered in view: The GPU only stores the model for one guard... one might be standing (idle animation) another one moving (walk animation) but they're both rendered from the same geometry / texture cache so common aspects are only processed once. Actually wasn't that called VBO which we already have?

Glad to hear scissors will get improvements! I should mention the volume light issue there as well later. For now I'm happy I could confirm it makes a good difference on some maps so fixing entity scissors is worth it :)

Posted
2 hours ago, MirceaKitsune said:

Oh: My thought on instancing was that you're using a single geometry reference for all static and animated models alike. For animated ones of course you deform each one independently, but I imagined the geometry data stored on the GPU is common. Obviously even static meshes are rendered from different angles and lighting.

Models and textures are of course rendered from the same data.
But draw calls are made individually for every instance --- we don't use instancing.

What's the point of instancing?
Ask yourself: how often you see many objects with exactly the same model in one view?
Mappers try to make some variation, otherwise it looks weird.

Also, the engine does animation on CPU, so animated models don't share the geometry being rendered.

  • Like 1
Posted
On 12/13/2022 at 9:51 PM, stgatilov said:

What's the point of instancing?
Ask yourself: how often you see many objects with exactly the same model in one view?

Instancing may not be necessary for TDM dark and relative small spaces, but afaik, before UE5 nanite tech, was the only way using conventional polygon rasterization, to be able to render large open scenes. Scenes filled with large amounts of vegetation and other stuff, ala Crysis and others, those games are filled with cloned/instanced geometry all over the place and personally, I don't remember people strongly complaining about them felling very repetitive.

That's because there's ways to break the repetition and make the scene feel more unique/varied, even if they are just rendering hundreds or millions of the same geometry/model.Ā 

Just look at this IMO fantastic in-game forests scenes, in the medieval simulator game, Kingdom Come Deliverance. These are made in Cryengine 3.x, using instanced geometry and Imposters.

Ā 

  • Like 1
Posted

https://learnopengl.com/Advanced-OpenGL/Instancing

Seems pretty useful in any map that uses lots of the same model.
Seed system was added to get around this problem. By batching all the same models in a given space into one draw call (I think).

I used it in my cathedral map that had over 200 pews, I gained another 20 fps with Seed back in 2010 ish, which was huge back then. Same with the forest and the pine trees.

EDIT: For example, we're looking at about 1800 trees.

96xJR0d.png

Ā 

I could probably get another 100 FPS by using SEED volumes to combine the models into a dozen draw calls instead of 1800

Ā 

Ā 

  • Like 2

I always assumed I'd taste like boot leather.

Ā 

Posted (edited)

It definitely sounds like instancing would help on outdoor maps with lots of trees / bushes / rocks. We don't have many of them at the moment, likely because performance is already a concern given the difficulty of vis-portaling huge open spaces: This could perhaps help improve that, since if an open field only has trees and rocks repeating the same mesh this might reduce the impact of large portal rooms enough to make it bearable.

Of course lighting would remain a concern since instancing doesn't save you from the need to calculate each object and shadows in their own draw call, you'd need to add just a few torches to such a place. Other things might still tank performance in this scenario, but still it's a nice thought: I'm sure I'm not the only one who imagined what giant nature spaces might look like in a TDM FM.

Edited by MirceaKitsune
Posted

Yeah, instancing takes less memory bandwidth than simply copying geometry withint the same model.

You absolutely need good-made LODs in outdoor areas.
On top of that, you probably want to have a few different tree models to create a forest.
So it would be more like 10-15 variations, with 100-200 instances each.

  • Like 1
Posted
2 hours ago, stgatilov said:

Yeah, instancing takes less memory bandwidth than simply copying geometry withint the same model.

You absolutely need good-made LODs in outdoor areas.
On top of that, you probably want to have a few different tree models to create a forest.
So it would be more like 10-15 variations, with 100-200 instances each.

This is a case where supporting bug-free model scaling might have been useful: You could create the illusion of more different trees and rocks by randomly giving each a slightly different scale, including in the Z axis to make some plants shorter or taller while they remain as thick. I figure it's not that big of a difference but would help with an added illusion of randomness.

Random rotation helps the most and that I believe we have. Both a different spin so you always see the same trees from different sides, as well as slight angling. I think seed brushes randomize at least the Z axis, but I forgot if grass and trees also follow the rotation of the patch surface they spawn on so a diagonal slopes have a chance of spawning a diagonal tree.

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

    • datiswous

      So on a regular basis I try to start building something in Darkradiant but very quickly I loose interest and give up.
      I tend to
      create a room,Ā position an ai in it (or first ai, then room, probably better) put a light in it Put some stuff in it test the room in tdm Now I had this new idea:
      Start of with a gigantic room. To skip the importance of sealing for the time beingĀ and to think broader than one room. Then just use ground without wall, just to visualise the structure of the level. Ā Then just useĀ prefab walls and other elements (arches, etc.). Just building area's that aren't enclosed. I can always close them at a later point. Maybe this is all very logical from a mappers perspective, but tdm is the first game where I have done any kind of real mapping and I always stop at the start. It just takes too long to make something exciting.
      I want to build something at some point, because over time I accumulatedĀ lots of ideas.
      · 3 replies
    • MayheM

      It would be nice to have a link to the forum thread of a mission in download section, rather than having to search for it manually, like on Thief Guild.
      · 1 reply
    • taffernicus

      Anaglypta , floral and damask wallpaper look great in older homesĀ 
      It’s rare to see anyone using ā€œshader not foundā€ wallpaper in their house

      Ā 
      · 0 replies
    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 1 reply
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence.Ā 
      Ralf Hütter, Kraftwerk
      · 6 replies
×
×
  • Create New...