Portal texture

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

Portal texture

Post by xandaxs »

Hello folks!

I've got a portal texture I've put together and edited (for a jump map this is). But for some reason it is transparent when I don't want it to be.
I believe the shader is correct so i don't really know what's wrong.

Here's the texture:
Image

And here's the shader:

Code: Select all

textures/axanjumps/portal
{
    qer_editorimage textures/xanjumps/portal.tga
    cull disable
    //surfaceparm trans   
    surfaceparm nomarks   
    surfaceparm nolightmap
   surfaceparm nonsolid
   surfaceparm noimpact
   surfaceparm alphashadow
    //nomipmaps
          {
      clampmap textures/xanjumps/portal.tga
       tcmod rotate 25
        blendFunc add
       rgbGen identity
   }
}
[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
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Portal texture

Post by Rayne »

You're using blendfunc add, that's why it's transparent.

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

Re: Portal texture

Post by xandaxs »

oh -.-
thanks
[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: Portal texture

Post by xandaxs »

After removing the blendfunc add, the alpha part turned black ig :/
[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

vulture
Posts: 59
Joined: Mon Feb 27, 2012 6:57 pm

Re: Portal texture

Post by vulture »

do a normal "blendFunc blend" like I mentioned on irc yesterday... :P

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Portal texture

Post by Rayne »

Blendfunc add is very similar to color dodge blend mode in photoshop. So 2 bright pixels will give an extra bright pixel. That's why we use that blenfunc for stuff like fire.
Blendfunc add is similar to overlay blend mode in photoshop. And it's best for smoother alpha blends.
Blendfunc fliter is similar to multiply blend mode in photoshop. Lightmaps are applied to a surface via this blendfunc.
There are other blendfuncs but these 3 are basic.

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Portal texture

Post by johnnyenglish »

Rylius added this funky cheatsheet for blends

Wiki Blendmodes - so you can visualise how it might work.

Post Reply