Shader Help

Having a problem with a shader or texture
User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Shader Help

Post by xandaxs »

Hello guys!

I'm giving some final touchs to a fun CAH map made by Swi!t.
I'm facing a problem and so i need your help.

I've a decal on the wall (gold symbol) and so, I added surfacelight 25 t it, and now i want it to reflect light, or at least give that effect.

I've this shader for the decal:

Code: Select all

textures/aztek/aztec
{
qer_editorimage textures/aztek/aztec.tga
polygonOffset
nomipmaps
nopicmip
surfaceparm trans
q3map_surfacelight 25
{
map textures/aztek/aztec.tga
blendfunc filter
}
}


And this one for the reflection:

Code: Select all

textures/aztek/chrome
{
        surfaceparm detail
        surfaceparm nodamage
        surfaceparm nomarks
        qer_editorimage textures/aztek/aztec.tga
        {
            map textures/aztek/chrome_tint.tga
            tcGen environment
        }
        {
            map textures/aztek/aztec.tga
            blendFunc GL_ONE GL_ONE
            tcMod scale 8 8
            rgbGen identity
        }
        {
            map $lightmap
            rgbgen identity
            blendFunc GL_DST_COLOR GL_ZERO
        }
}


I want t put the 2 of them together, so it works on the "aztec" texture - the decal.
How do i put them in 1 shader?
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Shader Help

Post by Delirium »

want to upload the image so I can see what your trying to blend?
Image

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: Shader Help

Post by xandaxs »

aztec.jpg
aztec.jpg (103.82 KiB) Viewed 11124 times
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: Shader Help

Post by xandaxs »

i can save it as .tga and it'll have ;)
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Shader Help

Post by Delirium »

Actually I can't remember how its done with tcgen environment, cause I recall trying to do a similar thing in facade.
I actually cheated here though

Code: Select all

textures/aadel_facade/metal_1_red
{
   qer_editorimage textures/aadel_facade/metal_1_red.tga
   q3map_forcemeta
   q3map_clipmodel
   q3map_vertexScale 1.2

   surfaceparm trans
   nopicmip
   //cull none

   {
      map textures/aadel_facade/metal_1_red.tga
      rgbgen vertex
   }
   {
      map textures/aadel_facade/tinfx.tga
      tcgen environment
      blendFunc GL_ONE GL_ONE
      rgbgen vertex
   }
   {
      map textures/aadel_facade/metal_1_red.tga
         blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
      rgbgen vertex
   }
   //{
   //   map $lightmap
   //   blendfunc filter
   //}
}


Just make a nice specular texture for bumpy
Image

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Shader Help

Post by Delirium »

^ note that texture wasn't alpha blended like yours is... that texture was like a metal texture
Image

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: Shader Help

Post by xandaxs »

can't yu please just edit mine? :O
I can't get a **** of your shader :/
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Shader Help

Post by Delirium »

Delirium wrote:Actually I can't remember how its done with tcgen environment


Delirium wrote:Just make a nice specular texture for bumpy
Image

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: Shader Help

Post by xandaxs »

Okay :(
I'll try it without the reflection to see if it looks okay.
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Shader Help

Post by Delirium »

Code: Select all

textures/aztek/aztec_blend_shit_lololol
{
   qer_editorimage textures/aztek/aztec.tga
   polygonOffset
   //nomipmaps //dont use this on decals, it causes bad aliasing
   nopicmip
   surfaceparm trans
   surfaceparm nomarks
   surfaceparm nonsolid
   q3map_surfacelight 25 //Why are you using this?
   {
      map textures/aztek/aztec.tga
      blendfunc filter
   }
   {
      map textures/aztek/aztec.tga
      blendfunc filter
      tcGen environment
   }
}


Try that I guess, but IDK I think it will cause problems... you'd be better off trying a specular texture with bumpy
Image

Post Reply