LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JA Skinning (http://www.lucasforums.com/forumdisplay.php?f=537)
-   -   MP Shader trouble... (http://www.lucasforums.com/showthread.php?t=190349)

FoolInTheWave 07-12-2008 09:21 AM

MP Shader trouble...
 
I was adding a shader to the default Kyle skin, here is the shader:

Code:

models/players/kyle/kyle_head
{
    {
        map models/players/kyle/kyle_head
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_head
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_legs
{
    {
        map models/players/kyle/kyle_legs
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
      map models/players/kyle/kyle_legs
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_legs_blue
{
    {
        map models/players/kyle/kyle_legs_blue
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
      map models/players/kyle/kyle_legs_blue
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_legs_red
{
    {
        map models/players/kyle/kyle_legs_red
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_legs_red
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}


models/players/kyle/basic_hand
{
    {
        map models/players/kyle/basic_hand
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/basic_hand
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_torso
{
    {
        map models/players/kyle/kyle_torso
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_torso
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_torso_blue
{
    {
        map models/players/kyle/kyle_torso_blue
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_torso_blue
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_torso_red
{
    {
        map models/players/kyle/kyle_torso_red
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_torso_red
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}


models/players/kyle/kyle_extras
{
    {
        map models/players/kyle/kyle_extras
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_extras
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_extras_blue
{
    {
        map models/players/kyle/kyle_extras_blue
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_extras_blue
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_extras_red
{
    {
        map models/players/kyle/kyle_extras_red
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_extras_red
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/mouth_eyes
{
    {
        map models/players/kyle/mouth_eyes
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/mouth_eyes
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

models/players/kyle/kyle_face
{
    {
        map models/players/kyle/kyle_face
        rgbGen lightingDiffuse
        //alphaFunc GE128
    }
    {
        map models/players/kyle/kyle_face
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
        detail
    }
}

Now, the shader works fine in single player. But when I go to play multiplayer, the Kyle model is missing parts of the skin and I get error messages regarding the shader as follows:

Code:

WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_torso
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_extras
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_hand
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_face
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_mouth_eyes

Is there any way to make this shader work in multiplayer?

FoolInTheWave 07-12-2008 02:01 PM

Well thanks for the help guys. It seemed all I had to do was add the player.shader file from the base assets to my .pk3 and it worked just fine.

FoolInTheWave 07-12-2008 11:13 PM

Well, I just found out that putting the player.shader file in my pk3 only helped the problem and didn't solve it entirely. :( What I'm trying to do is add new shaders to all of the default skins in Jedi Academy. About half of the skins work with the shaders in multiplayer and I keep getting the same warnings for my shaders. Is there any way to make this fully compatible with multiplayer?

Any help would be appreciated as I want to finish this mod and start working on the JK2 version.

FoolInTheWave 07-16-2008 07:29 PM

Guess I fixed it myself. No worries!

Psyk0Sith 07-17-2008 10:03 PM

Maybe you could share the solution? not like there's a ton of modders still around but it might help someone out :).

FoolInTheWave 07-18-2008 10:07 AM

Well, here's how I got it to work. I had all shaders for each character assigned to their own shader file (i.e. Kyle's shaders were in a Kyle.shader file). So what I did is compiled all of the files into the players.shader file which is in the assets1.pk3. Made sure every shader was spaced correctly and it worked like a charm. Works in the default multiplayer, JKA+, and Moviebattles. I'm sure it works with any other multiplayer mod out there too.

Still have to finish shaders for the ships and vehicles and this mod should be done. Then I have to whip up a JK2 version and both versions should be out soon.

Psyk0Sith 07-18-2008 04:07 PM

Ah thanks very useful, pretty cool idea too. A friend of mine had shader problems maybe that's the solution he's been looking for! :D.

FoolInTheWave 07-19-2008 09:44 PM

Well, I hope everything turns out to work for your friend. :)


All times are GMT -4. The time now is 10:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.