Jump to content
The Dark Mod Forums

Thunder and lightning: customizing


Bikerdude

Recommended Posts

Afternoon

 

Helping Xarg with his map and he would like to have thunder and lightening in his map, but we have run into the following issues -

 

1. how do we have the lightning flash in the sealed off parts of the map, do we use more than one thunder_fx entitny and if so then how do we make it so we only have set of thunder and lightening.

2. how do we change the position of the thunder_fx entity depending on difficutly, eg on easy it would be inside the skybox and not ullumination the streets..

Link to comment
Share on other sites

1) Try using a trigger_relay targeted to all the entities associated with the lightning. When you want to fire off the lightning, activate the trigger_relay.

 

2) You should be able to hide/show entities based on difficulty with the following keys set to 1. I haven't tried this in TDM but I assume it still works.

 

not_easy

not_medium

not_hard

Link to comment
Share on other sites

Thanks for that Rib, but the issue is the entity that does the thunder/lightening is one and the same, I dont think I have have more than one of it otherwise I would have two sets of thunder/lightening in the same map which would be odd.

 

The only way I can think to use your method is its possible to have separate entities.

Link to comment
Share on other sites

Okay I see what's going on now. The "lightning" is comprised of a trigger_timer and two func_fx entities. Upon examining the fx declarations I can only assume one was intended to remain in the skybox (fx/thunder_skylight.fx) and the other was intended to be moved into the playable area of your map (fx/thunder.fx).

 

Depending on the layout of your map, you may need to make copies of this second func_fx and connect it to the trigger_timer in order to illuminate all the necessary areas. The lights are plenty big enough to cover an entire map but they are also shadow casting which means the light will not bleed through walls.

 

You might want to consult the author of the prefab or see if anyone has used it before. I'm concerned about duplicating the func_fx because with lights that size overlap is unavoidable and that could wreck performance.

Link to comment
Share on other sites

Depending on the layout of your map, you may need to make copies of this second func_fx and connect it to the trigger_timer in order to illuminate all the necessary areas. The lights are plenty big enough to cover an entire map but they are also shadow casting which means the light will not bleed through walls.

 

You might want to consult the author of the prefab or see if anyone has used it before. I'm concerned about duplicating the func_fx because with lights that size overlap is unavoidable and that could wreck performance.

In this instance its Xargs map, and it has two sections so the single func_fx generates both thunder and lightening. The thunder can be heard everywhere but the lightening can only been seen in the section the func_fx is in. if I have a func_fx in both sections I assume then I am going to get two sets of thunder and lightening, and thats where the problem lies there in.

Link to comment
Share on other sites

There is a wiki article: http://wiki.thedarkm...title=Lightning

 

If you want multiple flash sites, use more than one thunder.fx. Let the trigger timer target the fx's.

 

This is just one way to set it up. If the lights are shadow casting then yes they are performance heavy. Instead you can use a non-shadow casting light or perhaps one with a projection texture.

Link to comment
Share on other sites

This is just one way to set it up. If the lights are shadow casting then yes they are performance heavy. Instead you can use a non-shadow casting light or perhaps one with a projection texture.

 

non-shadow would shine through everything, which would be a non starter...but will try the twin fx entities and see how I get on.

Link to comment
Share on other sites

Here's the thunder fx declaration minus the sound...

 

fx fx/thunder_nosound
{
   {    //creates light
       delay 0
       name "thunderlight1"
       duration 0.4
       restart 0
       light "lights/biground1", 0.35, 0.35, 0.7, 999999
   }

   {    //removes light
       delay 0.4
       name "thunderlight1off"
       duration 0.3
       restart 0
       uselight "thunderlight1"
       fadeOut 0.05
   }

   {    //creates light
       delay 0.3
       name "thunderlight2"
       duration 0.4
       restart 0
       light "lights/biground1", 0.35, 0.35, 0.7, 999999
   }

   {    //removes light
       delay 0.4
       name "thunderlight2off"
       duration 2.5
       restart 0
       uselight "thunderlight2"
       fadeOut 0.05
   }
}

 

Save this text to a text file. Rename it something unique like xarg.fx. Create an fx folder within the working directory for the mission and place the file there. Create a new func_fx in the map and link it to fx/thunder_nosound.

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

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 0 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 4 replies
×
×
  • Create New...