$selfillum not working

Discussion in 'Mapping Questions & Discussion' started by Lampenpam, May 18, 2017.

  1. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    Hi there
    I want to make a part of a texture to glow in the dark with $selfillum but I just can't get it work.

    First I tried to compile the texture with an alpha channel but gimp either gives the immage no alpha channel at all or only the glowing part is on the texture, everything else is transparent, no informations of the original texture.
    I followed a lot of tutorials closely so I thougt something is wrong with gimp. I thought that doesn't matter since I can just save a seperate texture which will be used with $selfillummask...

    So what I have is:

    "LightmappedGeneric"
    {
    "$basetexture" "/lights/Tlight02"
    "$surfaceprop" "metal"
    "$selfillum" 1
    "$selfillummask" "/lights/Tlight02alpha"
    }

    the basetexture is the normal texture and the selfillummask texture is transparent, only showing the parts which are supposed to glow. But it still doesn't glow. What am I doing wrong?
     
  2. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    While I didnt figure out why $selfillummask didn't work, I managed to add the alpha channel with gimp without removing the rest of the texture. Appearently the channels in gimp don't work as intended when I open the image with gimp, instead I have to open gimp first and then import the image. No idea why but whatever, texture has some nice glowing parts now.
     
  3. MOCOLONI

    MOCOLONI L5: Dapper Member

    Messages:
    243
    Positive Ratings:
    60
    As far as I know, self-illumination requires the UnlitGeneric/VertexLitGeneric parameter instead of the LightmappedGeneric one.
     
  4. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    Nope, that's for models. It works perfectly fine with LightmappedGeneric since I just want it on a brush. I figured it out how to get it to work as I said in my previous post.
    But perhaps selfillummask only works with UnlitGeneric.
     
  5. MOCOLONI

    MOCOLONI L5: Dapper Member

    Messages:
    243
    Positive Ratings:
    60
    I used to create my own glowing textures under UnlitGeneric to make them self-illuminated. However, "VertexLitGeneric" are indeed mostly used for models.
     
    • Thanks Thanks x 1
  6. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    Hey good that you mention UnlitGeneric, tested it a bit and while LightmappedGeneric works perfect for most of the textures I wanted to glow, UnlitGeneric also made it work for a transparent textures.
     
    • Thanks Thanks x 1
  7. Tacoman_

    Tacoman_ L1: Registered

    Messages:
    31
    Positive Ratings:
    41
    If you are ever trying to make a simple fulbright texture. You can just use Unlitgeneric shader since it ignores all lighting by default. You dont even have to add the selfillum stuffs to it
    Code:
    UnlitGeneric
    {
    $basetexture "/lights/Tlight02A"
    $surfaceprop metal
    %keywords tf
    }