Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Hm, the flickering skybox is a puzzler. It does not go away even if I disable parallelism, and the correlation with the lightgem parameters almost make me think this has nothing to do with my changes.

 

Well, except I can't reproduce it in vanilla 2.05, so it has to be related to something I did :-/

In any case, I think this is a very different issue than the previous one. Looks almost as if some lighting or shader parameters for the skybox get mixed up...

Posted

 

For system crashes, turn 0's to 1's since I'm not sure what's causing your crash.

It might make TDM run slower, but this is only temporary. Once the game crashes, post the darkmod.log file here.

Sorry for the late reply.

 

No worries. I've been tied up. I'll try to see about getting to this tonight. However, I'd like to mention that I also tried to enable EAX via this tutorial: http://forums.thedarkmod.com/topic/18249-tutorial-how-to-setup-eax-for-tdm-on-any-soundcard/

 

I also saw a crash on startup. However, it boots up fine now, though EAX won't work. I get the message telling me that I don't have the required hardware. In both of these cases, user error is definitely possible. I'm certainly not immune to making mistakes. However, it's interesting that both are audio related. I know the VR headsets do some audio-related magic & I wonder if there's a conflict. I should try disabling VR to see if either HRTF or EAX are working.

Posted

@nbohr1more: I uploaded a potential fix for the flickering skybox here: https://github.com/fholger/thedarkmodvr/releases/tag/v0.1.3

The issue disappeared for me when I moved the lightgem rendering after the normal backend rendering. It previously sat at an awkward position after frame start, but before normal rendering, and may have overwritten a few default settings and the back buffer selection command. Honestly though, I don't fully understand why it affected the skybox, specifically. In any case, let me know if this fixes the issue for you, too, and if you can find any further problems :)

  • Like 1
Posted

Flicker is cured!

 

There are a few things like floating ragdolls at high FPS which have been cured in SVN via Blue_Pill's patches.

 

http://bugs.thedarkmod.com/view.php?id=4493

 

Also mantling in Swing can sometimes make you stuck inside geometry, same issue cured here:

 

http://bugs.thedarkmod.com/view.php?id=4435

 

And, of course, with high FPS your air supply in water depletes too fast (mentioned in the first bug).

 

Your decision to broach any of those issues in your 2.05 build verses just working in SVN nonwithstanding.

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

Ok, thanks. I'll get the combined fixes to SVN :)

 

Probably won't backport any fixes to 2.05; as I said, I'm going to try to get some further engine improvements into SVN. Doesn't really make sense to do that on 2.05 anymore.

Posted (edited)

If I set r_ignore2 to 1, it crashes on start. Setting it to 0 (which is the default and should disable glsl) has the visual artifacts.

Edited by cabalistic
Posted

If I set r_ignore2 to 1, it crashes on start. Setting it to 0 (which is the default and should disable glsl) has the visual artifacts.

Umm... I set r_ignore2 after map loads. Any crash details (stack trace, ...)?

Fixed the missing qglProgramEnvParameter4fvARB for shadows in arb2 mode.

  • Like 1
Posted

Thanks, that fixed the rendering artifacts.

 

With an x86 debug build, if I start the game, then set r_ignore2 1 in the menu and then load a mission, it will crash when level load completed with an access violation (null pointer) somewhere in the Nvidia GL driver. The last line of code from the Dark Mod at which the debugger points is in RB_RenderDrawSurfListWithFunction at line 262. Context is drawing the lightgem, the triFunc_ according to the debugger is RB_T_FillDepthBuffer. I'm afraid it skipped a few steps in the backtrace there, because that can't be the offending line. But it is repeatable.

 

If I set r_ignore2 to 1 directly in the autoexec.cfg, it fails right on startup somewhere when calling RenderSystem::EndFrame; again, the backtrace is incomplete, unfortunately.

If I set r_ignore2 to 1 after level load, it crashes immediately, somewhere.

 

Sorry that I can't really provide a good stack trace here. The null pointer exception in the GL driver might point to a null GL object being used, perhaps?

Posted

Thanks, that fixed the rendering artifacts.

 

With an x86 debug build, if I start the game, then set r_ignore2 1 in the menu and then load a mission, it will crash when level load completed with an access violation (null pointer) somewhere in the Nvidia GL driver. The last line of code from the Dark Mod at which the debugger points is in RB_RenderDrawSurfListWithFunction at line 262. Context is drawing the lightgem, the triFunc_ according to the debugger is RB_T_FillDepthBuffer. I'm afraid it skipped a few steps in the backtrace there, because that can't be the offending line. But it is repeatable.

 

If I set r_ignore2 to 1 directly in the autoexec.cfg, it fails right on startup somewhere when calling RenderSystem::EndFrame; again, the backtrace is incomplete, unfortunately.

If I set r_ignore2 to 1 after level load, it crashes immediately, somewhere.

 

Sorry that I can't really provide a good stack trace here. The null pointer exception in the GL driver might point to a null GL object being used, perhaps?

Ain't I dumb!

