DarkPlacesEngine / DarkPlaces

The DarkPlaces Quake engine, created by LadyHavoc. Official Git repository (replaces SVN).
https://icculus.org/twilight/darkplaces/
GNU General Public License v2.0
286 stars 40 forks source link

does dp not have gl_overbright or is it just under a dif name #124

Open lavenderdotpet opened 8 months ago

lavenderdotpet commented 8 months ago

cant seem to find the command

hemebond commented 8 months ago

What does gl_overbright do? Anything like this?

cvar r_fullbrights is "1" ["1"] enables glowing pixels in quake textures (changes need r_restart to take effect)
lavenderdotpet commented 8 months ago

What does gl_overbright do? Anything like this?

cvar r_fullbrights is "1" ["1"] enables glowing pixels in quake textures (changes need r_restart to take effect)

left gl_overbright on right gl_overbright off image

Baker7 commented 8 months ago

Overbright is different than fullbright. Overbright is lighting more intense than full light.

Try specifying "1 0 0" as a real-time light color and it put out red light, if you specify "8 0 0" it will overbright where the light goes washing out colors.

lavenderdotpet commented 8 months ago

Overbright is different than fullbright. Overbright is lighting more intense than full light.

Try specifying "1 0 0" as a real-time light color and it put out red light, if you specify "8 0 0" it will overbright where the light goes washing out colors.

gl_overbright just makes the models brighter to stand out from the background

Baker7 commented 8 months ago

In my modified Zircon Engine I added r_minlight (default 0) but I often set r_minlight 2 to get monsters in Quake brighter. It puts extra light on models to solve the problem you describe, but is sort of a placeholder hack.

DarkPlaces does not seem to brighten models enough -- leaving them -- in my opinion -- too dark.

The other "solutions" like setting r_hdr_scenebrightness above 1 don't quite achieve what I want.

lavenderdotpet commented 8 months ago

In my modified Zircon Engine I added r_minlight (default 0) but I often set r_minlight 2 to get monsters in Quake brighter. It puts extra light on models to solve the problem you describe, but is sort of a placeholder hack.

DarkPlaces does not seem to brighten models enough -- leaving them -- in my opinion -- too dark.

The other "solutions" like setting r_hdr_scenebrightness above 1 don't quite achieve what I want.

offtopic but is Zircon not on github your post only links moddb

Baker7 commented 8 months ago

gl_overbright_0 gl_overbright_1

A quick experiment ...

One thought on how to add such a feature ...

If gl_overbright 1 -- the default colormod is not 1 1 1 but rather 2 2 2 on the client side.

The overbright code in Quakespasm is GL_Bind (tx); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PRIMARY_COLOR_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 2.0f); GL_EnableMultitexture(); // selects TEXTURE1 GL_Bind (fb); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); glEnable(GL_BLEND); GL_DrawAliasFrame (paliashdr, lerpdata); glDisable(GL_BLEND); GL_DisableMultitexture(); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

So looks to be a color modulation pass

Baker7 commented 8 months ago

gl_overbright_models

I have it scale the modulation x 2 in each of the 5 places that render.colormod is set based off gl_overbright_world and gl_overbright_models.

    VectorSet(ent->render.colormod, 1, 1, 1);  // OVERBRIGHT

    if (gl_overbright_world.integer) {
        VectorScale (ent->render.colormod, 2, ent->render.colormod);
    }
Baker7 commented 8 months ago

MissLavender-LQ, thank for you raising this issue! I long wanted to be able to at least offer a more Quakespasm/FitzQuake looking appearance of monsters because I always thought they were just a little too dark to enjoy gameplay -- and this finally identified the issue.

Messing with it more ...

gl_overbright_models needs to NOT apply to world brush models and for Zircon I am having this default to 1. It just makes monsters more visible, but keeps monsters in the dark.

overbrightmodels1_darkness_still_good

The modification I did -- every time render.colormod is set (4 places) -- do 2x color modulation to it. cl_main.c has 3 places and clvm_cmds.c in VM_CL_makestatic is the 4th location.

    if (e->render.model && e->render.model->model_name[0] == '*') {
        if (gl_overbright_world.integer) {
            VectorScale (e->render.colormod, 2, e->render.colormod);
        }
    } else if (gl_overbright_models.integer) {
        VectorScale (e->render.colormod, 2, e->render.colormod);
    }

gl_overbright_world applies to world model + world brush models -- I have it default OFF in Zircon --- most content targeting DarkPlaces this it just looks wrong.

lavenderdotpet commented 8 months ago

MissLavender-LQ, thank for you raising this issue! I long wanted to be able to at least offer a more Quakespasm/FitzQuake looking appearance of monsters because I always thought they were just a little too dark to enjoy gameplay -- and this finally identified the issue.

Messing with it more ...

gl_overbright_models needs to NOT apply to world brush models and for Zircon I am having this default to 1. It just makes monsters more visible, but keeps monsters in the dark.

overbrightmodels1_darkness_still_good

The modification I did -- every time render.colormod is set (4 places) -- do 2x color modulation to it. cl_main.c has 3 places and clvm_cmds.c in VM_CL_makestatic is the 4th location.

  if (e->render.model && e->render.model->model_name[0] == '*') {
      if (gl_overbright_world.integer) {
          VectorScale (e->render.colormod, 2, e->render.colormod);
      }
  } else if (gl_overbright_models.integer) {
      VectorScale (e->render.colormod, 2, e->render.colormod);
  }

gl_overbright_world applies to world model + world brush models -- I have it default OFF in Zircon --- most content targeting DarkPlaces this it just looks wrong.

OOOOO HELL YEA :3