Jump to content


Photo

I am the invisible man

linux bug light gem

  • Please log in to reply
5 replies to this topic

#1 Hamlet

Hamlet

    Member

  • Member
  • PipPip
  • 19 posts

Posted 21 December 2016 - 11:26 PM

I have compiled The Dark Mod on Gentoo Linux (I detailed my experience in another post).
I have a problem: the light gem is always completely dark. Guards will react to noise and to touch, but I could stand in front of them making faces and they will politely ignore my presence.
I have bisected the commits and tracked back the problem to commit #4379.
Reverting that single commit fixes my problem. Not surprisingly, I do not understand that commit. I can try things though.

I should assume this does not happen on Windows. Is this material for a bug report?


  • nbohr1more likes this

#2 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7571 posts

Posted 22 December 2016 - 12:07 AM

You will need the new lightgem material for 2.05.

 

Place the zzz_override_lg.pk4 from this zip pack into your darkmod directory:

 

https://dl.dropboxus...561/lg_cull.zip


  • Hamlet likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#3 Hamlet

Hamlet

    Member

  • Member
  • PipPip
  • 19 posts

Posted 22 December 2016 - 12:38 AM

Yes, I did need that. Thank you so much!

 

Care to explain, or point to explanation? I naively thought that the gem was an overlay bitmap, a piece of head up display. Surely nothing made of a "material".

Now I am tempted to think it as a 3D object rendered using quite sophisticate ray tracing and refraction effects.

 



#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5168 posts

Posted 22 December 2016 - 02:39 AM

There is a 3D 8-sided crystal that is rendered in the player's place (invisible to the player). A camera takes a photo of the top & bottom surfaces as they are lit up, averages their brightness, and that sets the lightgem level. The HUD crystal is just an overlap image like you say that renders the appropriate lighting level according to that algorithm.


  • Goldwell and Hamlet like this
Posted Image

#5 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7571 posts

Posted 22 December 2016 - 09:14 AM

Code change I made does this:

If we are rendering the lightgem scene:

1) Don't render any surfaces that don't cast shadows EXCEPT the lightgem surface
2) Don't render any lights that the player isn't inside of

To accomplish item 1, I had to create a new material attribute that says "this is a lightgem surface" and
put it into the material definition for the texture the lightgem model uses.

Sadly, while this change did offer a nice little performance boost, it was completely blown out by Duzenko's awesome

"Pixel Pack Buffer" optimization which offered a HUGE performance boost. :D  :laugh: Thus relegating my fix to the

category of "a minor improvement".


  • Hamlet likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#6 duzenko

duzenko

    Member

  • Mission Beta Tester
  • PipPip
  • 375 posts

Posted 22 December 2016 - 11:52 AM

Sadly, while this change did offer a nice little performance boost, it was completely blown out by Duzenko's awesome

"Pixel Pack Buffer" optimization which offered a HUGE performance boost. :D  :laugh: Thus relegating my fix to the

category of "a minor improvement".

 

Pixel pack may show more difference on a fully-clocked system, but my laptop CPU throttles all the way to 1.1GHz under full load and your optimization makes a better job in that case. :awesome:


  • jaxa and nbohr1more like this





Also tagged with one or more of these keywords: linux, bug, light gem

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users