Announcement

Collapse
No announcement yet.

Toon shading model

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

    Anyone managed to port to 4.14?

    Comment


      How has this not been pulled yet? It has been mentioned on the stream at least 2 times and it seems to be a very nice addition with virtually no downsides.

      Is there anything we can do to help make this happen? or is there another problem? (them having problems implementing it because of some bug or something like that)

      Comment


        4.14 port: https://github.com/marynate/UnrealEngine/tree/4.14-toon
        | twitter | github | #ue4tip

        Comment


          Thanks Nate, you're the best!

          Btw, does Epic write any patch notes about changes to shading models? I noticed that some stuff have been moved around to other files and some parts of the shading models needs new types of definitions like the:

          Code:
          Add(FGuid(0xD3C17C26, 0x0B4F4B9F, 0x9DECBAA3, 0x0EF88128), TEXT("ToonStepSize"),		MP_CustomData2, MCT_Float1, FVector4(.1,0,0,0), SF_Pixel);
          I'm trying to learn how to be able to port the shading model to new versions myself, but Epic keeps changing the way shading models are built, so it gets confusing to find all the changes.

          Any insight would be appreciated

          Comment


            Is the plugin system still too limited to make this as a plugin?

            Comment


              Hi all!
              I tried to make a toon shading model as in this tutorial. http://blog.felixkate.net/2016/05/22...ading-model-1/
              But changes in .usf files in the new versions of the engine is too large.

              So I found this topic and tried to explore toon shader in https://github.com/marynate/UnrealEngine/tree/4.14-toon

              It really works great. But I would like to get adjust the tone color of the shadow.
              My knowledge is not enough to carry out it myself.

              and it would be good to be able to adjust the size of the flare separated from reflections on the material environment.
              http://i.imgur.com/JfCJHqw.gif

              and if somebody know - why Epic Games officially will not add any model toon shading?
              Attached Files
              Last edited by Sn_a_ke; 12-20-2016, 11:26 AM.

              Comment


                How to disable reflections?
                http://image.prntscr.com/image/45d5e...f9c954a43.jpeg

                Comment


                  Originally posted by Sn_a_ke View Post
                  Set Roughness to 1?

                  Comment


                    I'm trying to find the piece of code that is responsible for the reflection of the environment in toon shading model, in order to disable them for this shading model.
                    Setting Roughness to 1 will certainly help, but at the same time it will increase the size of the highlight.

                    Comment


                      Originally posted by Sn_a_ke View Post
                      I'm trying to find the piece of code that is responsible for the reflection of the environment in toon shading model, in order to disable them for this shading model.
                      Setting Roughness to 1 will certainly help, but at the same time it will increase the size of the highlight.
                      True, hmmm.

                      Comment


                        Can somebody explain to call shading architecture model? To be able to keep track of the sequence of code execution.

                        ShadingModels.usf - ToonShading function, where it is called? I also tried to change it but it does not affect the reflection of the environment.

                        DeferredLightingCommon.usf - GetDynamicLighting, I suppose that at this stage are mixed data with reflections, but still I can not figure out where exactly. It's a bit difficult for me, I'm still newbie to this, can anyone give a hint?

                        Comment


                          It was easier to make the highlight independent of roughness, than to seek where are mixed reflection.

                          Comment


                            Originally posted by Sn_a_ke View Post
                            It was easier to make the highlight independent of roughness, than to seek where are mixed reflection.
                            ReflectionEnvironmentShaders.usf void ReflectionApplyPS()

                            but that's not all, when added to the scene Reflection Capture Actor reflections appear again ...
                            http://image.prntscr.com/image/60823...6cd76d29e.jpeg
                            http://image.prntscr.com/image/ec140...0cab12f76.jpeg
                            which are located

                            ReflectionEnvironmentComputeShaders.usf void ReflectionEnvironmentTiledDeferredMain()

                            but even then, reflection still in previews of the material in the material editor
                            http://image.prntscr.com/image/73ccd...6180eaf96.jpeg
                            Last edited by Sn_a_ke; 01-02-2017, 01:02 PM.

                            Comment


                              I'm trying to click on the link but it's not working? I've entered my Github Username under my account settings and I still get the 404 error. Any help would be appreciated.

                              Comment


                                This thread was a good starting point for creating my own shading model.

                                But additional float3 GBuffer.CustomData.rgb not enough to adjust my shader.
                                Any way to transfer more data?

                                is possible still use GBuffer.CustomData.w
                                only need to add a pin in the material for it. I tried but did not compile shaders, I probably somewhere made a mistake. Pretty hard to monitor communications between the large number of files, it does not always accurately understand the code is responsible for what.
                                Can anyone suggest or how to do it? Add new not previously used the pin in the material?

                                one more question:
                                in
                                MaterialShared.cpp
                                void FMaterialAttributeDefinitionMap::InitializeAttributeMap()
                                Add(FGuid(0xD3C17C26, 0x0B4F4B9F, 0x9DECBAA3, 0x0EF88128), TEXT("ToonStepSize"),MP_CustomData2, MCT_Float1, FVector4(.1, 0, 0, 0), SF_Pixel);

                                what is FGuid? and what values you need for the new attribute?

                                PS:I seem to get hooked extra pin and use GBuffer.CustomData.w,
                                is there any reason why an additional parameter was not used in the "github toon shader",even if it is not used?
                                After GBuffer size does not change simply connect the unused channel, and the more customizable options the better? Or I'm wrong?

                                And the question remains open with FGuid.
                                Last edited by Sn_a_ke; 02-04-2017, 08:33 AM.

                                Comment

                                Working...
                                X