Name: Total War Shader Shader: PBR Specular Glossiness Engine: WarScape (Total War: Attila) Appplication: Substance Designer
This package includes the Total War Shader and a Substance template to use the shader properly.
Please follow the instructions to install the shader and the template.
The Total War Shader is a complete translation of the HLSL shader for 3ds Max provided in the
official Assembly Kit of Total War: Attila. Together with the Substance template you will be
able to create textures which fit into the engine of Total War: Attila perfectly. It allows the
developer to preview and fine-tune the textures directly in Substance Designer. All functionalities
are supported.
-----| Installation |-----
1.
Go to "Shader" and copy everything in there.
Open the installation folder of Substance Designer
(should be "C:\Program Files\Allegorithmic\Substance Designer <version>").
Go to "...\resources\view3d\shaders".
Paste the files from the "Shader" folder there.
2.
Go back to the Total War Shader Package root.
Copy the .sbs file in "Template".
Create a folder somewhere on your computer and paste the file into that folder.
This folder should be placed there permanently so that it remains accessible by
Substance Designer.
Launch Substance Designer.
Go to "Tools" -> "Preferences".
Click on the "Projects" tab on the left side.
Under "Project" scroll down to "Substance Templates".
Click "Add new path" on the right side.
Choose your folder and add it.
Restart Substance Designer.
You should now be able to create a new Substance with the Total War template. To apply the
Total War shader in the 3D viewport, go to "Materials" -> "Default" (may also be a mesh name)
-> "Definitions" and then you can select "physically_total_war".
Check out the "Channels" tab to disable or enable textures.
Will this work with Substance Painter, or only Substance Designer?
Right now it works with Substance Designer only because shaders are handled differently in Designer and Painter. For Painter custom shader integration is a WAY more limited than Designer at the time. However, relating to the feedback of developers from Allegorithmic it's on the roadmap to make the shaders as interchangeable as possible. I plan to support Painter as well but due to hardcoded restrictions it's not possible right now. The only thing we can do is to hope that Allegorithmic is really aware of this issue and that they'll change something sooner or later there.
Maybe the Total War Shader is of use for you and your team in its current stage anyway (at least to create procedural base materials for the engine). If you have any questions or problems feel free to let me know in this thread!
A new version of the shader package is online. Both applications, Substance Designer and Substance Painter, are now supported. If you encounter any bugs or other issues, please let me know!
Last edited by Vikus van de Merwe; August 01, 2017 at 08:01 AM.
Hi, I'm pleased to announce that there's an update available to download. In the old shader version, there were many issues which got fixed now and the update includes some completely new, interesting features.
Changelog
FEATURE: the shader is unified in one file now (techniques available via a dropdown menu)
FEATURE: all rendering techniques are completely functional now
FEATURE: height map painting is now supported
FEATURE: switching between an absolute and relative scene light position is now possible
FEATURE: equirectangular environment maps are now supported
FEATURE: reworked shader parameter layout
FIX: dirtmap clamping issues
FIX: removed the ambient texture channel
FIX: UV offset functionality
FIX: color space definitions in the template
Last edited by Vikus van de Merwe; August 23, 2017 at 05:24 AM.
The last update is a long time ago already and here is a new minor one. Its functionality is verified with the newest versions of the Substance software. Check it out!
To make sure that you use the latest shader version in Substance Painter, the shader parameter "Shader Version" should show "v1.3".
The Painter project templates which are shipped in the package as well include the newest shader automatically. If you create a project with one of these templates but manually place the shader in the shelf as well, there might be an "Outdated" tag in the shader settings window. This can be ignored as long as "Shader Version" shows "v1.3".
To avoid any problems (like a messed up order of the shader parameters) it's highly recommended to to remove (or replace) all old shader files and resources.
Changelog
FEATURE: the parameter's "Enable Offset U" type has been changed from Int to Bool (slider to checkbox)
FEATURE: the parameter's "Enable Offset V" type has been changed from Int to Bool (slider to checkbox)
FEATURE: internal code optimizations
Last edited by Vikus van de Merwe; April 09, 2018 at 04:01 PM.
Finally there's a huge new update available which should solve all the major existing problems with the shader. Please note that the new shader for Substance Designer doesn't support older version (before they switched the viewport input color space from sRGB to linear) anymore.
To make sure that you use the latest shader version, the shader parameter "Shader Version" should show "v1.4".
To avoid any problems (like a messed up order of the shader parameters) it's highly recommended to to remove (or replace) all old shader files and resources. In Substance Painter it might help as well to load a vanilla shader first and then reload the newest shader.
Changelog
FEATURE: enabled alpha blending for Substance Designer and Substance Painter
FEATURE: added normal and ambient occlusion channel to Substance Painter
it's now possible to blend the normal texture slot with the normal and height channel
it's now possible to blend the ao texture slot with the ao channel
FEATURE: added support of environment rotation and exposure to Substance Designer and Substance Painter
FEATURE: added version tag to the Substance Designer shader
FEATURE: updated templates for Substance Designer and Substance Painter
FEATURE: removed not used samplers in the code
FEATURE: other internal code optimizations
FIX: shader breaking problems with newer versions of Substance Designer
textures won't show up at all
only solid colors are rendered
mismatching reflection map rendering
odd lightning behavior
FIX: wrong environment calculations in Substance Designer
FIX: corrected color space calculations in Substance Designer and Substance Painter
As I see, shaders not working with new version Painter Vikus, this is possible to make update?
Hey, I'm sorry to hear that. The reason could be that Allegorithmic changed something in the rendering pipeline or the way how custom shaders are integrated into Substance Painter's viewport. Unfortunately I don't really have the resources to commit time for developing an update at the time. However, the Total War Shader for Substance ships the source code and can therefore be altered easily. The key would be to find out what Allegorithmic changed in newer versions of Substance Painter (patch notes should provide this information). It might be a small thing which is not a big deal to update in the Total War Shader for Substance to make it work with newer versions of Substance Painter again.
I had a look into the patch notes and shader API updates and indeed the Total War Shader doesn't work in Substance version 2018.2.0 and later. However, there is a quick fix to make it work with the newest version of the Substance suite again. So here is a hotfix for the Total War Shader which works with Substance 2018.2.0 and later.
Substance Painter uses a Sparse Virtual Texture (SVT) system since version 2018.3.0 for better performance. Depending on how much time I have available I'll switch the Total War Shader to the new SVT system since the old texture handling system is considered deprecated by Allegorithmic and might cause some visual bugs in the viewport.
To avoid any problems (like a messed up order of the shader parameters) it's highly recommended to to remove all old shader files and resources. To make sure that you use the latest shader version, the shader parameter "Shader Version" should show "v1.5".
In this version of the Total War Shader the templates for Substance Painter still use shader version "v1.4" by default. So make sure to load the new version manually which can be found in Substance Painter's shelf if installed correctly.
Changelog
FEATURE: switched the Total War Shader to the OpenGL Core Profile for Substance Designer since Allegorithmic's OpenGL Core Profile update in version 2018.2.0
FIX: Total War Shader is not working in Substance Painter since Allegorithmic's shader API update in version 2018.2.0
Last edited by Vikus van de Merwe; March 22, 2019 at 08:21 AM.
Here is the full-scale update for the Total War Shader. As the hotfixed v1.5 version, this one also works with Substance 2018.2.0 and later.
To avoid any problems (like a messed up order of the shader parameters) it's highly recommended to to remove all old shader files and resources. To make sure that you use the latest shader version, the shader parameter "Shader Version" should show "v1.6".
Changelog
FEATURE: Sparse Virtual Texture (SVT) support for all texture channels in Substance Painter
FEATURE: removed environment map settings in Substance Painter: now directly accessible in "Display Settings"
FEATURE: updated and optimized Substance Painter templates
FIX: height map fix: height details get stronger when zooming out
FIX: rendering technique name "Decal Dirtmap" renamed to "Full Decal Dirtmap" for clarity
FIX: light position range adjusted from [-100, 100] to [-20, 20] in Substance Painter
The Total War Shader seems to work fine with Substance Painter 2019.1.2 though. It seems that the problem is on your side. If you used an older version of Total War Shader before, try to reset the shader to a default one first and then activate version 1.6 again.
I really don't know what's going on with it in that case. I'm on a new computer, Windows 10, all my drivers are up to date (no warning notification from SP upon startup warning me about it), I downloaded + placed the stuff all in the right locations and - since it's a new computer - there's no history of using any of the old versions of the material.
I tried resetting the shader to a default shader and then back to v1.6 again, didn't do anything. I also tried verifying the integrity of SP's files through Steam just incase something integral was missing, didn't do anything either.
Hmmm, weird that the issue still persists. Does Substance Painter write anything into the log if you load a project with the Total War Shader applied? Does it write something into the log if you have a default shader applied and swap it out with the Total War Shader then? If so, please let me know the exact output in the log because it might give some crucial insight into what the issue actually is. Usually Substance Painter's log window can be opened from the bottom icon in the very right toolbar where you can access the shader settings as well.
This is what the log says when I loaded up that model for the first time with the Total War Shader (Full).
[Viewer settings] Viewer settings have been updated from version 13 to version 17.
[Scene 3D] OBJ: unexpected illumination model (0-2 recognized)
[Scene 3D] Skipping one or more lines with the same contents
[Paint Document] The project has been updated from version 46 to version 51.
[Iray Service] Iray settings have been updated from version 0 to version 1.
When I change it to default and back to the TWS shader, nothing new is added to the log.