Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Total War Shader for Substance (v1.6)

  1. #1

    Default Total War Shader for Substance (v1.6)

    Total War Shader for Substance Painter







    Name: Total War Shader
    Shader: PBR Specular Glossiness
    Engine: WarScape (Total War: Attila)
    Appplication: Substance Painter

    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 Painter. All functionalities
    are supported.

    -----| Installation |-----

    1. Go to "Shader" and copy the .glsl file.
    2. Open the the shelf directory of Substance Painter
    (it can have the default file path or a custom one).
    3. Go to "...\shaders" and paste the file there.
    4. Go to "Template" in the shader package and copy the .spt file.
    5. Go to "...\templates" in the shelf directory and paste the file there.
    6. Go to "Resources" in the shader package and copy "Environment_Sharp.png".
    7. Go to "...\environments\Exterior" in the shelf directory and paste the file there.
    8. Go to "Resources" in the shader package and copy "default_decaldirtmap.tga".
    9. Go to "...\textures" in the shelf directory and paste the file there.

    You should now be able to create a new project with the Total War template. You can switch between
    rendering techniques in the dropdown menu in the shader parameter window.

    -----------------------------------------------------------------------------------------------------------

    Total War Shader © Vikus van de Merwe

    This shader was created to be used in the development of "Total War: Rise of Mordor".
    Please check it out: http://www.twcenter.net/forums/forumdisplay.php?2057-Total-War-Rise-of-Mordor-(TW-RoM)
    Texture Slots
    Here's a list of all texture channels which can be utilized by the shader:

    Layout: <texture slot> <texture channel> : <Total War texture (postfix)>

    - CHANNEL Diffuse : _diffuse
    - CHANNEL Glossiness : _gloss
    - CHANNEL Specular level : _level
    - CHANNEL Height : <not used as a unique game texture>
    - CHANNEL Specular : _specular
    - CHANNEL Opacity : <not used as a unique game texture>
    - CHANNEL Mask 1 (user0) : _mask1
    - CHANNEL Mask 2 (user1) : _mask2
    - CHANNEL Mask 3 (user2) : _mask3
    - CHANNEL Decal diffuse (user3) : _diffuse
    - CHANNEL Decal normal (user4) : _normal
    - CHANNEL Decal mask (user5) : <not used as a unique game texture>
    - CHANNEL Decal dirt mask (user6) : _decaldirtmask
    - CHANNEL Dirt mask (user7) : <not used as a unique game texture> ?
    - ADDITIONAL MAP Normal : _normal
    - ADDITIONAL MAP Ambient occlusion : <not used as a unique game texture>
    - SHADER PARAMETER Reflection map : <not used as a unique game texture>
    - SHADER PARAMETER Decal dirtmap : _decaldirtmap
    - SHADER PARAMETER Dirtmap : _dirtmap ?


    Total War Shader for Substance Designer





    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.
    1. Go to "Shader" and copy everything in there.
    2. Open the installation folder of Substance Designer
      (should be "C:\Program Files\Allegorithmic\Substance Designer <version>").
    3. Go to "...\resources\view3d\shaders".
    4. Paste the files from the "Shader" folder there.

    2.
    1. Go back to the Total War Shader Package root.
    2. Copy the .sbs file in "Template".
    3. 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.
    4. Launch Substance Designer.
    5. Go to "Tools" -> "Preferences".
    6. Click on the "Projects" tab on the left side.
    7. Under "Project" scroll down to "Substance Templates".
    8. Click "Add new path" on the right side.
    9. Choose your folder and add it.
    10. 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.

    -----------------------------------------------------------------------------------------------------------

    Total War Shader © Vikus van de Merwe

    This shader was created to be used in the development of "Total War: Rise of Mordor".
    Please check it out: http://www.twcenter.net/forums/forum...ordor-(TW-RoM)
    Last edited by Vikus van de Merwe; March 22, 2019 at 08:22 AM. Reason: Released an update
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  2. #2

    Default Re: Total War Shader for Substance Designer

    You are a hero.

    Will this work with Substance Painter, or only Substance Designer?

  3. #3

    Default Re: Total War Shader for Substance Designer

    Quote Originally Posted by Blick Mang View Post
    You are a hero.

    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!
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  4. #4
    Stealth4Health's Avatar Civis
    Join Date
    May 2014
    Location
    Munich, Germany
    Posts
    170

    Default Re: Total War Shader for Substance Designer

    Again, very great work!

  5. #5

    Default Re: Total War Shader for Substance

    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  6. #6

    Default Re: Total War Shader for Substance (v1.1)

    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  7. #7

    Default Re: Total War Shader for Substance (v1.2)

    Hi, I'm pleased to announce an update for the Substance Painter shader. Check it out!

    Changelog

    • FEATURE: version tag in the shader parameter window
    • FEATURE: opacity map painting is now supported
    • FEATURE: parameter to switch between the diffuse alpha channel and the opacity map
    • FEATURE: five new project templates for different purposes

    To keep the texture definition list complete here's the updated one with the opacity channel included:

    Layout: <texture slot> <texture channel> : <Total War texture (postfix)>

    - CHANNEL Diffuse : _diffuse
    - CHANNEL Glossiness : _gloss
    - CHANNEL Specular level : _level
    - CHANNEL Height : <not used as a unique game texture>
    - CHANNEL Specular : _specular
    - CHANNEL Opacity : <not used as a unique game texture>
    - CHANNEL Mask 1 (user0) : _mask1
    - CHANNEL Mask 2 (user1) : _mask2
    - CHANNEL Mask 3 (user2) : _mask3
    - CHANNEL Decal diffuse (user3) : _diffuse
    - CHANNEL Decal normal (user4) : _normal
    - CHANNEL Decal mask (user5) : <not used as a unique game texture>
    - CHANNEL Decal dirt mask (user6) : _decaldirtmask
    - CHANNEL Dirt mask (user7) : <not used as a unique game texture> ?
    - ADDITIONAL MAP Normal : _normal
    - ADDITIONAL MAP Ambient occlusion : <not used as a unique game texture>
    - SHADER PARAMETER Reflection map : <not used as a unique game texture>
    - SHADER PARAMETER Decal dirtmap : _decaldirtmap
    - SHADER PARAMETER Dirtmap : _dirtmap ?
    Last edited by Vikus van de Merwe; April 01, 2018 at 05:42 AM.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  8. #8

    Default Re: Total War Shader for Substance (v1.3)

    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  9. #9

    Default Re: Total War Shader for Substance (v1.4)

    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

    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  10. #10
    Rewinged's Avatar Civis
    Join Date
    Nov 2006
    Location
    Australia
    Posts
    146

    Default Re: Total War Shader for Substance (v1.4)

    Thanks a bunch for this, it's truly amazing work and makes texturing a breeze



  11. #11

    Default Re: Total War Shader for Substance (v1.4)

    I have a problem with the shader for Painter: there is no lighting and everything appears black no matter what I do. Please help


  12. #12

    Default Re: Total War Shader for Substance (v1.4)

    As I see, shaders not working with new version Painter Vikus, this is possible to make update?

  13. #13

    Default Re: Total War Shader for Substance (v1.4)

    Quote Originally Posted by Sara Temer View Post
    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  14. #14

    Default Re: Total War Shader for Substance (v1.5)

    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  15. #15

    Default Re: Total War Shader for Substance (v1.6)

    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

    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  16. #16
    Benjin's Avatar Artifex
    Join Date
    May 2015
    Location
    London, UK
    Posts
    377

    Default Re: Total War Shader for Substance (v1.6)

    Suffering the same problem as others were last time with SP2019.1.2 - they must have changed the rendering method again?

    Last edited by Benjin; June 17, 2019 at 11:40 AM.
    3D ARTIST (MODELS/TEXTURES), ANIMATOR, RIGGER

  17. #17

    Default Re: Total War Shader for Substance (v1.6)

    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.

    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  18. #18
    Benjin's Avatar Artifex
    Join Date
    May 2015
    Location
    London, UK
    Posts
    377

    Default Re: Total War Shader for Substance (v1.6)

    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.
    Last edited by Benjin; June 29, 2019 at 10:23 AM.
    3D ARTIST (MODELS/TEXTURES), ANIMATOR, RIGGER

  19. #19

    Default Re: Total War Shader for Substance (v1.6)

    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.
    ------------- under the patronage of wangrin --------------

    ~~~~~~~ Total War: Rise of Mordor at ModDB ~~~~~~~

  20. #20
    Benjin's Avatar Artifex
    Join Date
    May 2015
    Location
    London, UK
    Posts
    377

    Default Re: Total War Shader for Substance (v1.6)

    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.
    3D ARTIST (MODELS/TEXTURES), ANIMATOR, RIGGER

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •