Search Unity

RealToon (An AAA Toon/Anime Shader and Stylized)

Discussion in 'Assets and Asset Store' started by MJQStudioWorks, Jun 30, 2016.

  1. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi everyone, to those who updated to RealToon 5.0.8p5 and to those new users whose RealToon version is 5.0.8p5.

    I suggest to re-update your RealToon, this is because the Screen Space Outline button, DOTS button and Remove Outline button are not working.

    Just go to Package Manager, RealToon then click Update.
     
    glykom likes this.
  2. Nimzo93

    Nimzo93

    Joined:
    Jun 4, 2016
    Posts:
    4
    Hi, I'm using RealToon with the built-in renderer. So far, RealToon is my favorite out of the popular toon shading assets due to its flexibility and quality.

    I do have a problem though, when using outlines, they tend to shimmer as you change the viewing distance of the camera from the model. Is there any work around related to this?

    Using 'outline width affected by view distance' does help to some extent, but there is still noticeable shimmering at certain distances. I'm thinking that this has to do with depth testing? Can some blurring happen at these distances?
     
  3. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi Nimzo93, thank you for using RealToon. :)

    Can you provide a screenshot or video?
    Send it by email support for a better long convo.

     
  4. shuskry

    shuskry

    Joined:
    Oct 10, 2015
    Posts:
    462
    Hi ! @MJQStudioWorks

    I'm trying to optimize my game for mobile with you shader and now i'm trying to bake Lightmap .
    I enabled in the shader option the option "Optimize for light mode : Baked".

    Is it possible to have better result and have a more cartoonish style like with realtime light ?

    Here a screenshot with realtime , and a other with baked light



    And here my lightmap settings:


    And thanks for your help ! I really love the style of your shader !

    Have a good day :)


    Edit: In the same time, Is possible to optimize more your shader ? I was thinking to read it and see if I can optimize it , but I prefer ask you before if you have done the maximum on it ? Or I can do more? ( I don't know about shader so it's why i'm asking before I begin a new travel with the unknow ^^')
    I'm only using it with features : "Self shadow" and "ShadowT" without trensparency and culling off
     
    Last edited: May 19, 2022
  5. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi shuskry, thank you for using RealToon,
    And no problem :)

    About lightmap:
    The function of "Optimize for light mode : Baked" is to remove or disable all realtime features on the shader, means it is all baked.

    Unfortunately, the lightmap on the RealToon URP shader is using the Unity lightmap, the baked shadow and shade can't be flat/cel shade look and can't be colored.

    If you want both "RealTime and Baked" to be visible and used, set your light source to "Mixed".

    Be sure to set all non movable objects to static.

    *Take note that RealToon uses pixel light, not vertex light.
    *Disable "Blit" on the Player Settings, this can improve performance.
    *Less materials equals more performance on mobile.

     
    shuskry likes this.
  6. shuskry

    shuskry

    Joined:
    Oct 10, 2015
    Posts:
    462
    Thanks for your anwser ! I didn't know for the "blit" option , so thanks !

    Can I remove part of the shader Script to create a more optimized variant? To remove non use fonction ? Or it's loosing time ?

    Have a good day :)
     
  7. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    *Sorry for the late reply.
    No problem :)

    Most of the feature on the shader uses shader_feature keywords,
    If a feature is not enable or not use, it will strip out on the final build.

    You can modify the shader for your needs like removing some parts, add or anything.
    Do it for your personal needs.

     
    shuskry likes this.
  8. shuskry

    shuskry

    Joined:
    Oct 10, 2015
    Posts:
    462
    ok perfect !
    Thanks for your time
     
    MJQStudioWorks likes this.
  9. bc25252

    bc25252

    Joined:
    May 28, 2017
    Posts:
    13
    I am sorry for bothering you with this again, but when can we expect texture overlays? For URP... you said next major update, but when's the ETA for that? Summer 2022 or End of 2022? Thank you and I am sorry again for bothering you with this question again.
     
  10. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Hello! I just purchased RealToon and its very well suited for us so far.

    I was wondering if you have support, or will add support for being able to see characters through geometry, either as an outline or silhouette?

    Is this something that can be done already? If not, is it something you would consider adding?

    Also, any chance of adding in a Stipple / Dither Fade option?
     
  11. shuskry

    shuskry

    Joined:
    Oct 10, 2015
    Posts:
    462
    Hi :)

    I back for a other question.
    I don't know why but when I'm using your shader with a texture, it's very pixelated on IOS...
    I try with a normal material , and the bug appear only with your shader :/...
    It's appear great on Unity editor , but when I build , this is here the problem

    Here with the toon shader material:


    And here with a basic new unity material created:




    On the down image, the texture are smooth like I want...
    But on the top image with your shader it's pixelated :/...

    Thanks for your time!
     
  12. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi shuskry, thank you for reporting this one.
    It seems it only occurs on IOS and it might be the Mipmap.

     
  13. shuskry

    shuskry

    Joined:
    Oct 10, 2015
    Posts:
    462
    I tried with enable/disable Mipmap but nothing change :/

    I have a other problem , When I use outline, I can see it on editor view, but when i'm clicking on Play in unity, outline are not visible :/ , also in build :/
    (After multiple test , it's like if in the editor, the width of the outline are so much larger than when I click on play , enought to not see it on the first look)
    I'm using the "De nor sob outline" renderer feature , without enabling outline on the material

    Editor on left, play mode on right


    On ios build I have the same result to the Play build mode on Unity

    If I raise the width to have more outline on Build, for example 3 , Outline are showing only for big object ...

    Here the result:

    How Can I have the result from the Editor view ?



    I saw people talking about a major update ? Do you have any estimation of the release ?

    Edit: If it's can be usefull for debug, i'm using a Iphone 11 pro max and unity 2021.3
     
    Last edited: May 29, 2022
  14. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi thanks for the updates.

    About the texture, it seems there might be something that need to do on the shader code for IOS.

    About the "DeNorSob Outline", the screen resolution will affect the thickness of the outline.
    The higher the resolution the thinner the outline, the lower the resolution the thicker the outline.
    "DeNorSob Outline" is an edge detection type of outline with a combination of sobel.

    About major updates, no release date yet or something.

     
  15. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi sorry for the late reply.
    About the major update, no release date or ETA sorry about that.

     
  16. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I am trying to convert my project from the built-in render pipeline to HDRP withg 2022.1f1 and RealToon 5.0.8p5 using VRoid Studio characters. A common problem with VRoid characters is the skin pokes through the clothes at times, especially around the armpits.

    upload_2022-6-2_0-49-9.png

    The normal way I used to solve this was to erase the skin under the clothes, so the skin was not visible even if it poked through - you would just see the clothes.

    The problem I am having however is if I make the skin "transparent" (click the transparency checkbox), and update the bitmap for the skin to remove that section near the armpits, you can now see right through the character instead of seeing the character's shirt.

    upload_2022-6-2_0-52-26.png

    I have tried fiddling with (Transparency) Blend - Source/Destination, but could not find a combination that would work. The skin sticking through the clothes, when marked as transparent and erased, is not showing the shirt underneath - you can see right through the character. (I did not erase any part of the shirt.)

    Is there a solution to this problem with HDRP?
     
    Last edited: Jun 2, 2022
  17. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Okay, I won't pretend to understand why, but if I set "Culling: Off" and enable "Cutout" mode for the clothes layer with a Cutout value of 0.6 and Alpha Based Cutout turned on, then the transparent gaps in the clothes disappear....

    ... usually. Ugg, but not always! Many characters I cannot specify a Cutout value where the clothes appear everywhere except transparency - the clothes either go fully transparent, or no transparency (but the transparent areas show the contents of the game window camera!!! Very weird effect!) I guess there is a reason for "beta" on the HDRP shader version! ;-)

    For example, the artwork has transparency for lower half of character (only the green top should be visible - the chest and legs should be transparent showing the trousers/body underneath.
    upload_2022-6-2_21-34-33.png

    Oh, closer to what it should look like for reference (except with problems of see through holes in armpits due to skin layer in front of clothes layer) - you can see the pants correctly with cutoff mode turned off - but you can see through the character at times too, which is bad.
    upload_2022-6-2_21-43-14.png
     
    Last edited: Jun 3, 2022
  18. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, sorry for the late reply.
    If you are using RealToon HDRP - Cutout feature , I recommend you to change the rendering of your HDRP project settings to Forward.
    In your case, use Transparency for semi-transparent.
    If you just want to cutout something using its alpha channel, just use Cutout feature.

     
    akent99 likes this.
  19. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Thank you! That made a huge improvement!
     
    MJQStudioWorks likes this.
  20. MihaiVladan

    MihaiVladan

    Joined:
    Dec 17, 2013
    Posts:
    6
    Hi there, does anyone know why this is happening? The outline is rendered incorrectly on Unity - Apple silicon (M1 Max). It was working fine on my Intel / AMD - Macbook pro. Here is how this glitch looks. I also have the same issue with Unity Toon Shader ( I've made a post here about it)


    I'm using Unity 2021.3 (LTS Apple silicon) - Built-In rendering pipeline - Real Toon 5.0.8p4


     
    Last edited: Jun 7, 2022
  21. bc25252

    bc25252

    Joined:
    May 28, 2017
    Posts:
    13
    Hey! Did you figure it out? I am really curious about this bug since it could be an effect that I would like to use. Thanks.
     
    MihaiVladan likes this.
  22. MihaiVladan

    MihaiVladan

    Joined:
    Dec 17, 2013
    Posts:
    6
    Nop, fiddled around with the settings without success. And i cant find anyone else posting about it on the apple silicon section .. or answering my other post.
     
  23. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, sorry for the late reply.
    This needs to be address or report to unity.

     
  24. SgtZdog

    SgtZdog

    Joined:
    Aug 27, 2016
    Posts:
    33
    I could use a touch of help. I've got a collection of objects in the scene with some of these materials applied. However, setting their color doesn't appear to be having any effect. Excerpt below:

    Code (CSharp):
    1. public void SetColor(Color color)
    2. {
    3.     plugMesh.material.color = color;
    4.     capMesh.material.color = color;
    5.     corrodedMaterial.color = color;
    6. }
    To clarify, the color property when inspected in the IDE debugger is correct, but in the scen and unity inspector the primary color is still white.
    upload_2022-6-13_19-12-43.png
     
  25. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, thank you for using realtoon shader.
    You do need to access the shader property on the shader.

    The property is "_MainColor".

    See this unity c# api
    https://docs.unity3d.com/ScriptReference/Material.SetColor.html

    **RealToon uses custom name property "Main Color"
    That is why the code you did, did not work.


     
  26. rusturch1

    rusturch1

    Joined:
    Sep 3, 2014
    Posts:
    8
    Hi. Thanks for the cool tool. I have a question, is there a solution how to make a mask for the Rim Light and so that the Rim Light is not displayed in the place where there is a shadow or make it work only from the side of the light source, as in the Genshin Impact? I have Rim Light appears where it is not necessary:) Thank you:)

    1.png 2.png 3.png
     
  27. SgtZdog

    SgtZdog

    Joined:
    Aug 27, 2016
    Posts:
    33
    Hmm, that's still not working for me. I can set that Main Color in the inspector and see the change. When I do
    plugMesh.material.SetColor("Main Color", color);
    I can see the new value if I run GetColor("Main Color"), but don't see the change in the game. Is there a constant defining the propertyID (int value) so I can try that overload of the method? Here's a slightly larger code excerpt if that helps:
    Code (CSharp):
    1. [SerializeField] private Material plugMaterial;
    2.  
    3. private void Awake()
    4.     {
    5.         plugMesh.material = plugMaterial;
    6.     }
    7.  
    8. public void SetColor(Color color)
    9.     {
    10.         plugMesh.material.SetColor("Main Color", color);
    11.     }
    (I'll note I'm not getting any exceptions or other debug messages during this either.)
     
  28. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Not "Main Color".
    It should be "_MainColor".

     
  29. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, as default, rim light will only visible or shine on the light area.

     
  30. rusturch1

    rusturch1

    Joined:
    Sep 3, 2014
    Posts:
    8
    But my Rim Light always works in the shadow. And is there a way to use a mask?
    RimLight.gif
     
  31. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi thanks for the update.
    Did you adjust the shadow intensity option on the realtoon shader?

     
  32. rusturch1

    rusturch1

    Joined:
    Sep 3, 2014
    Posts:
    8
    I realized that I need to increase the shadow intensity and brighten the Overall shadow color. Thank you.
    And consider adding a rim light mask)
     
    MJQStudioWorks likes this.
  33. SgtZdog

    SgtZdog

    Joined:
    Aug 27, 2016
    Posts:
    33
    Ah! Thank you. I should have realized that. It's working now.
     
    MJQStudioWorks likes this.
  34. ShinHyungJong

    ShinHyungJong

    Joined:
    Mar 29, 2022
    Posts:
    1
    hello @MJQStudioWorks i have a question.
    I don't know why this is a failed to compile on the build setting android.
    RealToon cannot be found in "material - shader - universal render pipeline/...", and universal render pipeline/realToon can be found in "failed to file".
    The problem cannot be found in IOS.
    My urp version is 12.1.6 version and real toon is 5.0.8 p5. Please tell me the cause.

    + this error, too.
    Shader error in 'Universal Render Pipeline/RealToon/Version 5/Default/Default': Program 'LitPassFragment', error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Incompatible min precision type for operand #3 of opcode #113 (counts are 1-based). Expected int or uint. at line 554
     
    Last edited: Jun 28, 2022
  35. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, it should work properly on Android, be sure the "RealToon" folder is in the root "Asset" folder.

    About the error, it only occurs on Apple Metal graphics.
    I'm still troubleshooting this problem by the help of some RealToon users who uses Metal.

     
  36. TylkoDemon

    TylkoDemon

    Joined:
    Feb 28, 2013
    Posts:
    6
    Hi.

    I have some problems with using De Nor Sob Outline and Sobel Outline post-process in HDRP. It just does not work in standalone (it works fine inside editor tho). The scripting I've used to test it was mono with no stripping applied. You can easily repro this by making empty project and then import HDRP (12.1.7) with unity 2021.3.4f1.
    There was completely nothing in logs so I really do not know what might be wrong.
    Version of the RealToon was 5.0.8p5 (with is the latest).
    The same thing happened on older version of unity (2021.1-2) and older versions of realtoon.

    (I've attached two images even if it's really obvious how not working post-process on empty scene with single cube looks like :p)
     

    Attached Files:

  37. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi sorry for the late reply.
    For it to show on build, you need to "Always Include" the DeNorSob Outline Shader.
    See the documentation/user guide pdf on how to set it.

     
    TylkoDemon likes this.
  38. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Is there any clever way to do tears on the face (ideally running down the cheek) with the RealToon shader (for HDRP specifically). I assume I can put another mesh in front of the face skin and treat it like glass (I can find rain shaders for glass), but it seems like a fair bit of work. E.g. all the blendshapes for the face would need to be extended to also warp the additional mesh. Just wondering if there were any other clever features of the RealToon shader that might help...
     
  39. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi there are alot of ways to do that but some of it are need some work.

    You can try to use Unity HDRP VFX/Particle system and apply the shader by material format.

     
  40. lolimilk

    lolimilk

    Joined:
    Dec 17, 2018
    Posts:
    15
    hi, I want change URP rendering from forward rendering to deferred rendering.
    Is there any way to support deferred rendering
     
  41. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi thank you for using RealToon,
    About deferred rendering, i'm planning to add that if possible, currently i'm still doing some experiement or testing about it.

    Currently only RealToon HDRP support that.

    Note:
    Soon, Unity will add Forward+ Rendering.

     
  42. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Thanks for all the previous answers. Another one sorry. I am doing a tracking virtual camera close up face shot of a character using RealToon HDRP (Unity 2022.1f1, RealToon 5.0.8 Beta). I am getting some flicker. Experimenting with settings, it appears to be related to the hardness of the shadow. If set Shadow Hardness to zero, the face skin flickers (see start of video below). If set to 1, the face skin stops flickering but the hair flickers instead (second part of video). If the character does not walk, there is no flickering. So I assume its noise or similar sneaking in? The character's head is probably twisting side to side a little with the walk animation.

    But I am kind of stuck - I cannot work out settings to use that does not result in flicker. Any suggestions appreciated. Pre HDRP I did not have this problem. Note: I am still learning all the HDRP and lighting settings. Thanks!

    https://youtube.com/shorts/GIpA5pAtuTo

    upload_2022-7-4_22-35-25.png
     
  43. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi sorry for the late reply,
    You can increase the shadow resolution more than 4k,
    Try change the light shadow resolution/quality to Custom and then change it to 8k or even 16k.

    Before you can change it to more thatn 4k, you do need to increase the Shadow Atlas and Shadow Max Resolution to 16k
    you can set it on the HDRP project current settings or quality.
    Increasing the shadow resolution will remove or prevent flickering, try also adjust the filtering.

     
    akent99 likes this.
  44. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Hello @MJQStudioWorks
    I've read your respond about Cutout and HDRP, you told user to use Forward.
    But if I want to use deferred only, can this bug get fixed for deferred ?
    Bug : the cutout part does not reveal the mesh underneath correctly.
    Unity 2022.1.9f1, HDRP 13.1.8
    upload_2022-7-16_23-17-46.png
     
  45. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi Spikebor, yes currently to get a 100% correct cutout, use the Forward Renderer.

    *I'm still troubleshooting the the cutout problem on deferred rendering.
    The cause of this is the GBuffer not correctly cutting it.

    *It will work fine sometimes like there is something at the back, sometimes if there is nothing at the back.

     
  46. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Thank you for your respond, I hope you can figure it out soon ^^.
     
  47. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hello,
    unfortunately URP 13+ (Unity 2022.1+) changed a few things and the DeNorSob Outline render feature doesn't work on this version :(

    Code (CSharp):
    1. You can only call cameraColorTarget inside the scope of a ScriptableRenderPass.
    2. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
    Would you consider making a small update to take this into account?
    Issue is related to Blit and how render pass works. I'm not familiar with those things but here are the topics mentioning the problem and solutions:
    https://forum.unity.com/threads/how-to-blit-and-access-rendertargets-in-urp-13.1259055/
    https://forum.unity.com/threads/doc...very-blit-function-does.1211508/#post-7735527
     
    lukasynthetic likes this.
  48. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Heya all!

    So to start, this is a fresh URP Install of RealToon following the included readme:

    upload_2022-7-18_13-8-38.png

    • ...not seeing a URP Example Package, just Built-In and HDRP
    • ...tried HDRP just in case that worked...nope...see image above
    • ...aren't there ANY other examples? You have a ton of screens and interesting looks but there's just a girl in a bamboo forest? Could use a bit more (e.g. Flat Kit )
    Looks like a great asset otherwise! :)

    Thank you thank you!

    -Steven
     
  49. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi Necka_,
    Thank you for reporting this.
    I'll check this.

     
    Necka_ likes this.
  50. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi SteveB,
    For that example scene to work on URP,
    You do need to change the materials shader to URP shader.

    For the environment, it uses unity shaders while the character uses RealToon.

    Note:
    I already planned to add an example for RealToon URP soon.