Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

22 hours ago, Amadeus said:

I just learned this recently too, it should be Direct X

Is that really correct? Unless TDM team changed stuff from Doom 3 times, if you use Doom 3 as example, normal maps that represent outward surfaces, use OpenGL system, those that represent inward surfaces, aka holes, use D3D system. 

On real DirectX renders, outward surfaces, use the D3D system instead and the OGL one for inward, is inverted.

And to reinforce this the original example by idSoftware, looks to use the OpenGL system see here

cyan for top, purple for the bottom, in d3d is inverted.

Thou like I said maybe the TDM team changed all of this by now...

edit: Incorrect info so ignore it any mod is free to delete this if he/she wants. 

Edited by HMart
Link to comment
Share on other sites

So, that's how it was explained to me. Even though it seems counter intuitive, using Direct X maps has worked for me. I was recently trying to import a bunch of textures from Polyhaven.com (they offer both OpenGL and directX normalmaps) and I used the OpenGL version at first, but when I put it in-game there was an inverted green channel. I then used the directX version and the normalmap worked just fine

I'm happy to be corrected on any of this though. Maybe Polyhaven does something different with their normals, or I'm doing something wrong

Link to comment
Share on other sites

@HMartI am not sure that is correct - you can even see in your screenshot that the green or "y" areas of the normal map are not shadowed correctly in game relative your point light. They are in shadow where they should be lit and the appear illuminated from the bottom when the light source is above.

Here is another example:

OpenGL:

opengl.jpg

DirectX:

dx.jpg

Notice in DX how light source hits the tops of the tiles and shadows the bottom - where as this is inverted in openGL which does not look physically correct to me given the light position.

It is very confusing given the legacy of the game being OpenGL, but I have learned from (painful) experience that directx formatted normals are what look physically correct in the game, at least in my opinion.

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

Could be something funky going on with our implicit RGTC compression. We use a Microsoft BC format for pre-compressed normals but our on-the-fly encoder is supposed to use standard OpenGL tangent space normals.

I wonder if the work to fix BC loading had some unintended effect on uncompressed loading?

Maybe @orbweaver can be convinced to take a 2nd look?

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

I most agree this is very confusing. The main light on my example, was not coming from the top but from the side and it looks correct to me, but your OGL example does look incorrect, if the light source is on the top right corner, so call me confused. 🤔

 

edit: I made more testing, I was totally wrong and Wellingtoncrab is correct, it IS the D3D system, purple on the top for bumps, is the correct color, cyan in the top should be for holes. So my example is misleading and not correct. 

Edited by HMart
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I just made an interesting discovery.  In my FM that's in beta I have custom main menu music, but it doesn't always work.  Basically it works:

  • When you first start the game (whether the FM is currently selected or if you change to this mission and the game restarts)
  • during the text briefing

It doesn't work (i.e. you only get silence)

  • When escaping back to the main menu while in-game
  • After quitting a mission and it goes back to menu

As far as I know I had all the correct settings in mainmenu_custom_defs.gui:

/// Menu music after startup (not in-game)
#define MM_MENU_SOUND_CMD "music fs_muslim;"

/// Played in main menu when in-game (ESCaping out of the game)
#define MM_INGAME_MENU_SOUND_CMD "music fs_muslim;"

/// Played during non-video briefing
#define MM_BRIEFING_SOUND_CMD "music fs_muslim;"

It turns out the problem was I had this line set in the sound shader:

leadin sound/ambient/ambience/silence.ogg

Commenting that out on a hunch fixed the problem.

So you might be saying to yourself 'that's all very interesting but who cares?'.  My point is:

  • Just an FYI in case someone else runs into this
  • I don't think there is anywhere on the Wiki that covers menu customization?  @Geep you've done a whole bunch around GUI scripting recently - is there somewhere you can recommend I can stick this?
  • Like 2
Link to comment
Share on other sites

It's true, there's no real place on the Wiki for menu customization... it relies on comments in the mainmenu_custom_defs.gui.

So I'd guess I'd recommend you do a bug report, to either add a comment to that .gui file about it, or, if it's really a bug, fix it.

  • Like 1
Link to comment
Share on other sites

