shader + textures glow and luma

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Tue Oct 13, 2009 8:29 pm

  • Hi there,
    I'm trying to do a skin for a monster in quake using the darkplaces engine, with glow, gloss and normal textures.
    Then I wanted to create a shader to blend the skin (the diffusemap) to reveal a second stage, but after doing this I can't see all the gloss, normals, etc created previously, only the diffuse, apparently fullbright.

    Code: Select all
    progs/monster.mdl_0
    {   
       q3map_globaltexture
       {
       map progs/monsterFX.tga
       tcMod scroll 0 -0.1
       }

       {
       map progs/monster.mdl_0.tga
       alphaGen vertex
       blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
       }
    }


    monster.tga has an alpha channel with a black spot to reveal the layer below (monsterFX)
    then I have
    monster.mdl_0_gloss.tga with white alpha
    monster.mdl_0_norm.tga with white alpha
    (I cite all of this just to be informed if I make something redundant or useless)

    monsterFX has gloss and norm too.

    What's wrong in the shader?

    thanks
    shambler111
    Newbie
     
    Posts: 3
    Joined: Tue Oct 13, 2009 7:54 pm

Tue Oct 13, 2009 9:14 pm

  • to reveal a second stage


    DP can't read multiple staged shaders.
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Tue Oct 13, 2009 9:16 pm

  • Actually it's possible using alphagen vertex in the second stage.
    shambler111
    Newbie
     
    Posts: 3
    Joined: Tue Oct 13, 2009 7:54 pm

Tue Oct 13, 2009 10:15 pm

  • yes it's a recent dp feature, usable in Nexuiz since v 2.5.2

    Code: Select all
    r9042 | divverent | 2009-07-05 19:18:52 +0200 (dim. 05 juil. 2009) | 22 lignes

    Support a separate texture matrix for the background layer.

    Example shader stages using it:

    {
            map textures/savdm6ish/#lava1.jpg
    }
    {
            map textures/final_rage/lava.blend.tga
            tcMod rotate 50
            tcMod scale 2 2
            tcMod scroll 0.05 0.05
            alphaGen vertex
            blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    }

    NOTE: you still have to specify alphaGen vertex, or DP will not use the
    secondary stage! To allow static mixing of two textures, the second texture
    currently must have its own alpha channel.

    Stuff also possible with this: detail textures...
    Ronan
    Alien trapper
     
    Posts: 292
    Joined: Tue Mar 20, 2007 10:25 pm
    Location: France

Tue Oct 13, 2009 11:48 pm

  • Wow, things I learn :)
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Wed Oct 14, 2009 5:45 pm

  • So, any idea about my issue?

    bye
    shambler111
    Newbie
     
    Posts: 3
    Joined: Tue Oct 13, 2009 7:54 pm



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest