Jump to content
The Dark Mod Forums

FYI: Ambient stage no longer needed in materials


peter_spy

Recommended Posts

In TDM 2.08, the option for tdm_ambient_method was removed from the menu and it's set to 0 by default. That means the engine uses ambient lights, not textures to calculate this. You can safely remove the //TDM Ambient Method Related code from your materials, and everything will work the same.

This should make your material files smaller and more readable ;)

  • Like 1
Link to comment
Share on other sites

Yup, it seems so.

I'm also trying to understand how it relates to the use of the "ambient_world" name for your main ambient light. Wiki suggests that this works for the old ambient methods only. I did some experiments, and when you don't set the name to ambient_world, it works only on the first loading. If you reload a map, the light works for a few seconds, and then fades out.

First load:

buildercompound_2020-12-11_10_46_02.jpg.f5a2f081dcba18380037557ff90cf291.jpg

Reload:

buildercompound_2020-12-11_10_46_26.jpg.51bbdd690d705e78afdf66796dae2fa1.jpg

 

When I set the light name to ambient_world, it works every time.

Edited by peter_spy
Link to comment
Share on other sites

8 hours ago, stgatilov said:

Hmm... should we do a massive cleanup of core materials at some moment?

Definitely, but maybe hold back with that until we moved Frob-Highlight to GLSL, so we can also delete that darn frob-highlight hack from the material defs?

  • Like 1
Link to comment
Share on other sites

10 hours ago, stgatilov said:

Hmm... should we do a massive cleanup of core materials at some moment?

Definitely, this would massively reduce clutter in materials.

Also great would be to move frob highlight stages out of materials, or as an intermediate solution turn them into a single line instead of 2 blocks. But I think this is a separate issue from ambient methods and could be addressed afterwards.

  • Like 1
Link to comment
Share on other sites

The r_newFrob cvar already "works" it just highlights with a weird looking shader. We just need to replace the shader with something better than the rainbow color effect.

 

https://bugs.thedarkmod.com/view.php?id=5427

  • Like 3

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

Fun fact: while this code about "ambient method" never gets executed now, it still generates warnings about missed textures pretty often.

That's when artist decided to move a texture to a different directory, but updated the path only in the main map, and did not change it in this "ambient method" block. Note that all referenced images get "preloaded" when material is parsed.

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...