Jump to content
The Dark Mod Forums

How come lights on chains can't swing?


kano

Recommended Posts

Many of the static light entities were created for performance reasons.

 

In particular, the 3-candle entities use 3 overlapping shadow-casting lights which is pretty performance intensive

so many mappers have customized it to use one light linked to all the candles.

 

Moving would be that much more intensive.

 

It's possible to do but you'd want to ensure that you do it in a room with less shadow-casting geometry and draw distance.

 

I'm not sure whether we have a moveable entity already and nobody is using it or if we never created one due to the above.

 

If Shadow Mapping or other optimizations continue to improve things for 2.07 and later, it may be worthwhile to revisit some

of these optimization choices.

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

Making ragdolls is harder than making static models, and can also cause a bigger performance hit if the lights themselves move.

 

That said, I made at least one ragdoll light at one point...not sure if it has ever been used.

Link to comment
Share on other sites

If they player can't easily touch it, can't you just set up a static chain and attached lightsource and script-move the thing whole so it appears to sway? If you do it subtly enough I think it could sell the illusion and look pretty good. I also wonder if you could do it backwards by putting the light on a nurb curve and then attach a chain or whatever to it so it appears it's swaying on the chain (when it's really the light that's moving the chain along with it). But I believe all the directions for making a bona fide ragdoll version yourself you could get from the wiki and existing examples buried in the pk4s.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

In terms of performance, it is unlikely that a light source hanging on a chain is more costly than a static shadow-casting light source.

At least, I don't see how it could be more costly.

Shadow volumes are not reused between frames: if your light is shadow casting, than its cost should not increase due to movement.

Link to comment
Share on other sites

In terms of performance, it is unlikely that a light source hanging on a chain is more costly than a static shadow-casting light source.

At least, I don't see how it could be more costly.

Shadow volumes are not reused between frames: if your light is shadow casting, than its cost should not increase due to movement.

 

We have noted in testing that torches without moving light entities attached are less performance intensive than those with them.

 

As I understand it, the vertex cache derived from the silhouette calculation remains until the light source or shadow caster moves, and then (if so)

it gets recalculated.

 

I guess that means that as long as you don't disturb the moveable light then the penalty shouldn't be so bad.

 

That kinda excludes wind-blown lights or other moveable lights that may be self motivated somehow.

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 one you created for the tavern? the pivot points are hinges the light model and entity are bound to.

 

That prefab is just a regular model bound to a func_pundulum entity. The md5mesh one was a different entity. Come to think of it, that might have been created using a Doom3 md5mesh, which would explain why it isn't in use anymore.

Link to comment
Share on other sites

We have noted in testing that torches without moving light entities attached are less performance intensive than those with them.

As I understand it, the vertex cache derived from the silhouette calculation remains until the light source or shadow caster moves, and then (if so)

it gets recalculated.

Yes, this is true.

When both light source and shadow caster do not move, there is no need to recalculate shadow volumes and send them from CPU to GPU.

Moreover, if light source is marked as non-moveable by cvar, then dmap probably precomputes shadow volumes for static models and brushes.

 

On the other hand, I often see light sources which constantly move around slightly (e.g. fireplaces).

They should be as costly as light sources attached to physical things like chains.

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