Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

RealToon (An AAA Toon/Anime Shader and Stylized)

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

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    20
    Thanks for the reply and recommendation. I just noticed the new Sequence support in a blog so trying to give that a go.

    I worked out why everything was so white. Somehow all the light sources in the scene got set to 1000 intensity. I don't *think" I did anything that should result in that, but I did run some of the scripts that came with the instructions etc. I am wondering if something in the project got the script confused. Not sure. Will see if I can repeat (hopefully not!)

    But the project has some strange unrelated behavior, so I am in the painful process of trying to drag all the assets from an old project to a new clear project. Tedious. (The lights in the scene flicker on and off as I point the camera around in the scene, making it painful to adjust things like lighting. I fear I "half converted" to HDRP, and its got itself in a knot.

    But I have got things basically working, with shadows etc. I am checking out the latest blog to see if I should change my project around to follow its standards before doing a bulk move of all my VRoid characters over to the new shader. I previously had problems with using HDRP as some of the old assets from the asset store (everything turned pink!). We will see how it goes with a smaller test.

    Backed vs realtime... still learning. I would rather do everything real time, but again assets I have purchased were baked. I am trying to work out still can I make them all real time so I can get the lighting correct in scenes without having to rebake.

    But, I am making progress, I have created some scenes with much better shadows from tree leaves falling on the character. But I am still working out how to do lighting to get the effects I want. I just hit so many road bumps I end up spending a lot of time on them instead of getting on with the real project (sigh).
     
  2. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi, in HDRP there is a global override.
    The cause of the white is when the object is too dark and low intensity light it will try to increase exposure.

    This is the cause of the Exposure post processing in auto mode.

    See the video tutorial i made on how to get the lighting right.



    That's for HDRP.


     
    Ruchir likes this.
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    20
    Thanks. I am just using the standard rendering pipeline in my case. Last time I tried to upgrade the project to HDRP, most of the assets (many are old) I had purchased form the Asset Store turned pink. If I understand, its because the shaders on the objects don't support HDRP (or something like that). So I gave up and decided to stick with the standard render pipeline.

    In my case, when I brought up the lighting window, I found all the lights in the scene had their intensity set to 1000. I have no idea why. But when I set them all back to 1 the scene came good again. Well, sort of "good". In scene mode (not play mode), as I move around the scene it looks like it is flickering between using the lights and not using the lights. Very annoying. (Hopefully the animated gif I attached works.)
     

    Attached Files:

  4. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Is there any errors on the console?
    Send it to me if there is.

    Try to create a new hdrp project just for testing purpose.

    Sometimes updating the project from standard to urp or hdrp causes some unwanted behaviour because of some assets that might not be compatible and may cause to stop compiling the shaders and script.

    Reinstalling the HDRP Package files after updating your project to HDRP might fix it.

     
  5. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    I found a bug with De Nor Sob Outline works:
    upload_2021-5-25_11-31-43.png

    As you can see that when the two geometries are close to each other then instead of their outlines adding up, they instead disappear(Maybe not clearly visible here, but it certainly does disappear in that region)
    upload_2021-5-25_11-30-0.png
    It certainly isn't a big issue though, but I thought I should point it out if a bug fix is possible ;)

    (I'm not using material outline, The material on the left is standard Lit(HDRP), on the right its using a Real toon shader without outline)
     

    Attached Files:

  6. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    One more thing is there a reason we can't use Depth/Normal based outline and Sobel outline together,
    Once I enable Sobel and configure it, I lose depth-based outline(At least it seems so):
    Before:
    upload_2021-5-25_11-38-54.png
    After:
    upload_2021-5-25_11-39-44.png
     
  7. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    Also, it would be helpful to have an offset value to sobel outline as you can see that it doesn't look that great with normal shading, it would be helpful to decide the cut-off point where the effect starts considering the shading as dark
     
  8. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi Ruchir,
    You can mix the two, there is an option under "Settings"
    Enable "Mix Depth-Normal And Sobel Outline".


     
    Ruchir likes this.
  9. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    You can adjust it,
    Just adjust the "Threshold".
    For more control adjust the "White Threshold" and "Black Threshold".

     
  10. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Is the material on RealToon is transparent?
    Besure the ZWrite is On.

     
  11. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    It's not transparent.
    Where do I modify the ZWrite property?
     
  12. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    At the very bottom of the realtoon inspector.

     
  13. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    upload_2021-5-25_21-58-57.png
    It's turned on
    (Btw it's a post process effect, so it should really matter if it was transparent in this case )
     
  14. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    I encountered a few more problems with the outline system.

    1) Post-Process outline isn't affected by Fog
    upload_2021-5-25_22-46-52.png
    2) Traditional outline has a lot of blending artifacts:
    upload_2021-5-25_22-47-16.png
    upload_2021-5-25_22-47-23.png

    Hardly visible inside cloud or Fog :
    upload_2021-5-25_22-48-43.png
    upload_2021-5-25_22-49-9.png
     
  15. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    Also, please create a discord community, it would be good to have few people that know about toon shading and can help others get started with it, share tips and tricks, etc. :)
     
  16. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    One last feature request will be to have a layer mask to filter which objects are affected.
    (For my example tree leaves look a bit overwhelming when outline is enabled in some cases)

    upload_2021-5-26_6-0-23.png

    upload_2021-5-26_6-1-10.png

    Although after decreasing the outline width, it does look amazing but would love to have some kind of filtering option:
    upload_2021-5-26_6-14-48.png
     
    Last edited: May 26, 2021
  17. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi,

    For DeNorSob Outline post processing:
    For depth-normal outline it does not affect the fog and clouds and it only affect objects but for Sobel Outline it does all because it affects all the screen.

    About the Traditional,
    I explained it on an included HDRP text file about the traditional outline on the fog + clouds.
    The file name is "Please read before you unpack or import.txt", i recommend you to read it.

    I'm sure you forgot to read it.

     
    Ruchir likes this.
  18. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    You can use unity layer masking.
    Which layer you want the Post Processing to affect.

    You can try to use the on shader "Screen Space Outline",
    It will only affect the object it self.

     
  19. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    I already planned to create a discord and it will be available soon.

     
  20. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    I tried to replicate yours and this is the result.
    It is working fine.

    A Test.png

     
  21. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    458
    For that artifact to happen, try having both the geometries not touch each other and have them on the same depth
    So position should be somewhat like this: (0, 0, 0) and (1.1, 0, 0)
    For example my values were ( 1.970388, 0, 0) and (3, 0, 0) and outline width of 17.02 in the post process

    upload_2021-5-27_11-57-22.png
     
  22. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi, i followed yours and now i see.
    I found what caused it, it is actually the Traditional Outline.
    if you switch to Screen Space Outline or Remove Outline (On Shader).
    It will not cause that gap.

    This might be the depth problem on the Outline Pass (Custom Pass).
    The same problem as the far fog and clouds.
    Take note, custom pass can't be batch.

    It is recommend to use RealToon's Screen Space Outline, DeNorSob Outline or 3rd party outline or script based outline.

     
    Last edited: May 27, 2021
    Ruchir likes this.
  23. o3428320d

    o3428320d

    Joined:
    Apr 5, 2019
    Posts:
    8
    Hello,

    I have encountered some problems when swapping the texture for vroid model.
    I have used the swap tool.
    Some of the shaders can properly swapped successfully to RealToon.
    But the eye parts on the face can't be changed properly.
    I am using URP 11.

    Also for the pants, the shader can be swapped properly, but it has no transparent function. (The transparent parts become black color)
    Do I miss anythings?

    Please help, thanks a lot.
    test.jpg
     
  24. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi,
    If the tool/script does not properly swapped it.
    Just select all the materials of your vroid model then change the shader to RealToon Shader.
    for transparent materials just enable "Transparent Mode".

     
  25. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    49
    quick question, I am looking to animate the eyes to make the puples change size.
    to do this I am going to change the diffuse texture. how can I access that in a script ?
    renderer.materail.texture_color= image[1] is a basic example to what I am doing I just need exact syntax .
     
  26. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi, here's the line you need:
    https://docs.unity3d.com/ScriptReference/Material.SetTexture.html

    The variable for main texture is "_MainTex".

     
  27. o3428320d

    o3428320d

    Joined:
    Apr 5, 2019
    Posts:
    8
    Hello,

    Is there any tutorial about realtoon on vroid?
    I searched for a long time and wouldn't find one.....:(
    I tried to do it in unity and never make the vroid model as nice as you show in the those demo video....:(
     
  28. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    49
    thanks
     
    MJQStudioWorks likes this.
  29. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi,
    May i know what render pipeline is your project is?
    Built-in/BiRP? URP? Or HDRP?

    Have you tried to watch the RealToon tutorials?

     
  30. o3428320d

    o3428320d

    Joined:
    Apr 5, 2019
    Posts:
    8
    I used URP.
    I have watched those videos, but it seems like that those video may not match my needs as I can't find a tutorial video about vroid model with realtoon shader.:p
     
  31. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi, thanks for the info.
    All of those tutorials can also be applied to VRoid.
    Send me an email support at mjqstudioworks@gmail.com and send some screenshot of your model so that i can help you to achieve it. :)

     
    Last edited: Jun 13, 2021
  32. KiraSnow

    KiraSnow

    Joined:
    Feb 22, 2021
    Posts:
    1
    9R4KB2$)V1P8}69$6)$I_EQ.png TD6LZ(LNN{]D}P{8XWFK`GJ.png


    there is one strange shadow when using realtoon on environment(other shaders didn't have it), it seems like the shadow of whole scene, and it exist even i closed every objs except the ground. how to remove it ?
     
  33. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi, wechat_os_Qy012wT1Zl8HVKPhkD9tPKRps

    That might be the RealTime shadow.
    Try to adjust the 'Reduce Shadow',
    This option will reduce realtime shadow artifacts.

    What render pipeline is your project using?
    Built-in/BiRP? URP? Or HDRP?

    Take note that RealToon shader receives and cast shadow.
    If your object dont need use RealTime shadow, just enable 'Disable Cast Shadow' and hide shadow.

     
  34. cantgetno197

    cantgetno197

    Joined:
    Dec 8, 2015
    Posts:
    3
    I recently purchased this shader and any object that uses it is unselectable in scene view. I see there is a statement that this is a known bug that was "fixed" but it is not fixed for me. Is there a way to fix this?
     
  35. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi cantgetno197,

    It only occurrs on a plane object or quad face.

    This is the current problem on URP and HDRP when a custom pass is culled front.
    The outline on the shader is custom pass and culled front.
    This will cause, can't select front, only the back.

    If you use "Screen Space Outline" or "Remove Outline" you can select the front of the plane object, if you use the "Traditional Outline" the front of the plane object can't be selected and you can select it on the opposite side or back side.

     
    Last edited: Jun 20, 2021 at 2:09 AM
  36. MJQStudioWorks

    MJQStudioWorks

    Joined:
    Oct 12, 2012
    Posts:
    381
    Hi everyone, Reminder.
    Next RealToon update is 5.0.9
    Staytuned for the announcement/info about it.
     
    Ruchir likes this.
unityunity