Jump to content
The Dark Mod Forums

TDM Engine Development Page


Recommended Posts

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Video #1 is up. I'll add the second one to this post in about half an hour.   http://youtu.be/iumyzCicOzM   Note to self: I really must learn to put a proper light or two in even if it's only a test m

Good news, this works out better all round.   The 2.02 release shader (that doesn't have the extra colours) uses far fewer samples than the one I was adapting above, so I've put in the extra sample to

Yes it can be fixed using currentDepth but as expected it creates a slightly calm area round the object:     Although that's probably better than the distortion.

Posted Images

Download it. It's part of an dll called vccomp<version>.dll. Putting that into your darkmod directory should do the trick (unsure about that, as I did not need to do it).

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

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

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 post
Share on other sites

Obs may not have seen the problem if he compiled under Linux as OpenMP is included there as I recall?

 

(The current struggle is to get it working with Windows.)

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 post
Share on other sites

I've compiled under Windows ;)

  • Like 1

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

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

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 post
Share on other sites

Hello.

 

I been working on and off to get this thing working and some parts are indeed working just not giving any noticable performance improvements yet.

The last thing thats still keeping it from release is that the #pragma omp calls dont seem to work correctly on windows (patch originated from a linux user) and will hang the engine.

I do have the Intel compiler though and it should be possible to set it up to point out where omp would give the biggest benefit and also provide the nessesary code changes.

 

Ill post back if i get something going :).

  • Like 2
Link to post
Share on other sites

I've got a bit of experience with omp (and TBB, and Boost Threads, and pthreads), so I'd like to have a look at the code / diffs.

 

More for the rest of us trying to compile and see the benefits: on Windows you'll need to enable OpenMP support in VS under the Engine project properties (C/C++ -> Language) and under Linux, the -fopenmp open needs to be set for GCC (the compilers ignore the omp pragmas otherwise).

  • Like 1

I am the bat. The night is mine.

Link to post
Share on other sites

Okay, I just got bit by the missing omp.h file. <_<

 

Can someone tell me exactly what I need to do to fix this?

 

And how did this not get included in the project in the first place, when it was first identified as needed?

Link to post
Share on other sites

More for the rest of us trying to compile and see the benefits: on Windows you'll need to enable OpenMP support in VS under the Engine project properties (C/C++ -> Language)...

 

I added this for the Engine.

 

Building the DLL complains, so I also added it for the DLL. But the build is still complaining about not being able to find omp.h.

 

HELP!

Link to post
Share on other sites

I just got caught up with this thread.

 

We already have boost threads.

 

Why are we interested in OpenMP?

 

Is this simply to try to interest people in the community who work in open source areas?

 

I'm curious, because I've begun experimenting with boost threads to improve the loading time, and if we're moving to something completely different, then I need to wait for that to be proven and working before continuing the experiment.

Link to post
Share on other sites

Nothing but crickets here, so ...

 

After searching around, I found a comment that omp.h is not included in Visual Express. Thus the failures, since that's what I use to build.

 

I found an archive that would provide me with the missing pieces. After installing them, and making the project change suggested by taaaki, the build completed properly.

 

In the future, if someone finds that something missing is needed to support work that that person has committed to SVN, PLEASE ALERT THE REST OF US, and provide the missing parts and instructions on what project changes are needed, if they are. This will save us hours of lost time.

 

For anyone encountering this problem on Windows, here is the archive I found:

 

OpenMP-Studio-Express.zip.txt

 

Now I have to go figure this out for Linux, since it's suffering the same problem.

Link to post
Share on other sites

I added this for the Engine.

 

Building the DLL complains, so I also added it for the DLL. But the build is still complaining about not being able to find omp.h.

 

HELP!

 

My VS2010 has omp.h under C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\omp.h. Maybe check if it lives there in your Windows VM (might require the non-free version).

 

Boost Threads basically just provides a wrapper around a lower-level threading library like pthreads. OpenMP provides nice and simple way of defining parallelism using compiler pragmas. The compiler then inserts the relevant threading code (using pthreads or whatever the particular compiler uses - I guess MSVS uses the Windows threading libs). I don't see why both can't be used simultaneously. OpenMP is far simpler to implement and maintain in there areas where its use makes sense (data parallelism, certain task-based parallelism, etc.).

I am the bat. The night is mine.

Link to post
Share on other sites

