Corto Posted September 23, 2017 Share Posted September 23, 2017 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
GamingPrince83 Posted September 23, 2017 Share Posted September 23, 2017 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
Corto Posted September 23, 2017 Author Share Posted September 23, 2017 Ok, that's good enough for me. Thanks! On other thing. Do you know if .shader files work on .md3 models the way they work on .glm models? Link to comment
GamingPrince83 Posted September 23, 2017 Share Posted September 23, 2017 Ok, that's good enough for me. Thanks! On other thing. Do you know if .shader files work on .md3 models the way they work on .glm models?I don't know, i've only edited shaders for .glm models. Link to comment
AshuraDX Posted September 24, 2017 Share Posted September 24, 2017 Ok, that's good enough for me. Thanks! On other thing. Do you know if .shader files work on .md3 models the way they work on .glm models?they do. They only behave differently for bsp geometry/Brushes. Link to comment
Jedi_Mediator Posted September 24, 2017 Share Posted September 24, 2017 For a slightly faster way to see .shader changes take effect, use the cvar vid_restart. It reloads things like textures, shaders, effects, etc. without having to completely reload the map. Corto and AshuraDX like this Link to comment
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 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
ChalklYne Posted September 25, 2017 Share Posted September 25, 2017 @@Corto Ummm... Shouldn't your first stage be something like e11_diff? Your first stage is the same name as your shader. Hope that helps. Link to comment
ChalklYne Posted September 25, 2017 Share Posted September 25, 2017 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
SomaZ Posted September 25, 2017 Share Posted September 25, 2017 Is the shader file encoding right? "UTF-8 without BOM" would be the right encoding afaik. Link to comment
Jedi_Mediator Posted September 25, 2017 Share Posted September 25, 2017 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? Link to comment
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 Is the shader file encoding right? "UTF-8 without BOM" would be the right encoding afaik. I created the initial file with the ShaderEd tool that comes with the SDK, but I'll check the encoding just to be safe. Link to comment
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 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
SomaZ Posted September 25, 2017 Share Posted September 25, 2017 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
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 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
minilogoguy18 Posted September 25, 2017 Share Posted September 25, 2017 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
AshuraDX Posted September 25, 2017 Share Posted September 25, 2017 @@Corto okay so, I assume that this is for your E11 model.Doe the following files exist: models/weapons2/e11.jpg/tga/pngmodels/weapons2/e11_spec.jpg/tga/pngmodels/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
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 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
SomaZ Posted September 25, 2017 Share Posted September 25, 2017 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 Posted September 25, 2017 Author Share Posted September 25, 2017 @@Corto okay so, I assume that this is for your E11 model.Doe the following files exist: models/weapons2/e11.jpg/tga/pngmodels/weapons2/e11_spec.jpg/tga/pngmodels/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
AshuraDX Posted September 25, 2017 Share Posted September 25, 2017 @@Corto send me the .md3 in question and your textures (or just the whole .pk3)I'll figure out what's going on in no time. As of now I'd assume that your .md3 has faulty texturepaths embedded. Link to comment
SomaZ Posted September 25, 2017 Share Posted September 25, 2017 maybe this is the problem? Export the md3 again without a file extention for the image/shader. Link to comment
Corto Posted September 25, 2017 Author Share Posted September 25, 2017 I downloaded Ashura's Bryar, changed the main stage to whiteimage and the gun is showing all white. Somaz, I changed the texture name inside Softimage, exported again. Now it looks exactly as Ashura's md3 and still nothing. Link to comment
minilogoguy18 Posted September 25, 2017 Share Posted September 25, 2017 ^Very likely this is the cause, you are using the Custom PSet for the shader right? It SHOULD overwrite any material paths in Softimage. Link to comment
SomaZ Posted September 25, 2017 Share Posted September 25, 2017 Also, it's kind of a bad idea using the same shader name that is in use by the base game. If you are using models/weapons2/blaster_r/e11 as shader name/path that should be fine. Else it could be conflicting with the base weapons.shader. AshuraDX likes this Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now