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

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

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?

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

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

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

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

Any tips for managing space efficiently when mapping? Although I'm proud of my first FM, its interior spaces were admittedly too open for their own good. I'm working on my submission for the 15th anniversary contest and making extensive use of AI models and measuring tools for scale, but I'm still uncertain as to what the ideal, comfortable amount of open floor space is in a room.

Link to comment
Share on other sites

19 hours ago, Ansome said:

Any tips for managing space efficiently when mapping? Although I'm proud of my first FM, its interior spaces were admittedly too open for their own good. I'm working on my submission for the 15th anniversary contest and making extensive use of AI models and measuring tools for scale, but I'm still uncertain as to what the ideal, comfortable amount of open floor space is in a room.

You're asking a pretty tough question here and it's more about game-play aesthetics than a technical issue.

I would humbly offer that my favorite room sizing is in Sir Talbot's Collateral but I also enjoyed the spacing in Seeking Lady Leicester so there may not be a hard \ fast rule here. Mostly just need to have enough patrols to make the place challenging but have fair escape points that can be accessed with careful maneuvering. I especially enjoy escaping into the ceilings ( Sir Talbot's ) pipe climbs and nooks are also cool. 

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

Link to comment
Share on other sites

Hey!

Can I claim to be a newbie here?

I am trying to make an improved version of the Ropescroller script that sets a shader parm on the rope texture to make it scroll and fakes movement. I am working with a 3 state elevator rather than the two state elevator that was in "A New Job" ( where my original script was designed ). The elevator position entities only offer call_on_arrive and call_on_leave spawnargs so you cannot distinguish when the middle buttons intend to go up, down, or called to player. I tried adding a frob_action_script spawnarg to the buttons but it just kills the entities. Is there a preferred way to query which button was pressed and pass that to a script variable? As I can tell, the "elevator buttons entities" don't offer any end-point for making such a request?

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

5 hours ago, nbohr1more said:

You're asking a pretty tough question here and it's more about game-play aesthetics than a technical issue.

Yep, sorry about that! I know that figuring out using space effectively in a new engine/editor comes with experience, I just wanted to see if anyone had any thoughts that could put me on the right path for my anniversary mission. I'll play through those levels you mentioned again and take some notes. Thank you as usual, Nbohr1more!

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

2 hours ago, Ansome said:

Yep, sorry about that! I know from experience that figuring out using space effectively in a new engine/editor comes with experience, I just wanted to see if anyone had any thoughts that could put me on the right path for my anniversary mission. I'll play through those levels you mentioned again and take some notes. Thank you as usual, Nbohr1more!

Here are some guidelines I sort of use:

  • err on the small side rather than large.  A common complaint in maps from new mappers is too much open space, rooms too large, etc.  Smaller rooms also provide a more medieval feel.
  • If you make a room you need to fill it with stuff to avoid the above - so the smaller the better
  • keep room for AI to move - minimum of 36 units to pass between objects
  • Place an AI and/or furniture in the room first thing as a reference point
  • Also need to make sure there is room for AI to open/close doors.  Test the AI in your room as early as possible
  • work in multiples of 8 - so hall width of 64/96/128 and room height of 128, etc.  And then just pick whichever one suits your scene the best.
  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

On 5/17/2024 at 7:51 AM, datiswous said:

When you want an ai to follow you or an other ai, is there a way to specify the distance?

Appears not. It is hardcoded in FollowActorTask.cpp as 60 units, specifically:

#define DISTANCE_FOLLOWER_REACHED                        60
#define DISTANCE_FOLLOWER_CATCHUP_DISTANCE                480
#define DISTANCE_FOLLOWER_CLOSE_ENOUGH_TO_STOP_RUNNING    180

  • Like 1
Link to comment
Share on other sites

On 5/24/2024 at 6:56 AM, Ansome said:

Any tips for managing space efficiently when mappin

I have read somewhere that it's good to implement small changes in the floor-height, so the level feels less boring when walking around. I don't have a good example, but maybe others can.

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

    • Ansome

      Taking a break to alleviate burnout. In retrospect, I probably shouldn't have jumped into a map-making contest so quickly after just finishing another project and especially with my busy schedule, but I do believe I have something that the community will enjoy. No clue if I'll be able to finish it on time for the competition if I factor in a break, but I'd rather take my time and deliver something of quality rather than engage in development crunch or lose part of the map's soul to burnout.
      · 1 reply
    • Skaruts

      Working on an update for my mission By The Cookbook. If anyone that played it has any further bugs to report, please let me know.
      I posted more details about the update in the mission thread.
      · 1 reply
    • lucien

      being thankful for tdm is a good feeling
      · 0 replies
    • The Black Arrow

      Happy birthday to me!
      Yes, today's my birthday and as much as I want to play The Dark Mod, I won't until it's late Autumn, where it should be a bit chilly in my place and there's some wind too.
      For now, it's time to enjoy my birthday, if any of you want to play a great fan mission in my honour...Well that's asking too much, just play the mission because it's fun, not because of me, enjoy it yourself! 💪
      · 5 replies
    • nbohr1more

      New texture wiki article created: https://wiki.thedarkmod.com/index.php?title=Creating_textures_from_Ornate_Photos
      · 11 replies
×
×
  • Create New...