Jump to content
The Dark Mod Forums

Request For Doused Skin For Gaslight4


SneaksieDave

Recommended Posts

I think BT will have to handle that, as I can't make heads or tails of the glass part.

 

Btw, that model has a bit of a flaw--there was a part that was left blank so that an initial could be added, but even though it's currently transparent, it shows up when lit from particular angles. I noticed this in the rain map.

 

lampproblem.jpg

Link to comment
Share on other sites

There's also not an easy way to change that gas light skin to a doused skin on extinguishing either. We decided to make the extinguishable entity just be the flame, so it has no awareness of the static model that is supporting the flame (this was the requested behavior so tha we could make prefabs from it without worrying about targetting another entity).

 

If there's no flame particle required, you might be able to abuse the system to put the fullbright version in model_lit and a dark verison in model_extinguished, but because that entity is intended to be a flame, it also doesn't clip things. That would be a little weird if you shot an arrow at a gas light fixture and it just went through.

 

Otherwise, we'd have to make a new light entity with a modified script that also changes the skin of a target for the fixture, and it may or may not work as a prefab.

 

It would be MUCH easier if we could change the gas light model so it gets lit like everything else.

Link to comment
Share on other sites

There is a way you can bind a light and a textured entity together such that the brightness of the light affects the brightness of the texture. This is used in Doom 3 for the "trim" lights that are made from textures but need to switch on and off along with the light source.

 

I have never done this myself but there should be some info on Doom3World.

Link to comment
Share on other sites

I looked on D3W and it seems that you do this simply by selecting the light and a func_static with the texture, and Combine them together in the editor. I could not find any detail on what texture stage code was required to make this work, I suspect it involves multiplying the Add stage by a certain shaderparm. Hopefully it should be possible to find out by looking at the D3 materials.

 

I would also like to know what "Combine" means at the map level because presently DarkRadiant has no option for this.

Link to comment
Share on other sites

Yeah, that was one thing that always wierded me out about D3ed... the rest of the stuff I felt pretty comfortable with, but I always felt like I didn't quite know what going on with Combine. Anyway, if the entity colors are synched, it's just a matter of making a stage with the 'colored' keyword.

Link to comment
Share on other sites

Not sure about combine either, but here's the result of opening DoomEd, creating a func_static of gaslight4, and a light, and then combining them.

 

Version 2
// entity 0
{
"classname" "worldspawn"
}
// entity 1
{
"classname" "light"
"name" "light_1"
"origin" "-152 24 0"
"light_radius" "64 64 64"
"light_origin" "-120 -128 64"
"light_rotation" "1 0 0 0 1 0 0 0 1"
"model" "models/darkmod/props/lights/extinguishable/gaslight4.lwo"
}

 

Disturbingly, there is apparently a difference between selecting light->model->Shift-K, and selecting model->light->Shift-K. In the former case, the result is above. In the latter, both objects reverted to worldspawn on restarting the map. :mellow:

 

Since they're apparently linked in the former example, what's next?

 

Edit: I'm changing the combined light level, and the only effect I see is normal light hitting the object making it brighter or not. So I'm guessing you guys are talking about something a tad more complex. Combine, connect, tab around to move separate, ungroup (which just turns them back into worldspawn - almost useless unless that's exactly what you want)... who knows what's going on with this. I'll check iddevnet but I'm sure there's squat.

Link to comment
Share on other sites

As a first order guess I would say that combine means "take the first object selected, add all of the keys from the second object (keeping the classname of the first), and delete the second object".

 

It would be interesting to view the result when combining a light with a func_static made from a patch, rather than a model, although in this case it would appear that the desired effect could be achieved merely by adding the aformentioned "colored" stage to the texture of the light's model.

Link to comment
Share on other sites

Edit: I'm changing the combined light level, and the only effect I see is normal light hitting the object making it brighter or not. So I'm guessing you guys are talking about something a tad more complex.

 

You would certainly see no effect without the "colored" stage, otherwise the material will not know how to respond to the light colour changes.

Link to comment
Share on other sites

Yes, you would have something like

 

{
 colored
 blend add
 map path/to/additive_texture.tga
}

 

This means that the additive texture will be multiplied by the entity colour (i.e. the colour of the light specified by "_color") before being added.

Link to comment
Share on other sites

Oh hell yeah, it works. :) Here's a segment of the gaslightglass material:

 

   {
  colored
  blend add
  map models/darkmod/props/textures/gaslight1_d.tga
  alphaTest 0.5
  }

 

I added the colored line, and now, even though the light is not even covering the gaslight at all, changing the light level changes the brightness of the glass cup. W00t.

 

If I can get this working in a "real" case, I'll make a change to snow.map and update the material.

Link to comment
Share on other sites

Hrm, one problem is happening, which may still have a solution.

 

First, there was no gaslight at all when it was doused. I figured, okay, you have to set the model_lit and _extinguished properties, no prob. So I did. The results:

 

At first (because the light is off by default) there is no model. Bad.

After lighting, there is a model. Good!

After dousing, there is a model with a dark glass cup. Good.

However, after a few seconds, the gaslight disappears completely again. Bad.

Link to comment
Share on other sites

Perhaps there could be a persistant_model key? One that never goes away, regardless of what the _lit and _extinguished models are doing? The model key itself is not working for this purpose.

 

Edit: that distinction would also be helpful, because then the _lit model could be a candle flame, instead of the current option, which is a ghost light that has no flame at all.

Link to comment
Share on other sites

Good point, I guess we don't at all. I was just using the standard extinguishable light movings, which all use this method. I think... let me double check.

 

Edit: though it would still be desirable to put a flame out. So what we'd need is a normal extinguishable light with all the bells and whistles (for dousing and lighting a flame particle) but for it to have a separate static model it is combined to.

 

Edit2: yeah they all use the extinguishable = lit + extinguished models approach

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.
      · 6 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...