On 5/5/2024 at 4:27 PM, Frost_Salamander said:

I just made an interesting discovery.  In my FM that's in beta I have custom main menu music, but it doesn't always work.  Basically it works:

  • When you first start the game (whether the FM is currently selected or if you change to this mission and the game restarts)
  • during the text briefing

It doesn't work (i.e. you only get silence)

  • When escaping back to the main menu while in-game
  • After quitting a mission and it goes back to menu

As far as I know I had all the correct settings in mainmenu_custom_defs.gui:

/// Menu music after startup (not in-game)
#define MM_MENU_SOUND_CMD "music fs_muslim;"

/// Played in main menu when in-game (ESCaping out of the game)
#define MM_INGAME_MENU_SOUND_CMD "music fs_muslim;"

/// Played during non-video briefing
#define MM_BRIEFING_SOUND_CMD "music fs_muslim;"

It turns out the problem was I had this line set in the sound shader:

leadin sound/ambient/ambience/silence.ogg

Commenting that out on a hunch fixed the problem.

So you might be saying to yourself 'that's all very interesting but who cares?'.  My point is:

  • Just an FYI in case someone else runs into this
  • I don't think there is anywhere on the Wiki that covers menu customization?  @Geep you've done a whole bunch around GUI scripting recently - is there somewhere you can recommend I can stick this?

Added a note to this wiki:

https://wiki.thedarkmod.com/index.php?title=GUI_Scripting_Language#The_Basics_for_Mappers

  • Like 2

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

15 minutes ago, nbohr1more said:

Do we think this is a bug then?

Link to comment
Share on other sites

On 4/3/2024 at 10:09 PM, Petike the Taffer said:

That's the exact one I meant. I've tried it in my FM (a wait node converted into a follow node), but it doesn't seem to work once the character reaches the spot where it's supposed to trigger. The character just stands and waits in place, as usual or as with the wait node. Well, I don't really need a follow node in the FM I'm currently making, so I'll still have plenty of time to wait until a fully functional follow node becomes available. :) (There's also some potential path node workarounds if it doesn't get resolved, anyway.)

  

Thanks, Amadeus. :)

Interesting. The FM I might make in the future that might need the follow type node is still really far away, so it's unimportant now.

So path_follow_actor actually DOES work if you want it to follow the player.

You just need to target the player entity dynamically in game.  It doesn't work if you target the player_start entity.  I can't remember if that's what people were doing (or even if that's what I was doing), but that won't work because the player_start entity and the player entity aren't the same thing.

You can use a atdm:target_changetarget entity to do this, or a script:

$path_follow_actor_1.addTarget($player1);

Both can just be triggered by another path node, a atdm:target_callscriptfunction, whatever.

Also you need to add the player target to the path_follow_actor node BEFORE the AI gets to it. If the target gets added after the AI reaches that node, it won't work.

Video where the AI hits a node that triggers a atdm:target_changetarget entity: https://drive.proton.me/urls/A3DJW5EYFM#0WgYnCVOU6nv

test map attached as well.

EDIT: I have no idea why just manually setting 'target' 'player1' on the path_follow_actor node in DR doesn't work.  I'll try to look into this.

UPDATE: It appears the the player1 entity simply isn't there during initialization when the path_follow_actor's targets are evaluated.  As a result, the 'actor' is null and the node does nothing.

I didn't mention it before, but when I used the script method I just stuck in the map script's main function like so, and this works too:

void main()
{
  sys.waitFrame();
  $path_follow_actor_1.addTarget($player1);
}

UPDATE 2: Wiki updated: https://wiki.thedarkmod.com/index.php?title=Path_Nodes#path_follow_actor

path.map

Edited by Frost_Salamander
  • Like 1
  • Thanks 3
Link to comment
Share on other sites

On 5/5/2024 at 10:27 PM, Frost_Salamander said:

I don't think there is anywhere on the Wiki that covers menu customization?

I think wiki pages for these files would be useful:

  • mainmenu_custom_defs.gui
  • mainmenu_briefing.gui
  • mainmenu_background_custom.gui

I think those are the only files with official support for editting.

Edited by datiswous
  • Like 2
Link to comment
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.


  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...