I actually reckon we just remove the current OpenMP changes. We should only be committing code to SVN that works. I'm happy to work with someone on this on the side or in a branch, but it shouldn't hit trunk until it's ready.

I am the bat. The night is mine.

Link to post
Share on other sites

I actually reckon we just remove the current OpenMP changes. We should only be committing code to SVN that works. I'm happy to work with someone on this on the side or in a branch, but it shouldn't hit trunk until it's ready.

 

The commits to SVN don't work, or they cause the builds on Express to not work?

 

SVN should only be receiving code changes that work. (In the case of the recent sikk changes, it was probably okay because they could be turned off at the Main menu.)

Link to post
Share on other sites

The commits to SVN don't work, or they cause the builds on Express to not work?

 

It's not to do with the version of VS from what I can tell (although, I'm not actually sure if Express actually supports compiling with OpenMP). Even with the correct headers and compiler flags, the code in svn trunk is syntactically incorrect, so it won't compile. I'm just going to comment out the omp stuff and commit so that other work can continue (I'll also commit the updated SCons scripts for building with OpenMP support on Linux - will make it possible to toggle with or without).

I am the bat. The night is mine.

Link to post
Share on other sites

I have opened a bountysource tracker for porting BFG's GPU skinning to vanilla Doom 3:

 

https://www.bountysource.com/issues/2883499-port-gpu-skinning

 

This would be for raynorpat's morpheus branch which already has BFG's VBO and GLSL backend.

 

Whether this ever helps TDM, at least the campaign may help getting more activity going on the vanilla Doom 3 scene.

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 post
Share on other sites

So it seems revelator has a new repo to continue his previous work:

 

https://github.com/revelator/Revelation

 

It looks like he added BFG's "constrain shadow volume to light volume and player view" optimizations...

 

He's also converting the built-in tools to wxwidgets similar to what Greebo is doing to Dark Radiant.

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 post
Share on other sites
  • 2 weeks later...

I created a bountysource tracker for replacing the realtime script interpreter with a JIT implementation.

DanielGibson has recommended the use of LLVM for this feature:

 

https://www.bountysource.com/issues/3139677-feature-request-jit-for-script-compiling

 

Shall I open a local bugtracker for this too? Anyone familiar with LLVM?

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 post
Share on other sites

Heh, that is actually an idea I had a while back (using LLVM for the script interpreter). I don't have any LLVM experience, but I do have a wee bit of (university) compiler development experience, so I was going to use this as a learning project. It's not on my current todo list though (which has been delayed trying to get a complete and correct SVN to Hg conversion going).

  • Like 1

I am the bat. The night is mine.

Link to post
Share on other sites

Has anyone done any profiling to see how much time tdm is spending in scripts and in handovers between the script interpreter and the game code? There's code in the animation scripts that I've been looking at recently that looks like it passes control back and forth several times per frame per ai, but I've no idea whether that has a noticeable effect or not. I don't know anything about llvm so can't contribute to that party of the conversation but I can help reduce the context switching if that turns out to be a burden. That's a big part of my day job: the main platform I develop on (Oracle) has an overhead for every context switch between pl/sql and sql, and in some apps it can really add up.

Link to post
Share on other sites

My initial interest is in the script interpreter to LLVM idea was more for improved error-checking and warnings and not so much on the performance side. Like I said, it isn't on my current todo list, so I haven't given it too much thought. So yeah, don't expect anything from me on this topic until after I've finished off some other stuff and have some time to think about it properly (assuming someone else doesn't take up the task).

I am the bat. The night is mine.

Link to post
Share on other sites

Has anyone done any profiling to see how much time tdm is spending in scripts and in handovers between the script interpreter and the game code? There's code in the animation scripts that I've been looking at recently that looks like it passes control back and forth several times per frame per ai, but I've no idea whether that has a noticeable effect or not. I don't know anything about llvm so can't contribute to that party of the conversation but I can help reduce the context switching if that turns out to be a burden. That's a big part of my day job: the main platform I develop on (Oracle) has an overhead for every context switch between pl/sql and sql, and in some apps it can really add up.

 

You might glean some better insights from the Fabien Sanglard himself: fabiensanglard.net@gmail.com

 

If I interpret his code analysis here:

 

http://fabiensanglard.net/doom3/scripting_vm.php

 

correctly, such context changes definitely look problematic...

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


×
×
  • Create New...