INFORMATION:
This Mod/Kit whatever you want to call it includes the following:
Basically it adds Parallax Occlusion effect on ground and wall textures and some few other textures.
The shaders are written by me, however they look similar with Barabas' Shaders. His shaders actually helped me make this, because at first I tried to use his. But they weren't working right and his source resisted against getting compiled. So I based my shaders upon his.
I will update this as I add more features. probably.
Todo: Depth Biasing or something faster, self-shadows or depth based shading(faster but doesn't look as awesome)
SCREENSHOTS:
Dynamic Parallax Occlusion:
SSAO Comparison. First Image with ssao, second image without ssao.
Other Screenshots:
DOWNLOAD LINK:
Parallax & SSAO - Added Dynamic Parallax Occlusion 11-Dec-16
HOW TO INSTALL:
The paragraphs starting with * are important. Please read them not to screw your game/mods.
---Step 1:
Download and unzip the .zip file first.
---Step 2:
Then copy all the contents except "module.ini" inside the unzipped folder to the mod you want to play this with. If you want to play this with native. Then go ahead and copy-paste module.ini as well. You can safely replace that file only if you are copying the files to native.
*However, if a "file exists do you want to replace" kind of window pops up click cancel, because probably the mod you want to play this with could have custom shaders of it's own.
*Or you could have tried to copy "module.ini" as well. Even tho I told you not to. If that is the case go back to the start of this step. (Step 2)
---Step 3 (required step for mods/but not native):
If you copied the files to a mod instead of native. There is one final step, which is opening up the module.ini of that mod. And adding "load_mod_resource = parallax_materials" without brackets just above "load_resource = materials". If you put it below it won't work, because warband engine.
---Step 4:
Play.
MORE THINGS YOU NEED TO KNOW:
Even if the mod you want to play this with doesn't have any custom shaders and anything like that and you copied all the files successfully, you must know that not all texture's in the mod will look awesome. That is because the mod materials won't use parallax shader. But any material native uses will use the parallax shaders.
Furthermore, I guess this would also be useless in total-conversion mods that doesn't use the native ground and wall textures.
I haven't been able to make heightmaps to all native textures. It would be great if you can make them and send me a pm, then I'll update this post. Such textures are inside the Textures folder too.
I guess this wouldn't necessarily be necessary for total-conversion mods unless the mod uses the native ground or wall textures at best.
TECHNICAL STUFF FOR MODDERS:
Dynamic Parallax Occlusion Update Info:
Additionally to all the other instructions, You need to enter the texture width, height and heightMapScale to dynamic parallax occlusion material. You can enter these values to Spec Color textboxes in OpenBrf. If that doesn't make any sense, check out this screenshot:
If you want to use the shaders and heightmaps provided in this kit you have to credit me and provide a link to this topic so others could see it and use for themselves aswell.
The shaders use the blue channel just like in barabas' shaders. Why you might ask? Because a heightmap is just a graycolor image it is either 0 or 1. AAaaand, warband materials doesn't support a heightmap texture input. But its unnecessary as using a separate texture would increase file sizes, besides blue channel in warband normal maps are mostly unused. It is possible to calculate the z of the normalmap by using x and y of it. In fact this is what the shaders included here does.
If you want to make a heightmap for a certain texture. Place it in the blue channel of it's normalmap. And save it as DDS DXT1.
You can find all the parallax materials in parallax_materials, duh. But whats more? You can also find all the normalmaps used by those materials inside the Textures folder with their blue channel correctly set with it's heightmap. However I wasn't able to make heightmaps for few of those. If it's looking blueish purplish, then it probably doesn't have a correct heightmap but check the blue channel to make sure. You can try to fix those and please give me a link so i can update the download link with those.
To see all the available shader types available in this Kit, open Core_Shaders.brf inside the Resource folder. Each shader with _parallax prefix at the end or somewhere in the middle requires a normalmap texture with a heightmap placed in it's blue channel. The shader names are usually the same with their native counterparts which doesn't have parallax. The aforementioned shaders are also set as fallback's. But parallax is a simple technique and I don't think the fallbacks are necessary, but better to be safe than sorry.
If you have you own custom shaders but you want to use this one as well, have no fear as I've included the real deal. If you haven't changed/edited any of the native shaders, that is perfect. You can use this one as a base and copy paste your custom shader codes inside this kits shader source file. But If you've made changes to techniques ps_main_bump and ps_standart_new (I might be forgetting some), I'm afraid it is going to be more complicated than that.
But still not impossible. I've made changes to original native normal calculations and added parallax calculations. That is all there is to it. So make sure that my changes doesn't collide with your changes.
After you are done, copy paste the shaders inside Core_Shaders.brf with _parallax prefixes. And you are done.
* Use at your own risk. If it fails or something gets burned, I'm not responsible. But I highly doubt that anything would get burned, might fail..., but not fire.
This Mod/Kit whatever you want to call it includes the following:
- Dynamic Parallax Occlusion with self-shadows(Only for static models, single light source. Good for outdoors.)
- Parallax Shaders
- Source Code
- Shader Compiler
- Fixed Normal Maps with Height Maps
- SSAO Shader
Basically it adds Parallax Occlusion effect on ground and wall textures and some few other textures.
The shaders are written by me, however they look similar with Barabas' Shaders. His shaders actually helped me make this, because at first I tried to use his. But they weren't working right and his source resisted against getting compiled. So I based my shaders upon his.
I will update this as I add more features. probably.
Todo: Depth Biasing or something faster, self-shadows or depth based shading(faster but doesn't look as awesome)
SCREENSHOTS:
Dynamic Parallax Occlusion:
SSAO Comparison. First Image with ssao, second image without ssao.
DOWNLOAD LINK:
Parallax & SSAO - Added Dynamic Parallax Occlusion 11-Dec-16
HOW TO INSTALL:
The paragraphs starting with * are important. Please read them not to screw your game/mods.
---Step 1:
Download and unzip the .zip file first.
---Step 2:
Then copy all the contents except "module.ini" inside the unzipped folder to the mod you want to play this with. If you want to play this with native. Then go ahead and copy-paste module.ini as well. You can safely replace that file only if you are copying the files to native.
*However, if a "file exists do you want to replace" kind of window pops up click cancel, because probably the mod you want to play this with could have custom shaders of it's own.
*Or you could have tried to copy "module.ini" as well. Even tho I told you not to. If that is the case go back to the start of this step. (Step 2)
---Step 3 (required step for mods/but not native):
If you copied the files to a mod instead of native. There is one final step, which is opening up the module.ini of that mod. And adding "load_mod_resource = parallax_materials" without brackets just above "load_resource = materials". If you put it below it won't work, because warband engine.
---Step 4:
Play.
MORE THINGS YOU NEED TO KNOW:
Even if the mod you want to play this with doesn't have any custom shaders and anything like that and you copied all the files successfully, you must know that not all texture's in the mod will look awesome. That is because the mod materials won't use parallax shader. But any material native uses will use the parallax shaders.
Furthermore, I guess this would also be useless in total-conversion mods that doesn't use the native ground and wall textures.
I haven't been able to make heightmaps to all native textures. It would be great if you can make them and send me a pm, then I'll update this post. Such textures are inside the Textures folder too.
I guess this wouldn't necessarily be necessary for total-conversion mods unless the mod uses the native ground or wall textures at best.
TECHNICAL STUFF FOR MODDERS:
Dynamic Parallax Occlusion Update Info:
Additionally to all the other instructions, You need to enter the texture width, height and heightMapScale to dynamic parallax occlusion material. You can enter these values to Spec Color textboxes in OpenBrf. If that doesn't make any sense, check out this screenshot:
If you want to use the shaders and heightmaps provided in this kit you have to credit me and provide a link to this topic so others could see it and use for themselves aswell.
The shaders use the blue channel just like in barabas' shaders. Why you might ask? Because a heightmap is just a graycolor image it is either 0 or 1. AAaaand, warband materials doesn't support a heightmap texture input. But its unnecessary as using a separate texture would increase file sizes, besides blue channel in warband normal maps are mostly unused. It is possible to calculate the z of the normalmap by using x and y of it. In fact this is what the shaders included here does.
If you want to make a heightmap for a certain texture. Place it in the blue channel of it's normalmap. And save it as DDS DXT1.
You can find all the parallax materials in parallax_materials, duh. But whats more? You can also find all the normalmaps used by those materials inside the Textures folder with their blue channel correctly set with it's heightmap. However I wasn't able to make heightmaps for few of those. If it's looking blueish purplish, then it probably doesn't have a correct heightmap but check the blue channel to make sure. You can try to fix those and please give me a link so i can update the download link with those.
To see all the available shader types available in this Kit, open Core_Shaders.brf inside the Resource folder. Each shader with _parallax prefix at the end or somewhere in the middle requires a normalmap texture with a heightmap placed in it's blue channel. The shader names are usually the same with their native counterparts which doesn't have parallax. The aforementioned shaders are also set as fallback's. But parallax is a simple technique and I don't think the fallbacks are necessary, but better to be safe than sorry.
If you have you own custom shaders but you want to use this one as well, have no fear as I've included the real deal. If you haven't changed/edited any of the native shaders, that is perfect. You can use this one as a base and copy paste your custom shader codes inside this kits shader source file. But If you've made changes to techniques ps_main_bump and ps_standart_new (I might be forgetting some), I'm afraid it is going to be more complicated than that.
But still not impossible. I've made changes to original native normal calculations and added parallax calculations. That is all there is to it. So make sure that my changes doesn't collide with your changes.
After you are done, copy paste the shaders inside Core_Shaders.brf with _parallax prefixes. And you are done.
* Use at your own risk. If it fails or something gets burned, I'm not responsible. But I highly doubt that anything would get burned, might fail..., but not fire.
Last edited: