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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...