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

    • 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 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...