Author Topic: Specular Lighting cmdline parametres and what they do  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Specular Lighting cmdline parametres and what they do
Quote from: Hard Light Wiki
-spec_exp

This must be used with the -spec command line parameter and must be entered into the "Custom flags" field. Adjusts the size of the shiny spot on ships. Higher number mean smaller spots. Default is 16. However, 11 is recommended. This is a relative value.


-spec_point

This must be used with the -spec command line parameter and must be entered into the "Custom flags" field. Adjusts how much laser weapons contribute to specular highlights. Higher number mean greater contributions. Default is 1.0. However, 0.6 is recommended. This is a relative value.


-spec_static

This must be used with the -spec command line parameter and must be entered into the "Custom flags" field. Adjusts how much suns contribute to specular highlights. Higher numbers mean a greater contribution. Default is 1.0. However, is 0.8 recommended. This is a relative value.


-spec_tube

This must be used with the -spec command line parameter and must be entered into the "Custom flags" field. Adjusts how much Beam Weapons contribute to specular highlights. Higher numbers mean a greater contribution. Default is 1.0. However, 0.4 is recommended. This is a relative value.


-ogl_spec

OpenGL Only. Takes a numerical argument. This value changes the basic shininess of the specular light in OpenGL. A lower value reduces the overall intensity of the light making it broader and less powerful. A higher value makes it more focued and brighter. The default value is 80, and the usable range is 0 to 128 (clamped). The original default value was 60, but it was raised to behave more D3D like.

While trying to fiddle with lighting settings I've found these descriptions somewhat confusing, lacking and, at worst, somewhat inaccurate.

Based on some of my experimentation, it seems to me that:

-spec_exp has pretty much no effect at all on the lighting that I can detect. It just doesn't seem to do anything, much less what it advertised.

-ogl_spec, on the other hand, works in sort of inverted way - smaller values tend to produce a much stronger general specular effect (the reflections are bigger)

-very small values on -ogl_spec produce strange effects (abrupt black lines on the curved surfaces)

-spec_static, -spec_point and -spec_tube define the general intensity of the specular reflections much like described.

-the general diffuse lighting strength has apparently no adjustable settings at all. This would be a good tool in defining the general look of the lighting, as it appears that dark shine maps tend to darken ships quite a bit... Just a "simple" diffuse lighting multiplier switch could be highly useful (I won't say anything about the simplicity of actually coding it...)


So, it would seem that practically the best way to find good specular lighting settings for a mod is to first set -no_emissive_light and -ambient_factor XX (where XX is the number you find suitable). Ambient factor has a very strong effect on normal map visibility by the way, so you probably want to have relatively low values anywhere between zero and eighty. I've found that ambient factor of thirty tends to give pretty good results.

After setting the ambient factor, set up the -ogl_spec based on the size of the reflections you want to have. Smaller values result in big reflections and overall brighter appearance (plus some nasty stuff going on with really low values) while large values result in smaller reflections - apparently this is meant with "stronger lighting" but it's more like the light source just gets smaller and thus the reflections get smaller and overall lighting appears to be weaker... at least that's what it seems like.

Then set up the general specular intensity with the -spec_static X.X. This might actually be the most important switch because it defines the general strength of the speculars from static light sources, so you can use it to adjust the overall glossy/matte ratio of ships as a whole. Then figure out how much do you want weapons and beams to contribute to the general specular reflections. If you give them higher values than the -spec_static, then you end up with quite flashy reflections from the weapon effects. Lower, and you end up with subtler, less noticeable flashes from weapons fire and beams. How you want to set it up depends on what kind of look you want obviously. Personally, I think flashy flashes suit FreeSpace 2 but probably wouldn't work quite as well for Diaspora or Fate of the Galaxy.

Also be advised that the Ship Lab makes everything look somewhat darker than it will be in-mission, so when calibrating the shine maps and lighting, don't make things look "good" on ship lab - go to a mission and see how the shine maps and everything works together there. If something looks "good" on ship lab, it will very likely be somewhat overly shiny and bright in missions.


Also, I would really love to see the Ship Lab improved with customizeable skybox background and adjustable lighting... :blah:
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Krelus

  • 28
Re: Specular Lighting cmdline parametres and what they do
spec_exp DOES have an effect, although it is subtle. Besides that, it does exactly what it says on the tin.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Specular Lighting cmdline parametres and what they do
Semi-relevant: Why does turning off the env-map brighten the specular hilights on some ships (observed in the F3 ship lab)

 

Offline Krelus

  • 28
Re: Specular Lighting cmdline parametres and what they do
Semi-relevant: Why does turning off the env-map brighten the specular hilights on some ships (observed in the F3 ship lab)

Someone feel free to correct me if I'm wrong.

If EnvMapping is on, the RGB channels determine the shininess while the Alpha channel determines the reflectivity (i.e., reflections of nebulae.)
If it's off, then both the RGB and Alpha channels combine to determine the shininess.

Personally, I think the reflections rarely look good on anything but cockpit windows, but that's just me.

 

Offline Sushi

  • Art Critic
  • 211
Re: Specular Lighting cmdline parametres and what they do
What is this ship lab I'm always hearing about?

 

Offline Jeff Vader

  • The Back of the Hero!
  • 212
  • Bwahaha
Re: Specular Lighting cmdline parametres and what they do
F3?
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 

Offline Sushi

  • Art Critic
  • 211
Re: Specular Lighting cmdline parametres and what they do

  

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Specular Lighting cmdline parametres and what they do
From mainhall.