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

    • 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.
      · 2 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...