Jump to content

Is there a way to reload .shader files while playing the game?


Corto
Go to solution Solved by AshuraDX,

Recommended Posts

My issue is simple, I would like to play around with .shader files to learn more about them. I mean do a lot of trial and error and see for myself what each change or option does in-game, if any, until I'm satisfied with what can be achieved. Since there's no viewer to test them in real-time (I think Wudan's Dragon did the trick back in the day), I was wondering if there's a way to, while remain in the game, reload the .shader files and see how my changes impact the end result. My first thought is to reload the level, but I haven't tried that yet and maybe with OpenJK there's a command that will do the trick. Thanks.

Link to comment

My issue is simple, I would like to play around with .shader files to learn more about them. I mean do a lot of trial and error and see for myself what each change or option does in-game, if any, until I'm satisfied with what can be achieved. Since there's no viewer to test them in real-time (I think Wudan's Dragon did the trick back in the day), I was wondering if there's a way to, while remain in the game, reload the .shader files and see how my changes impact the end result. My first thought is to reload the level, but I haven't tried that yet and maybe with OpenJK there's a command that will do the trick. Thanks.

I've been able to edit NPC and SAB files by placing them into folders rather than in a PK3 file, just minimize the game, edit your files 

reload the level with the Devmap command.

It should work for all Jedi Academy files other than Pk3 files.

Corto likes this
Link to comment

I can't seem to get the shader for the E11 to work. No matter what changes I make, at I should be able to break the damn script, but nothing. Here's my shader file:

 

models/weapons2/blaster_r/e11
{
    {
        map models/weapons2/blaster_r/e11
        blendFunc GL_ONE GL_ZERO
        rgbGen lightingDiffuseEntity
    }
    {
        map models/weapons2/blaster_r/e11_spec
        blendFunc GL_SRC_ALPHA GL_ONE
        alphaGen lightingSpecular
    }
    {
        map models/weapons2/blaster_r/e11_env
        blendFunc GL_DST_COLOR GL_SRC_COLOR
        alphaGen const 1
        tcGen environment
    }
}

 

At least, the final stage should make the model look glossy, because I did this for the dianoga model and the phase 1 dark trooper and I know it works. But nothing I do seems to work with blaster.

Link to comment

 

models/weapons2/blaster_r/e11

{

{

map models/weapons2/blaster_r/e11_diff

blendFunc GL_ONE GL_ZERO

rgbGen lightingDiffuseEntity

}

{

map models/weapons2/blaster_r/e11_spec

blendFunc GL_SRC_ALPHA GL_ONE

alphaGen lightingSpecular

}

{

map models/weapons2/blaster_r/e11_env

blendFunc GL_DST_COLOR GL_SRC_COLOR

alphaGen const 1

tcGen environment

}

}

 

 

Like that.

Then rename your diffuse texture to e11_diff.

If that's not your problem I'm at a loss.

Link to comment

You could try something really drastic, like changing the shader to just one stage that displays $whiteimage. If the model doesn't show up glaringly white in-game, then you know your shader file is having no effect (for whatever reason).

 

And obvious question--if you're in MP, is sv_pure set to 0?

 

I tried this and my gun is still showing the diffuse map as normal. So now it's clear that the model is not even loading up the .shader file. Once I sort this issue out, then it will make some sense to experiment with shaders.

Link to comment

I tried this and my gun is still showing the diffuse map as normal. So now it's clear that the model is not even loading up the .shader file. Once I sort this issue out, then it will make some sense to experiment with shaders.

 

Last thing I can think of is putting the shader file into a pk3.

Link to comment

I'm modifying the factory shaders with the whiteimage flag and nothing is going on. Packing the files into a pk3 changes nothing. Can somebody post a video where I can see the shader file actually working on the model? Like, try the whiteimage trick and show me it's actually working?

Link to comment

Could you upload the pk3 somewhere and send me the link? I think @@ChalklYne is on to something, a naming mismatch and if you're using a .skin file I want to take a look at that too.

 

I've never gotten too into shaders but I tend to just use good ol notepad, as long as it's a shader where you're expecting the end result you don't really need to use ShaderEd2.

Link to comment

@@Corto okay so, I assume that this is for your E11 model.

Doe the following files exist:

 

models/weapons2/e11.jpg/tga/png

models/weapons2/e11_spec.jpg/tga/png

models/weapons2/e11_env.jpg/tga/png

 

I'd assume they don't.

Are ou testing your shaders with the same version of the model as the one hosted here currently?

Link to comment

You can all use the model available here at Jkhub. That's what I'm using. But still, even if there is something wrong with the way I created my shader file, that doesn't explain why my changes on the factory shaders don't seem to have any effect on the other guns. I should be able to screw the shaders that are, supposedly, working. My concern, now, is that shader files are not working correctly for first person view models. I tried with the vainilla version of JA and same thing. My changes to guns shaders seem to have no effect. So now I would like to have actual proof that view models use shaders.

Link to comment

You can all use the model available here at Jkhub. That's what I'm using. But still, even if there is something wrong with the way I created my shader file, that doesn't explain why my changes on the factory shaders don't seem to have any effect on the other guns. I should be able to screw the shaders that are, supposedly, working. My concern, now, is that shader files are not working correctly for first person view models. I tried with the vainilla version of JA and same thing. My changes to guns shaders seem to have no effect. So now I would like to have actual proof that view models use shaders.

Just download Ahuras Bryar replacement. It uses shaders, also the view model one.
Link to comment

@@Corto okay so, I assume that this is for your E11 model.

Doe the following files exist:

 

models/weapons2/e11.jpg/tga/png

models/weapons2/e11_spec.jpg/tga/png

models/weapons2/e11_env.jpg/tga/png

 

I'd assume they don't.

Are ou testing your shaders with the same version of the model as the one hosted here currently?

 

They exist. They are under models/weapons2/blaster_r. The filenames you see on my example are different than the ones I've uploaded here, but that's just because I've been trying a lot of different alternatives.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...