Jump to content
The Dark Mod Forums

FYI: Ambient stage no longer needed in materials


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