Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Toony Colors Pro+Mobile 2

Discussion in 'Assets and Asset Store' started by Jean-Moreno, Mar 7, 2015.

  1. e6586808

    e6586808

    Joined:
    Jun 3, 2015
    Posts:
    4
    Hello,can you help me fix these error?
    upload_2021-2-19_23-14-49.png
     
  2. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    Can you verify that you have the file "TCP2_ExpressionParser.cs" in "JMO Assets\Toony Colors Pro\Editor\Utils"?
    If not, try to reimport the package from the Asset Store.
    If you do, please send me an email so that we can investigate why it doesn't want to compile properly.
     
  3. TPEUnity

    TPEUnity

    Joined:
    Jan 17, 2018
    Posts:
    29
    I can also add to this using 2019.4.21f1 LTS using URP 7.3.1 (and some other patch before as i updated to see if thats the case.). Unity randomly started crashing on start up. This started happening after adding latest TCP 2 to the project. I deleted TCP2 files from the Assets folder and it started to boot normally. I cannot confirm 100% this is problem with TCP2 since i've used it in previous projects without any issue but there is something fishy going on...
     
  4. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    Unfortunately I haven't been able to reproduce nor pinpoint a potentially problematic file...
    Do you know if Unity is crashing while importing assets? If so maybe we could know which file crashes in the log somewhere.
    Also have you tried deleting the Library folder and reimporting everything from scratch? (could take a while depending on the project size)
     
  5. TPEUnity

    TPEUnity

    Joined:
    Jan 17, 2018
    Posts:
    29
    I think i was able to reproduce the crash i will DM u more information.
     
    Jean-Moreno likes this.
  6. TPEUnity

    TPEUnity

    Joined:
    Jan 17, 2018
    Posts:
    29
    For anyone else experiencing this. This was the solution (unity bug).

    https://issuetracker.unity3d.com/is...s-are-being-upgraded-during-importing-process
     
  7. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,736
    Hey,

    Anyone made a Zelda Breath Of The Wild type shader with this? If not what should I do to get this look @Jean-Moreno?

    Thanks,
    jrDev
     
  8. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    Here's a quick example using the Hybrid Shader:
    upload_2021-3-31_11-2-32.png
    I've highlighted the settings that I think are the most important:
    - Shading ramp set to "Crisp" for a clear line separating lit and unlit parts
    - Specular set to "Crisp" as well. For this one, you might also want to add a Specular Map with a stroke-like texture: it looks like they used that in the game for an extra hand-drawn-like stylization touch.
    - Close values between the min/max rim lighting parameters, so that the line will also appear crisp. In the game I 'm pretty sure they used a post-processing effect to achieve this, so that's why its width looks consistent in the game. With the rim lighting technique, that will generally depend a bit on the mesh used, so ymmv.
    - "Light-based mask" so that the rim effect only shows in lit parts.

    That combined with the same kind of simple textures with flat colors should give you a good start.
    Note that the environment is less stylized in the game, probably using normal maps and a less pronounced shading ramp.
     
    jrDev likes this.
  9. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,736
    Hello,

    Great, appreciated!

    I am currently building to WebGL and I am getting an error:
    Code (CSharp):
    1. Shader error in 'Toony Colors Pro 2/Hybrid Shader Outline': Duplicated input semantics can't change type, size, or layout ('TEXCOORD0'). at line 805 (on gles)
    How should I fix?

    Thanks,
    jrDev
     
  10. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    My bad, it will be fixed in the next update.
    You can fix it manually in the mean time: open the file "TCP2 Hybrid Shader Outline.shader" and go to line 804, you'll find this line:
    Code (csharp):
    1. float2 uv : TEXCOORD0;
    replace it with:
    Code (csharp):
    1. float2 uv : TEXCOORD1;
    and it should work.

    Do the same for the non-outline version of the shader if you're using it as well.
     
    jrDev likes this.
  11. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    23
    I'm using the TCP Examples => PBS => Blended Outline shader, is there a way to make it write to the Depth Buffer so my fog can work correctly? Thank you!
     
  12. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    You can edit the shader file manually, look for this line:
    Code (csharp):
    1. ZWrite [_ZWrite]
    and replace it with:
    Code (csharp):
    1. ZWrite On
    Note however that semi-transparent shaders writing to the depth buffer might result in visual artifacts because of sorting issues and depth culling!
     
  13. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    23
    Thanks for you answer!

    Unfortunately, it didn't change my issue.

    But I found a workaround, using the Toony Colors => mobile shader and settings the outline to "Opaque" instead of "Blended" BUT I have an issue and can't save this:

    "Getting control 0's position in a group with only 0 controls when doing repaint".
    It happens everytime I select an outline type (Off, Opaque, Blended).

    Any idea on how to solve this?
     
  14. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    This happens because changing the outline type changes the shader internally, and a new UI is loaded for it while the older UI didn't finish drawing (i.e. I wasn't doing things cleanly in the UI code!).
    This should only cause visual artifacts during one frame though; if everything looks good afterwards then this error should be harmless.
     
  15. NamraGame

    NamraGame

    Joined:
    Feb 17, 2019
    Posts:
    24
    Hi! your asset looks really complete although I do have a couple of questions before purchasing it :) I was wondering if it was possible, to assign on the same shaders:
    • "wind effect" (to foliage)
    • "see through walls" (to see the player behind objects)
    • "clouds effect" (like if it's cloudy and we see the cloud shadow moving)
    thank you!
     
  16. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    You can use the Shader Generator 2 to generate your own shaders with those effects:
    • Wind Animation, vertex-based wind movement
    • Silhouette Pass, to view meshes when they are behind an object
    • For the clouds, it will be a bit more involved as you need to use the Shader Properties system to customize your shader; here's one way of achieving that though:
      upload_2021-4-13_7-52-19.png
    This is in the "Hooks/Main Light Attenuation" property: you can add a "Material Property/Texture" implementation, and then change the settings you see in bold green.
    This will multiply the texture on top of the shadow attenuation of the main light, with scrolling UVs, so that with the correct texture it will look like shadows over the world.
    A couple notes:
    • UVs are set to "World Position", so that they can nicely tile across objects in the world along the XZ plane; this also means that objects with a steep change in the Y axis will probably stretch the texture dramatically (e.g. a tall cube).
    • The Swizzle is set to RRR, so that only the red channel of the texture is used. This allows you to set your texture import settings to "Single Channel" with "Red" only and save on memory (as I'm guessing the texture will be grayscale) (prefer red over alpha only as it can be compressed on some platforms, unlike alpha-only).
    • You could also blend multiple textures with each other at different scrolling speed to add more organic movement instead of a single fixed pattern that moves (same principle as in this Diablo III VFX video)
    Please send me an email if you need help with that process.
     
  17. NamraGame

    NamraGame

    Joined:
    Feb 17, 2019
    Posts:
    24
    wow, that's a really complete answer. I'm sold :) thank you.
     
  18. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    23
    Hello,

    I'm having an issue with the Animated Dissolve in the example shaders.
    Here are pictures showing the effect with Dissolve Value set to 0, 0.5 and 1:



    And the shader (I didn't change anything and it is the same as the one shown in the documentation):


    I'm using Unity 2019.4.2f1 with the built-in renderer.

    Thank you for your help!
     
  19. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    493
    Looks like you're missing a dissolve map, usually some kind of noise (see the example material).
    If it's not specified, the whole mesh will be dissolved at every point at the same time, so that's probably what's happening here.
     
unityunity