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 koba0100,
    Is the ZTest is On?
    Try to click the Refresh Settings, at the bottom of the realtoon inspector, this will apply the settings properly.

     
  2. koba0100

    koba0100

    Joined:
    Nov 23, 2014
    Posts:
    7
    Thanks for the reply. I don't see an option "ZTest", am I missing it? "ZWrite" is On, though. Refresh Settings on my materials doesn't change anything.
     
  3. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Yep, it is ZWrite not ZTest.:D
    On the previous patch3 does this happen?

     
  4. koba0100

    koba0100

    Joined:
    Nov 23, 2014
    Posts:
    7
    I only purchased the asset after HDRP 10 support was added in Patch 4, so I don't think I can test Patch 3, sorry!
     
  5. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Ah, You've purchase it after you saw the HDRP 10 support.
    i'll check it here and see what cause it or something.
    thank you for reporting this.

     
  6. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, koba0100 i checked it.
    That's natural when a transparent objects are stack together but there is a way to prevent/fix this.
    In unity HDRP transparent shader there is an option Sorting Priority to fix or adjust the sortation.
    Basically it will just adjust the RenderQueue from Transparent 3000 to 3100 or negative.

    On RealToon, you can manually change the RenderQueue from 3000 to 3100,

    Try to adjust the RenderQueue of the large square object.by changing it from 3000 to 3100

     
  7. koba0100

    koba0100

    Joined:
    Nov 23, 2014
    Posts:
    7
    Changing the large panes' RenderQueue to 3100 appears to solve the odd behavior: the central cube is now always visible.

    I am noticing that the default HDRP Lit Transparent shader handles the cube correctly with no tweaks, though. Is this merely a limitation of RealToon's transparency implementation?
     
  8. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    The transparency on RealToon is the same as Unity HDRP lit transparent.
    I actually did a troubleshooting here.
    I also did a mix shaders, unity hdpr shader and realtoon shader test.

    Is your objects have different materials?
    large squares object are 1 material and the box is 1 material?
    The same RealToon shader.

     
  9. koba0100

    koba0100

    Joined:
    Nov 23, 2014
    Posts:
    7
    • The large squares are a RealToon material with Transparent Mode, Opacity 0.15.
    • The box is another RealToon material with Transparent Mode, Opacity 1.
    I've played around some more with the differences in behavior between RealToon and HDRP Lit default and it appears there are similar limitations after all in certain circumstances, so I retract my previous statement. The issue DOES exist in the HDRP default shaders, and is likely just a generic and permanent limitation of rendering transparent objects, not an issue specific to RealToon.

    I think I will have to rethink the way my assets are organized to reduce my usage of the Transparent Mode. Thank you for the time you've spent looking at this.
     
  10. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    No problem :).
    Thank you for the test results and replied info.
    You can use the Cutout feature if the object don't need semi transparent and just cutout the alpha part of the texture.

     
  11. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi everyone,
    The upcoming update RealToon 5.0.8 is 80% done before the release.
    This update is also ready for the upcoming URP 11 and HDRP 11.
     
  12. jameslayerz

    jameslayerz

    Joined:
    Nov 30, 2019
    Posts:
    1
    Hello i have a question about RealToon can it use with another material that have dissolve shader or not ? if it can use but how to do that ?
     
  13. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    You can use 2 materials in your object,
    Just set the material number element to 2 then assign the dissolve material in the first slot then the second slot is the material with realtoon.
    But this is not ideal due to performance.

    You can actually do dissolve using the Cutout feature on the realtoon shader,
    Just enable Cutout then set a gradient texture to the Secondary Cutout then check the Secondary Cutout.
    Animate the Cutout slider do that dissolve.
     
  14. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Hi and good job about the shader
    I have a problem and that is when i use the shader for almost all of my scene assetst and using lights on them
    The objects start flickering
    Anyway to solve this?
     
  15. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi,
    I'm sure you're using the built-in version.
    This will only occurs when the object is in static and the outline in enabled.
    Note that custom pass will not batch.
    The outline on the shader is a custom pass.

    There are 2 ways to fix/solve this:
    1. disable outline and enable static, you'll need to use a 3rd party outline like script outline or post processing outline, if you want your static object to have outline.
    2. enable outline and disable static. you'll have outline on your static/not moving object but it is not batch.

     
    Last edited: Feb 19, 2021
    Pourya-MDP likes this.
  16. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Thanks for reply that solved my problem by unticking static cause im creating cartoon animations and dont need static
    Now i have another problem which is i dont know how to turn emission on for windows etc.
     
  17. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    That's great news. :)
    For emission, on RealToon it is called Selflit.

     
    Pourya-MDP likes this.
  18. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    42
    How do you use Real Toon with HDRP?
     
  19. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi Kyrieru,
    Be sure your project is in HDRP.
    There's an included guide, i recommende you to read "For unity 2019 - beyond and SRP user.txt".

     
  20. zoomj

    zoomj

    Joined:
    Sep 8, 2020
    Posts:
    4
    I am trying to use the URP version of the shader, but it does not work
    I opened a new empty project
    Then import URP to create and select UniversalRenderPipelineAsset
    Import Real Toon Import Real Toon URP
    Then upgrade all materials of the project
    But it didn’t work, no matter the existing material or the newly created material is purple
    This is the error that appears: upload_2021-3-3_19-15-14.png upload_2021-3-3_19-15-14.png
     
  21. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi zoomj,
    The default imported shader is the RealToon Built-In version.

    To use RealToon URP version,
    unpack the URP package.
    The package is in the RealToon SRP.

    Read the included guide
    "For unity 2019 - beyond and SRP user.txt"
    for more info.

     
  22. vampire500

    vampire500

    Joined:
    Nov 6, 2016
    Posts:
    3
    I'm having some trouble with getting spot light shadows to work with RealToon in URP:



    On the other hand, it works just fine with the default URP/Lit shader:



    My Unity version is 2020.2.1f1, with URP 10.2.2 and RealToon 5.0.7.

    I'm attaching my spot light and material configurations. Do you have any idea what could be the issue here?

    Zrzut ekranu 2021-03-08 034053.jpg Zrzut ekranu 2021-03-08 034134.jpg
     
  23. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, vampire500
    This is a bug or an issue,
    Unity did change something on URP 10.
    This will be fix on the the upcoming update 5.0.8.

    Send me an email at "mjqstudioworks@gmail.com" if you need it right away.

     
  24. vampire500

    vampire500

    Joined:
    Nov 6, 2016
    Posts:
    3
    Thanks for the reply. I don't need it right away, but it's good to know you're aware of the problem. Cheers!
     
    MJQStudioWorks likes this.
  25. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    No problem :),
    look forward to the next update 5.0.8.

     
    andreiagmu likes this.
  26. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Any chance you guys will create a terrain shader with this sometime? Right now I'm using microsplat, but I'd be very curious to see what it looks like actually having the same type of shading for the terrain as everything else in the game!
     
    Last edited: Mar 11, 2021
  27. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, DGordon
    About the terrain shader, no plans or maybe yet for realtoon terrain shader.
    You mean flat cell look on a terrain?

     
  28. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Yeah ... basically, the lighting falloff, shadows, etc, dont match everything else. Honestly, its pretty hard to tell with my setup here since the textures are still painted, but all the same, would be nice to have a 100% full setup using toon shaders.

    IE: If you put a point light next to the ground and a wall, the wall will have a nice hard circle for the the falloff, whereas the ground will have the normal lighting falloff. Would be nice to have it match.

    Loving this, thanks!
     
    MJQStudioWorks likes this.
  29. Emperor

    Emperor

    Joined:
    Feb 13, 2014
    Posts:
    41
    Would it be possible to get 2 outlines? For example like this image here (one black and an outer white one). I managed to make it happen by adding another material to my mesh with a different custom shader but preferably this would all come from the same shader. I tried pasting some lines of my custom shader inside the real toon shader but I don't know cg much haha plus your outline code is much better. I tried duplicating the outline part of your code and renaming the variables of the 2nd portion to make it work but I didn't work... If you could offer some pointers to make it happen it would be appreciated.

    Thanks!
     
  30. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, Emperor
    You can try to use the "Rim Light" feature as another outline.
    The "Rim Light" feature can also be an alternative outline.

    Just enable it then set the "Softness" to 0,
    next uncheck "Rim Light in Light" then adjust the "Unfill".
    next change the "Color Power" to -10 then change the main "Outline Color" to white.

    Here's an example:
    (Using RealToon Shader)
    Tests.png

     
    andreiagmu, Emperor and DGordon like this.
  31. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Is there any way to build in a way to darken the parts of a mesh that are behind anything with a given stencil buffer? Currently Im hacking this in with multiple materials, where a wall sets my stencil buffer to X, then I have other materials testing against X to do stuff that winds up with the part of the character behind X getting a tint using a grab pass after your shader runs on another material.

    For performance reasons, it would be nifty if there were a way to just apply a tint to any part of the model based on a comparison to the stencil buffer. If this is too much, np, I have something working ... just definitely less performant than if there were a way to build this in.
     
  32. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi,
    Unfortunately, can't change the stencil on the realtoon shader (Built-In and URP versions) because this was used for "See Through" feature.

     
    DGordon likes this.
  33. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey, sorry to keep bugging you.

    Any way to create another version of the shader that isn't using the UV of the model, but just planar on the x/z? Given that there is no way to use this for terrain, Im thinking of just using tile pieces (its a tile-based game) for the floor and using the terrain just to draw the grass, with its regular visuals hidden. However, I need to adjust the scale of the texture on the pieces, and make sure they still all tile together properly.

    I have _everything_ turned off for the floor, I just want the hard shadows and the lighting to match the rest of the game. I've done this in Amplify Shader Editor a bunch, its just a bit hard going through your shader code. If this isnt something you have time for, no worries.

    Thanks for the great stuff here, again, sorry for so many questions at the moment :).
     
  34. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, DGordon,
    Send me an email and i'll try to help you out.
    Only UV right?

     
    DGordon likes this.
  35. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Hi, MJQ! I'm using Real Toon v5.0.7 (Patch #4, URP version), Unity 2021.1.0b12.
    I updated my project to URP 11. But suddenly, realtime shadows stopped working for RealToon.
    Is there some incompatibility with RealToon and URP 11?

    In this screenshot, the back cube uses Unity default shader, and it receives the realtime shadow correctly.
    But the front cube, which uses RealToon shader, isn't receiving the realtime shadow.
    capture_20210319_052427_001.png
     
  36. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi andreiagmu,
    On URP 11 unity did alot of changes, the cause of the changes are the shadowmask support and point light shadow.

    I already fix this and it will be available on the next update 5.0.8

     
    andreiagmu likes this.
  37. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Thanks, do you have any ETA for the 5.0.8 update?
     
  38. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    No release date yet, i'm still working on the update.
    You followed me on twitter, i'll announce it there,
    I can also DM/Message you.

     
    andreiagmu likes this.
  39. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi everyone, RealToon v5.0.8 update is now available,
    see the image below for more info about it.

    RealToon V5.0.8 Update.png
     
  40. cxh_0103

    cxh_0103

    Joined:
    Sep 17, 2020
    Posts:
    2
    Hi MJQ, I am using RealToon v5.0.8 in unity 2019 URP 7.5.3. I tried to update all materials on "unityChan" from build-in RP to URP. The parameters are almost same but the results are very different from build-in RP. The color seems much darker the light and shadows too. You can see the hair has no details in URP at all. The screenshots show the differences. Please help.

    URP

    Built-in RP


    hair material in URP


    hair material in built-in RP
     

    Attached Files:

    Last edited: Mar 31, 2021
  41. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, cxh_0103,
    This is not a bug, this is a change.
    The mixing/blending of colors of the light, shadow, gloss and the other feature has been changed to achieve accurate colors and can change it properly.

    I put a note on the release note and on the image picture i posted about the change and you need to adjust the colors of your object again (Shadow color, Gloss and other features that uses colors).

    The materials of those models uses the feature Shadow Color Texture, the Power value is set to 5 or 4 which makes it darker.

    The example below is using RealToon URP, the improved one from the update 5.0.8.
    I adjusted again the colors.

    Here.png

     
  42. cxh_0103

    cxh_0103

    Joined:
    Sep 17, 2020
    Posts:
    2
    Thanks for the reply. Could you please share the example you made?
     
    MJQStudioWorks likes this.
  43. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Send me an email "mjqstudioworks@gmail.com".
    I'll send the example there.

     
  44. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    @MJQStudioWorks
    Hi! Amazing asset btw . I am running into issues in some devices. I guess because they don't support target 3.0 or higher. Will you make a fallback that target 2.0 for devices that can't support this shader?Thank you for your amazing work!
     
  45. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, TonismoGames
    I replied to your email.

     
    TonismoGames likes this.
  46. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Hi @MJQStudioWorks ,
    I am running into issue with the Lite shader. I can't change the lighting brightness. upload_2021-4-12_16-10-7.png upload_2021-4-12_16-10-54.png upload_2021-4-12_16-11-43.png this is default with lighting of 2. upload_2021-4-12_16-12-35.png
     
  47. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi, you mean the ambient light?

    if it is light source, you can adjust the "Directional Light Intensity" and "Point anf Spot Light Intensity"

    if it is ambient light or GI,
    adjust the "Main Color".

    The Lite version, has fewer option.

     
  48. Roel03

    Roel03

    Joined:
    Jan 26, 2016
    Posts:
    3
    Is there support for baked lighting in the shader or can you only use realtime lights?
     
  49. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    655
    Hi Roel03,

    It supports both realtime and lightmap but the lightmap support is currently available on RealToon URP.

     
  50. Roel03

    Roel03

    Joined:
    Jan 26, 2016
    Posts:
    3
    Thanks for the quick reply. Currently using URP so this is perfect for me. Looking forward to checking out the asset.