I replaced qglVertexPointer with qglVertexAttribPointerARB in TDM myself just a few months ago, and I have been staring at the qglVertexPointer in the glsl code for hours and didn't see it!

 

It works now but bumpmaps are ignored for some reason.

Posted

It works now but bumpmaps are ignored for some reason.

Actually they are not ignored, but the glsl shader somehow gives the normal map less weight in the output color.

Can anyone look at both shaders and have an opinion which one is more correct?

Posted

IMO current version od TDM engine is pretty sensitive when it comes to normalmaps. Other non-PBR engines like UnrealEngine 3 require stronger normals, and often you have to use the Multiply node in Material Editor to make them more visible.

Posted

Which shader specifically?

interaction.fs vs interaction.vfp

The glsl shader wins in speed 35:33, probably because it does not do an additional cubemap texel fetch.

 

 

Edit: The GLSL code path is still crashing for me, at the exact same place.

Throw that nvidia garbage out and get yourself a real GPU like the one I have (Intel 5500) :D

Posted

Throw that nvidia garbage out and get yourself a real GPU like the one I have (Intel 5500) :D

Yeah... no :) As much as I do not like Nvidia, unfortunately I always found good reasons to still go with them (so far).

 

I had a quick look at the shader. One thing that surprised me is in line 33 in the normalize call, you are using wyz. Shouldn't that be xyz, or less confusingly, rgb?

  • Like 1
Posted

Yeah... no :) As much as I do not like Nvidia, unfortunately I always found good reasons to still go with them (so far).

 

I had a quick look at the shader. One thing that surprised me is in line 33 in the normalize call, you are using wyz. Shouldn't that be xyz, or less confusingly, rgb?

That is probably correct because the assembly shader does this

TEX	localNormal, fragment.texcoord[1], texture[1], 2D;
MOV     localNormal.x, localNormal.a;
MAD	localNormal, localNormal, scaleTwo, subOne;

No idea why they do that though.

As for the xyzw/rgba thing, AFAIK they are supposed to be the same thing.

 

None of the two shaders are mine actually. The assembly is from the previous TDM versions and the GLSL is from Pat Raynor.

  • Like 1
Posted

They are the same thing, I just prefer to use the rgba accessors when accessing color values :)

 

Hm, that is strange. I looked at a normal map in TDM, and it is clearly using the rgb channels, no alpha. Maybe I looked at the wrong one, or the texture loading modifies the channels. Curious, though. Shame it doesn't run on my side, or I could play around a little.

  • Like 1
Posted

They are the same thing, I just prefer to use the rgba accessors when accessing color values :)

 

Hm, that is strange. I looked at a normal map in TDM, and it is clearly using the rgb channels, no alpha. Maybe I looked at the wrong one, or the texture loading modifies the channels. Curious, though. Shame it doesn't run on my side, or I could play around a little.

No, it's actually test_direct.vfp. Sorry :blush:

  • Like 1
Posted

I meant a normal map texture, not the shader :) The textures have rgb channels, and r and g are definitely relevant. So unless the texture loading somehow transfers the r channel to alpha, then using the alpha channel in that calculation just doesn't make sense to me.

  • Like 1
Posted

 

Shame it doesn't run on my side, or I could play around a little.

Maybe try disabling vertex attributes in RB_GLSL_CreateDrawInteractions one by one?

  • Like 1
Posted

There's a small block of biases

{ x, y, z, a }

which we multiply our normalmaps by at the top of test_direct.vfp. These are what make our normals look deeper than the standard doom 3 versions. I'll post more details when I get some PC time.

 

Edit:

 

Here is a better illustration:

 

Biases:

 

 

 
# Scale the normal map scale up by a factor of 1.5.
PARAM    subOne        = { -1.4, -1.4, -1.0, -1.0 };
PARAM    scaleTwo    = {  2.8,  2.8,  2.0,  2.0 };
#PARAM    subOneN        = { -1.0, -1.0, -1.0, -1.0 };
#PARAM    scaleTwoN    = {  2.0,  2.0,  2.0,  2.0 };
PARAM    half        = {  0.5,  0.5,  0.5,  0.5 };
 

 

Normal map load:

 

 

 
# load the filtered normal map
TEX        localNormal, fragment.texcoord[1], texture[1], 2D;
MOV        localNormal.x, localNormal.a;
MAD        localNormal.xyz, localNormal, scaleTwo, subOne;
 
  • 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

I haven't been following this discussion very closely so perhaps this isn't terribly useful but reading the posts about ARB and alpha reminded me of an issue I encountered when creating a color grading shader. I noticed that after a texture lookup, red color data was being stored in the alpha channel. You had to swizzle the channels around to correct it like this ...

# do lookup
TEX low, lut_coord, texture[1], 2D;
TEX high, lut_coord_high, texture[1], 2D;
MOV low.rgba, low.agbr;
MOV high.rgba, high.agbr;

I never really looked into why. I figured I was doing something wrong but it could be a bug in the engine.

  • Like 1

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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...