Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: A note on the Guncam Tracers Mod  (Read 622 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5595
A note on the Guncam Tracers Mod
« on: October 13, 2019, 10:15:25 AM »

Only just now did I examine the code for the GunGeneric classfile in the Guncam Tracers Mod.

There is a line of code which checks the angular altitude of the Sun and uses this to apply a limit to the visibility of the simple tracer lines. It is constructed so that a linear scaling is applied, such that when the Sun is at the zenith (directly overhead) the tracers are seen to 4km, and when the Sun is at the nadir (opposite the zenith) the tracers are seen to 12km. (At sunrise/sunset, tracer visibility is halfway between, or 8km.)

This is not logical. The distance variation in visibility is stretched out across a too-large range in Sun elevation. The principal disadvantage is the resulting too-gradual variation in visibility range when the world lighting is changing most rapidly, in the period of roughly 3-4 hours around sunset/sunrise.

Once the Sun has sunk to 18 degrees below the horizon it's full on night, and it gets no darker for lower Sun elevations. And once the Sun is about the same angular height above the horizon, the environment does not get that much brighter for higher Sun elevations.

And so I constructed this visibility range to work within the Sun elevation range of +18 degrees to -18 degrees, retaining the same tracer distance range of 4000-12000m, respectively. Much more logical. ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5595
Re: A note on the Guncam Tracers Mod
« Reply #1 on: October 13, 2019, 01:27:22 PM »

I fear my previous post might come across as somewhat scathing. Such is not intended; my getting to the crux of the matter sometimes has me omitting some points I really should get across.

The addition of the Sun elevation criterion for tracer visibility is a very good idea, which the stock game code does not incorporate. I very much appreciate the inclusion of this additional variable. My tweak merely takes into account the way environmental lighting changes, and the concomitant impact on tracer visibility, are most notable within a much narrower range of Sun elevation angle than +/-90 degrees.

To reiterate, my approach confines this variation in the much smaller range of +/-18 degrees. Outside of these limits, tracer visibility is either 4km in the day or 12km at night. The visibility limit now changes vary much more rapidly within a total Sun elevation range of 36 degrees, iinstead of more gradually over 180 degrees.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.094 seconds with 24 queries.