About alpha in GTK

Results 1 to 8 of 8
  1. #1
    @ your moms bed thajj is offline
    MemberRank
    Apr 2007 Join Date
    The NetherlandsLocation
    647Posts

    About alpha in GTK

    Hi all,

    I've seen some maps that has walls where you can look trough, i tried some things to get this done like:

    in photoshop save as .TGA with opacity at like 60% - in game - nothing... just the normal wall..

    then is there a script or anything because i got 2 scripts i made myself so you can walk trough wallss but how you make them alpha?

    thejj,

    edit: after some more looktrough: i found out that it has to be something with calk if im not right? atleast i found out it isnt the tga file you can do it with every texture its just i dunno exactly how to... is it caulk or nodraw or wahtever??

    still need help.. and btw dont post something like : i dunno sorry cant help you... really i dont got anything on that..

    The pictures in the attachment, i want it to be liek that..: i think its weapon clip??
    Attached Thumbnails Attached Thumbnails gunz020.jpg   gunz021.jpg  
    Last edited by thajj; 09-09-10 at 03:43 PM.


  2. #2
    What year is this? pluke001 is offline
    MemberRank
    Nov 2008 Join Date
    LithuaniaLocation
    941Posts

    Re: About alpha in GTK

    In your situation, just read a bit more about shaders there If shaders wont work for you, then I am sure you made mistake somewere.
    GZMap • View topic - Tutorial 1, shaders the basics.
    also there is tut about alpha channels.
    GZMap • View topic - Tutorial -> Using Alpha Channel

    Also here is my shader code familiar to that picture shader you posted:

    PHP Code:
    textures/Shader5/blue_shader
    {

        
    surfaceparm additive    
        qer_trans 0.8    
        qer_editorimage 
    "textures/Shader5/blue.tga"

    Last edited by pluke001; 09-09-10 at 05:22 PM.

  3. #3
    @ your moms bed thajj is offline
    MemberRank
    Apr 2007 Join Date
    The NetherlandsLocation
    647Posts

    Re: About alpha in GTK

    ah thats what i needed :D

    BTW when i try out your shader... it starts failing building light with me...

  4. #4
    What year is this? pluke001 is offline
    MemberRank
    Nov 2008 Join Date
    LithuaniaLocation
    941Posts

    Re: About alpha in GTK

    Quote Originally Posted by thajj View Post
    when i try out your shader... it starts failing building light with me...
    Works fine for me o.o

  5. #5
    (。◕‿‿◕。) Nobody666 is offline
    MemberRank
    Oct 2008 Join Date
    1,773Posts

    Re: About alpha in GTK

    Quote Originally Posted by thajj View Post
    ah thats what i needed :D

    BTW when i try out your shader... it starts failing building light with me...
    you need to change the location of it.

    make sure its either where his is located ("textures/Shader5/blue.tga") or change it to where you have it

    That may fix it

  6. #6
    @ your moms bed thajj is offline
    MemberRank
    Apr 2007 Join Date
    The NetherlandsLocation
    647Posts

    Re: About alpha in GTK

    lol i know that":P its just i never used .tga behind it, look i use this script to make a wall walktroughable :D

    Code:
    //glassblock walktrough
    textures/common/glassblock08walktrough
    {
    		qer_trans 0.8
    		qer editorimage "textures/common/glassblock08walktrough"
    	surfaceparm nonsolid
    }
    see with out the .tga and it works fine... but ill try to do that... with the tga in the codde...

    wel lol that was the problem... i had to add the ".tga" to it for somereasonn , ,lol strange but ok thanks..

    request thread close..
    Last edited by thajj; 09-09-10 at 11:20 PM.

  7. #7
    Account Upgraded | Title Enabled! EnhanceGFX is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    440Posts

    Re: About alpha in GTK

    Quote Originally Posted by thajj View Post
    lol i know that":P its just i never used .tga behind it, look i use this script to make a wall walktroughable :D

    Code:
    //glassblock walktrough
    textures/common/glassblock08walktrough
    {
    		qer_trans 0.8
    		qer editorimage "textures/common/glassblock08walktrough"
    	surfaceparm nonsolid
    }
    see with out the .tga and it works fine... but ill try to do that... with the tga in the codde...

    wel lol that was the problem... i had to add the ".tga" to it for somereasonn , ,lol strange but ok thanks..

    request thread close..
    Remove the qer editorimage line then like:

    //Water
    textures/Shaders/walkthroughblue
    {
    surfaceparm nonsolid
    surfaceparm additive
    qer_trans 0.8
    }

    Code:
    //Water = Description
    textures/shaders/walkthroughblue = location and name of file, regardless the extension.
    {
    surfaceparm nonsolid - this means you can walk through it, not needed in your case but good to know.
    surfaceparm additive - means that it is see-through, however, the amount of opacity with this is controlled by the amount of light. if it is dark itl be very transparant, if its light itl be sleightly transparant, just play around with light and youll find out
    qer_trans 0.8 - means itl be 80% opacity in gtk mode so you can see that it has shader effects, has no effect ingame
    }
    You won't see how transparant unless your ingame so you have to test frequently, gl.

    If you put your shader images in textures/shaders/ then name this script file "Shaders.shader" Shaders = the folder name and .shader is the file extension.

  8. #8
    @ your moms bed thajj is offline
    MemberRank
    Apr 2007 Join Date
    The NetherlandsLocation
    647Posts

    Re: About alpha in GTK

    ohw thanks really helped :P cuz i was like wtf in game nothing happends.. then when i added <USEOPACITY/> in the RS.xml it did worked but not really good... do you have to add that <USEOPACITY/> or it is not neccesary?

    please reply on how exactly you did it? thanks in advance



Advertisement