Welcome to CMM

The CMM forum software was recently upgraded, some things may have changed and some things may be broken or not working. Please let me know by PM or on IRC if you have any problems using this forum.

Also, I've removed the skybox and shader links for now, the shader generator page was being abused and as we're moving towards a ue4 mapping base, they're redundant.

Portal texture

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

Portal texture

Postby xandaxs » Tue Oct 16, 2012 8:57 pm

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

Postby Rayne » Wed Oct 17, 2012 1:42 am

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
Contact:

Re: Portal texture

Postby xandaxs » Wed Oct 17, 2012 1:57 pm

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
Contact:

Re: Portal texture

Postby xandaxs » Wed Oct 17, 2012 10:19 pm

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

Postby vulture » Wed Oct 17, 2012 10:33 pm

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

Postby Rayne » Thu Oct 18, 2012 2:40 am

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: 895
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Portal texture

Postby johnnyenglish » Thu Oct 18, 2012 4:09 am

Rylius added this funky cheatsheet for blends

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


Return to “Shaders / textures”

Who is online

Users browsing this forum: No registered users and 1 guest

cron