Vermillion Posted September 22, 2022 Share Posted September 22, 2022 Hey guys! I'm newbie in JK2JO modding; can somebody help me with very basics on shader creation? First question: is this possible to create a displacement shader (as stealth effect in KOTOR)? Link to comment
Circa Posted September 22, 2022 Share Posted September 22, 2022 The best way to learn shaders (or modding in general) is to find something someone else has made and see how they did it. The Shadow troooper stealth effect in JK2 is close to what you're looking for, which is the same as the saboteur stealth effect in JKA. It's called "cloakedShader" found in effects.shader. Vermillion likes this Link to comment
Vermillion Posted September 22, 2022 Author Share Posted September 22, 2022 24 minutes ago, Circa said: The best way to learn shaders (or modding in general) is to find something someone else has made and see how they did it. The Shadow troooper stealth effect in JK2 is close to what you're looking for, which is the same as the saboteur stealth effect in JKA. It's called "cloakedShader" found in effects.shader. Thx for the quick answer! I checked both: in JO Shadow Troopers stealth effect is different - he's just transparent with some strange highlights; in JA Saboteur have 2 effects when he's hiding - first same as Shadow Trooper, but in few seconds he becomes completele invisible with displaement - exactle what i've needed! I've found Shadow Trooper stealth effect ("cloakedShader" in assets1.pk3/shaders/effects.shader) but can't find displacement effect anywhere Can you point where I should search for it? Link to comment
AshuraDX Posted September 23, 2022 Share Posted September 23, 2022 The displacement you see is a hardcoded effect which you can not access through conventional material definitions in .shader files. SomaZ and Vermillion like this Link to comment
Circa Posted September 23, 2022 Share Posted September 23, 2022 21 minutes ago, AshuraDX said: The displacement you see is a hardcoded effect which you can not access through conventional material definitions in .shader files. Kinda throws my comment out the window then. Maybe the effect can be replicated via custom shader? Link to comment
Vermillion Posted September 23, 2022 Author Share Posted September 23, 2022 Is there any way to apply this hardcoded effect on a custom model? Link to comment
AshuraDX Posted September 24, 2022 Share Posted September 24, 2022 On 9/23/2022 at 4:09 PM, Circa said: Maybe the effect can be replicated via custom shader? The effect works by taking a snapshot of whats rendered behind it and transforming those pixels by modifying scale and translation slightly. This can not be replicated with the tools we have in vanilla jka. A modded renderer could probably expose the effect to the materrial system but that seems like a lot of work. @SomaZ should be able to elaborate on that. 20 hours ago, Vermillion said: Is there any way to apply this hardcoded effect on a custom model? Not without making a fork of OpenJK, adding in your changes and compiling a custom version of the game executable that way I'm afraid. Vermillion likes this Link to comment
Solution mjt Posted October 11, 2022 Solution Share Posted October 11, 2022 On 9/23/2022 at 8:29 PM, Vermillion said: Is there any way to apply this hardcoded effect on a custom model? Well you can check out the saboteur NPC and assign a different model to it, see if the stealth still works on it - from there on out you could make any kind of NPC as long as the class is what makes it cloak... 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