ParticleEffectForUGUI icon indicating copy to clipboard operation
ParticleEffectForUGUI copied to clipboard

How to use with "CartoonFxRemasterFree"

Open Hdongyeop opened this issue 1 year ago • 5 comments

NOTE: Your issue may already be reported! Please search on the issue tracker before creating one.

Describe what help do you need Hello, I want to use particle systems in this asset(https://assetstore.unity.com/packages/vfx/particles/cartoon-fx-remaster-free-109565). I drag a FX prefabs into canvas in hierarchy, right click - prefab - Unpack Completely and add component UI Particle. and then I pressed fresh button in component. it looks good in scene view. but in game view it seems black. I think it happened because the particle system had a complex shader. But I saw you used this Cartoon FX in demo. so I'm wandering how to use.

Additional context Question_UGUI

you can see all particles rendered black.

Hdongyeop avatar Aug 14 '24 01:08 Hdongyeop

Thank you for your reporting!

mob-sakai avatar Aug 14 '24 08:08 mob-sakai

Unfortunately, the demo contains an old version of CartoonFx (currently not available in the Asset Store). As you mentioned, CartoonFxRemasterFree uses complex shaders (CFXR Particle Ubershader.cfxrshader, etc.). Setting Canvas.renderMode=ScreenSpaceCamera would support some prefabs.

mob-sakai avatar Aug 14 '24 11:08 mob-sakai

If you do not use these shaders outside of UIParticles, you can use them by following the steps below:

  1. comment out the whole “Shader Caster” path
  2. add ZTest Always to the “Base” path
  3. Set TexCoord1 and TexCoord2 to Canvas.additionalShaderChannels

mob-sakai avatar Aug 21 '24 00:08 mob-sakai

Hi @mob-sakai I know this is a bit of a necro post but since I'm having the same problem and I do need to use SP Overlay, I was wondering if you would be able to explain a bit better what I can do/change in the particles to make them render correctly in the screen overlay instead of having to use SP Camera.

I'm happy to duplicate the materials, custom shaders, whatever, and modify then, but I'm not quite sure how to do it and where to do it :S

Or provide some directions on how we can create a particle that will work in Screen Space overlay (using the shuriken particles)?

Thank you in advance.

PalaNolho avatar Nov 15 '24 11:11 PalaNolho

Sure.

First, this is the "CFXR Explosion 1" from CFXR. As you can see, it does not support UIParticle as-is.

The shader used in "CFXR Explosion 1" is "CFXR Particle Ubershader.crxrshader."
Make the following adjustments to this file:

  1. Locate the ShadowCaster pass and comment out the entire pass:
/*
// vvvv Comment out "ShadowCaster" pass whole vvvv
Pass
{
    Name "ShadowCaster"
    Tags { "LightMode" = "ShadowCaster" }
    ...
}
// ^^^^ Comment out "ShadowCaster" pass whole ^^^^
*/
  1. Locate the BASE pass and add ZTest Always. (For URP, locate the BASE_URP pass):
Pass
{
    Name "BASE"
    Tags { "LightMode"="ForwardBase" }
    ZTest Always // Add This
    ...
  1. Add TexCoord1 and TexCoord2 to Canvas.additionalShaderChannels:

:tada:

However, note that the ring effect is not displayed correctly (the lines are extremely thin).

mob-sakai avatar Nov 15 '24 13:11 mob-sakai