Jump to content

Hidden items that become visible when illuminated by UV lamps


MirceaKitsune
 Share

Recommended Posts

Was playing the first FM that makes use of X-ray glasses... seeing them in action inspired me to write about an addition to their idea. This is likely a feature suggestion, I've played most FM's and never saw it done nor found any script / material features that would allow this result, but presume it's possible with a tweak in materials or the renderer.

I'm thinking of ultraviolet lamps that can uncover hidden decals or items: The object is invisible if not lit by a specific lamp, only when the light of an UV source touches them they start to show up. A blue-light can be offered to the player as an inventory item or replacement to the standard lantern, a lantern you can pick up and move only in the world, even come in the form of a candle since why not? The player or the environment must move specific objects and / or light sources to the correct positions to uncover secrets such as codes.

Some examples: Next to an UV lantern you find a note hinting there's a secret code in a particular room... you must pick up the lantern carry it to that room then place it on a support, illuminating the number-wheel combination or hint on the secret entrance you must go to. We can even reverse the process and have a static UV lamp on a wall, the player picks up an inventory item and must drop it under the lamp to see what's written on it... we can even have a hidden symbol on an AI which will shine when they walk under that one streetlight. They could also reveal frobable objects which can't be touched unless illuminated... maybe a hidden lock to open a door which becomes available when lit, or a readable note which normally appears blank but can be read or contains additional text if there's an UV lantern next to it. So many fun ideas we could do with this given our usual theme and ideas for secrets!

At a technical level, the logical way seems like separating the lightmap of light sources marked with the UV spawnarg, then multiplying with its intensity the alpha channels of all material components marked with the UV material flag. This might mean UV lights have to be rendered to a separate pass which could break some performance optimizations? Would be great if an index was possible instead of one flag, that way different secrets can be revealed by different lamps... even an universal UV lamp / material set would do though.

Edited by MirceaKitsune
Link to comment
Share on other sites

2 hours ago, nbohr1more said:

The spectrum material flag and entity args already exist. No need for x-ray or anything new to achieve a UV light effect.

Interesting, thanks! Didn't think it might since I haven't seen it done before nor any material flags that stood out, despite how appealing the idea is which is why I was surprised not seeing it in any FM. We could probably use some default lamps and decals to encourage mappers... can make any defs myself if anyone ever wishes or needs them.

The material flag is listed on id.sdk so it's even part of core idTech4. But in DarkRadiant I don't see a spectrum spawnarg for light entities: Is it simply not documented, or does the light also need a texture who's material has that spectrum?

Edited by MirceaKitsune
Link to comment
Share on other sites

The id tech 4 design required the material def and the light material def to have the same spectrum number.

The Dark Mod adds the ability to add a spectrum entity flag for both the light and entity.

  • 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

The roadblock with using spectrum lights to reveal stuff is that unlit spectrum materials will be opaque black, so still very much visible. It seems to have been designed more as a performance optimisation, by reducing the number of interactions between lights and surfaces. I don't think there's currently any way to make a material that goes between invisible and fully opaque depending on lighting.

Link to comment
Share on other sites

Yep, you can make things that are invisible when unlit but you must use a complex material that uses the diffuse stage as an input for a transparent stage. Original discussion here:

 

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

So that's not exactly it and a few changes are still needed. I know it needs to work such that light doesn't affect (only) the brightness but the alpha channel in the same way. The material can otherwise be fully bright or still responsive to standard lighting, ideally the filter would only affect transparency without changing how light is otherwise received.

I've subscribed to the thread you mentioned though it hasn't been active since 2019, glad everything's documented there. I don't fully understand the issue though: When the surface is fully invisible (0% alpha) it becomes black, but once it has any value above zero (1% alpha) it works well? Is it difficult to solve whatever is happening the right way?

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.

 Share

  • Recent Status Updates

    • STiFU

      Anyone here played Inscryption? At first, I was like "no, I am not going to play a stupid card game", but this game is so much more than that. It is so meta, full of 4th wall breaks, and feels so damn spooky and weird because of it. Absolutely recommended, if you can stand the visuals. I recommend not reading up too much on it, as that could easily spoil half the incredible surprises. Just know that what you see in the beginning is by far not everything.
      · 4 replies
    • freyk

      Tried to make a tdm advertisement commentpost at one of civvie11 youtube videos about T2. Post got marked as spam. His problem (to not discover TDM for himself),..not my problem.
      But some help of some fellow TDM yt-videocomment posters would be nice. To ask him and others, to play TDM. To get more players/creators. 
      · 4 replies
    • datiswous

      Currently Profile Information has 3 fields, these are shown in forum posts under your avatar:
      1. Gender
      2. Location
      3. Interests
      I think that it could be useful to have an extra field called "Operating system" (under location). It can be useful for tech support and to see what people use.
      Alternatively it could be a more general term, like PC system, so that you can for example state that you use an AMD gpu.
      · 2 replies
    • OrbWeaver

      Greetings fellow kids.
      · 11 replies
    • Crafty_Creeper

      Keep on Creeping on...
       
      · 3 replies
×
×
  • Create New...