Announcement

Collapse
No announcement yet.

Toon shading model

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by wuyukang View Post
    How do you integrate this into the engine, I want this also into the engine
    https://forums.unrealengine.com/show...for-characters
    Basically the process is that you cherry-pick the commits from the pull request, and fixing any errors when compiling. It's not hard but takeing time.
    | twitter | github | #ue4tip

    Comment


      4.14 port ? It released today.

      Comment


        Originally posted by Nate View Post
        Basically the process is that you cherry-pick the commits from the pull request, and fixing any errors when compiling. It's not hard but takeing time.
        Is there any possibility of you porting the toon shader model to 4.14?

        Comment


          Originally posted by Bryciekai View Post
          Is there any possibility of you porting the toon shader model to 4.14?
          I will port it to 4.14 in next 1 or 2 weeks. (If it's not already been ported by someone else by then)
          | twitter | github | #ue4tip

          Comment


            Hello Arnage (maybe is my question for Nate...)

            I'm not a C++ guy at all. But I did try to install your shader anyway because it seams so good !
            I pass a lot of time on understanding how to do this.
            I think some other potential users will need a mini guide, even if I get stuck near the end of the process, I have no doubt : Together, we'll figure it out .

            I'm trying to install and compile the editor with your code. Here's what I've did so far :

            - Create an account on GitHub
            - link my GitHub account with my unreal one (https://docs.unrealengine.com/latest...gUnrealEngine/), the free license is enough
            - Download the github project here : https://github.com/marynate/UnrealEngine/tree/4.12-toon (I work with UE 4.12)
            - I uncompressed the Zip file
            - double click on "setup.bat"
            - wait few hours while the batch file download all missing dependencies
            - Accept the admin request from win 8.1 64 bit to finish the install of the dependencies
            - double click on "GenerateProjectFiles.bat"
            - double click on "UE4.sln", a newly created file

            VS2015 open itself with the UE4 project loaded.

            Then I follow this guide : https://docs.unrealengine.com/latest...gUnrealEngine/ :

            - I've no problem to build UE4 from the sources I've downloaded.
            - But then I try to launch the editor (Debug -> Start new instance), I've got a message saying :
            These projets are out of date :
            ShaderCompileWorker - Development_Program x64
            UE4 - Development_Editor x64

            Would you like to build them
            - I click on yes, it compile a bit again and launch the editor.
            1>------ Build started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
            1> Target is up to date
            2>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
            2> Target is up to date
            - after this operation, I see the spash screen of EU editor (still at 0%)
            - UE4 triggers a breakpoint (I continue anyway...), 2 times and crash.

            In the log, I can see a lot of different lines with this kind of things (with different dll file) :
            'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\nvwgf2umx.dll'. Cannot find or open the PDB file.
            I work with a win 8.1 64bit machine and verify the settings twice. I compile for 64bit.
            I don't know what's a PDB file but these are not fatal errors.
            Here's the real problem :
            IGIWHW Game e:\epic games\4.12-toon\engine\intermediate\projectfiles\..\..\binaries\win64\ue4editor.exe found in whitelist: NO[2016.12.01-05.14.17:154][ 0]LogD3D11RHI: GPU Timing Frequency: 1000.000000 (Debug: 2 2)
            [2016.12.01-05.14.17:154][ 0]LogShaderCompilers: Guid format shader working directory is 32 characters bigger than the processId version (../../../Engine/Intermediate/Shaders/WorkingDirectory/11804/).
            [2016.12.01-05.14.17:154][ 0]LogShaderCompilers: Cleaned the shader compiler working directory 'C:/Users/florent/AppData/Local/Temp/UnrealShaderWorkingDir/60329B47415621B9B7E6D8906CEF84E7/'.
            [2016.12.01-05.14.17:154][ 0]LogShaderCompilersisplay: Using Local Shader Compiler.
            Fatal error: [File:E:\Epic Games\4.12-toon\Engine\Source\Runtime\ShaderCore\Private\ShaderCore.cpp] [Line: 367]
            Couldn't load shader file 'ToonShading.usf'
            UE4Editor.exe has triggered a breakpoint.

            UE4Editor.exe has triggered a breakpoint.

            [2016.12.01-05.14.28:236][ 0]LogWindows: Windows GetLastError: L’opération a réussi. (0)
            [2016.12.01-05.14.28:236][ 0]LogWindows:Error: === Critical error: ===
            Fatal error: [File:E:\Epic Games\4.12-toon\Engine\Source\Runtime\ShaderCore\Private\ShaderCore.cpp] [Line: 367]
            Couldn't load shader file 'ToonShading.usf'
            (the full log is in attachment to this post )

            What did I miss ?
            You can talk to me like as you'll do with a child, I'm such a noob here
            Attached Files
            Last edited by JoGoiA; 12-01-2016, 01:42 AM.
            Sauvage's twitter - #freeNeoFur

            Comment


              [MENTION=498587]JoGoiA[/MENTION],
              It seems I forgot to checkin "ToonShading.usf" in my 4.12-toon branch. You can get it from 4.13-toon branch: https://github.com/marynate/UnrealEn...oonShading.usf, save it into your Engine/Shaders folder of 4.12 source tree, then run the editor (no rebuild needed).
              | twitter | github | #ue4tip

              Comment


                Nice! One of the conceptions I believe needs to change a bit in Unreal users is that it is "so easy" to get a nice realistic looking that most games in Unreal end up looking kinda similar. And that's really bad, especially for indies. Of course that the tools already allow us to do basically everything we want to, but most people get too comfortable in what's just out of the box. We need more solutions like this widely available! Congratz and thanks for sharing =)

                Comment


                  [MENTION=702]Nate[/MENTION]
                  Thanks a lot ! I put the ToonShading.usf file you link in the "engine/shader" folder.
                  From now, I can resume my "narrative playthrought" :

                  - ... launch the editor (Debug -> Start new instance)
                  - the splash screen of the editor is showing.
                  - at 45 %, it's stuck for a looong time while it compile all the shaders (I imagine it's normal and happens only the first time I launch the new version of the editor).
                  - at 95 %, UE4 triggers a breakpoint (I continue anyway...), 2 times and crash.

                  here's the new errors :
                  [2016.12.01-23.34.37:627][ 0]LogShaderCompilers:Warning: 40 Shader compiler errors compiling global shaders for platform PCD3D_SM5:
                  Engine/Shaders/ToonShading.usf(111): Shader FTiledDeferredLightingCS1, VF None:
                  error: Unterminated character constant '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/marynate/UnrealEngine/search" class="js-site-search-form" data-scoped-search-url="/marynate/UnrealEngine/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>, skipped the line
                  <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/marynate/UnrealEngine/search" class="js-site-search-form" data-scoped-search-url="/marynate/UnrealEngine/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
                  from ../../../Engine/Shaders/DeferredLightingCommon.usf: 16: #include "ToonShading.usf"
                  from ../../../Engine/Shaders/TiledDeferredLightShaders.usf: 9: #include "DeferredLightingCommon.usf"

                  ...
                  40 times with some differences
                  ...

                  ...
                  Fatal error: [File:E:\Epic Games\4.12-toon\Engine\Source\Runtime\Engine\Private\GlobalShader.cpp] [Line: 957]
                  Failed to compile global shader FTiledDeferredLightingCS1 . Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
                  UE4Editor.exe has triggered a breakpoint.

                  UE4Editor.exe has triggered a breakpoint.

                  [2016.12.01-23.34.45:000][ 0]LogWindows: Windows GetLastError: L’opération a réussi. (0)
                  [2016.12.01-23.34.45:000][ 0]LogWindows:Error: === Critical error: ===
                  Fatal error: [File:E:\Epic Games\4.12-toon\Engine\Source\Runtime\Engine\Private\GlobalShader.cpp] [Line: 957]
                  Failed to compile global shader FTiledDeferredLightingCS1 . Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
                  (Full log in attachments).

                  - I found the ConsoleVariables.ini and uncomment the line : r.ShaderDevelopmentMode=1, as suggest by the log.
                  - Now, when the editor is loading, at 95 %, a big windows named "error" opens with the same 40 shader compiler errors.
                  - In that case, UE4 editor doesn't crash but get stuck at 95 %. The only one process consuming processor resource is something called "ScriptedSandbox64.exe"
                  Attached Files
                  Sauvage's twitter - #freeNeoFur

                  Comment


                    [MENTION=498587]JoGoiA[/MENTION], it seems the "ToonShading.usf" you downloaded is bad. (when download file from github, make sure click "Raw" button first, then save as...)
                    I attached the "ToonShading.usf" here, extract it into Engine/Shaders folder.

                    btw, enabling 'r.ShaderDevelopmentMode' will increase shader compile time, it's best to leave it commented.

                    ToonShading.zip
                    | twitter | github | #ue4tip

                    Comment


                      Yes !
                      You did it, [MENTION=702]Nate[/MENTION] !
                      Thanks a lot for your devoted help
                      It's time for me to annoy you again with another problem ^^.
                      (it's certainly off topic, do not hesitate to kick me from this post)

                      I create a copy of my project and try to open it but...
                      I use 2 plugins (Wwise and Neofur) and they are incompatible with my new UE 4.12 editor.

                      Is there something to do about that or am I screwed ?
                      I can't work without them...

                      I think that's just a version check problem because these 2 plugins aren't affect by the changes made by the toon shader (I imagine, maybe Neofur is...)
                      Last edited by JoGoiA; 12-02-2016, 01:07 AM.
                      Sauvage's twitter - #freeNeoFur

                      Comment


                        [MENTION=498587]JoGoiA[/MENTION], glad to help

                        There's 2 kind of UE editor. One you downloaded from Launcher : Pre-build; One you build from github source: Custom-build.

                        Usually code plugin is compiled against Pre-build editor (e.g. marketplace plugins), and wont works out of box in Source-build editor. For code plugin works in Souce-build editor, you need to build it yourself (assuming those plugins do come with source).

                        To build code plugin with github source, you need to place those plugin either into Engine\Plugins folder or YOUR_PROJECT\Plugins folder, then rebuild the Engine or Project.
                        | twitter | github | #ue4tip

                        Comment


                          Got it ^^
                          I've got access to Wwise sources but neofur sources are a bit expensive for us...
                          We need to think and make a choice

                          Anyway ! Thanks for your help Nate and for your shader, Arnage.
                          Sauvage's twitter - #freeNeoFur

                          Comment


                            Originally posted by Nate View Post
                            I will port it to 4.14 in next 1 or 2 weeks. (If it's not already been ported by someone else by then)
                            Will you port it within the next few days? Doesn't seem to be anyone else who will port it.

                            Comment


                              [MENTION=223334]shahrizai[/MENTION], will do this week. poke me if i forget :0)
                              | twitter | github | #ue4tip

                              Comment


                                [MENTION=702]Nate[/MENTION]

                                I tried to port it myself yesterday but I think they changed up some things after adding forward shading in 4.14.

                                I get an error:

                                Code:
                                Failed to compile global shader FTiledDeferredLightingCS1 Line 986 in GlobalShader.cpp

                                Which is this piece of code:

                                Code:
                                UE_LOG(LogShaders, Fatal, TEXT("Failed to compile global shader %s %s %s.  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries."),
                                			GlobalShaderType->GetName(),
                                			Pipeline ? TEXT("for pipeline") : TEXT(""),
                                			Pipeline ? Pipeline->GetName() : TEXT(""));

                                Comment

                                Working...
                                X