shader: give texture a default light


(Ramm) #1

My current map is just toooooo dark, and I don’t want to put lights in every little place. Is there a way that I can make a texture ‘glow’, or give light by default in the shader-file?


(RayBan) #2

you can cause textures to emit light by adding
q3map_surfacelight VALUE, so for example

q3map_surfacelight 1200

but just having a texture emit light that isn’t a window or some kind of
light ‘looking’ texure might not make sense. have a look at the lights.shader
in the scripts folder to get some idea’s on what you can use.

also… you can add some key/values to your worldspawn in the map
such as _minlight, _minvertexlight, _mingridlight

just to bring up the ambient on the diffuse textures…

EDIT:
for example, try adding something like this to your wolrdspawn

_mingridlight 16
_minvertexlight 16
_minlight 16
gridsize 128 128 128


(==Troy==) #3

I have a similar question, but an opposite effect.

What shader command can be used to give a texture self-illumination? So that does not emmit light, but it is bright or dark itself and other light will not affect it? (same effect when you compile .bsp only).


(RayBan) #4

off the top of my head… i would say you want to blend add the same texture over the 1st, and just leave out the $lightmap stage… that should do what
you want.

ie.



textures/mytextures/my_texture
{
     {
          map textures/mytextures/my_texture.tga
     }
     {
          map textures/mytextures/my_texture.tga
          blendFunc add
     }
}

or something like that… basicly you just map a texture, then blend add the
same texture to make it bright, and no lightmap stage should make it
unaffected by well… the lightmap stage.

blend add is used to make windows look like their lit up.


(==Troy==) #5

nope… that didnt work :frowning: The texture still receives shadows… and not fully lit


(Darkfrost) #6

What about something like q3map_surfacelight 1?


(==Troy==) #7

nope doesnt work… :frowning: I am sure that the shader is applied to the texture, checkid in Radiant, but the result is the same… :frowning:


(RayBan) #8

well, what are you trying to do specifically? i mean with a lit up texture.


(Shaderman) #9

What about _minlight?


(==Troy==) #10

I am using a huge mover, to make a dynamic sky around the map, and I need to light that mover, but I dont want to use a light entities, because I need a 100% illumination, which is uniform for the whole texture…


(RayBan) #11

i would say have a look here,
http://www.heppler.com/shader/shader/section4.htm

there is a nolightmap, nodlight plus q3map_surfacelight parms you can
use which should do what you want.


(Shaderman) #12

q3map_backSplash could help.