is there a way to make this particle work everywhere?

Sorry if I am in the wrong forum, but I’m using URP and I think it might have something to do with my issue.

I have a chessboard and I would like to use the particle system to highlight the squares. It works on dark squares but not on white squares, as you can see on the 2 screenshots here:

Basically I’m a coder so I know very little about particles, materials and shaders. I understand that making the board darker makes the particle appear but that would affect the global lighting balance.

Do you think I can solve this without replacing the particles with an ugly white square like everyone else?

I have tried making the start color darker but that didn’t help:

This is generic advice for highlighting tiles, not Chess:

It actually looks like the particle is there, just really brightly lit or blended.
See how there’s a radial gradient on this tile?

9197381--1282421--upload_2023-8-5_21-59-53.png

9197381--1282418--upload_2023-8-5_21-59-4.png

It’s a light colour on a light background, so you can’t see it well.

Your screenshot shows a gradient for the start colour:

If you want the colour to change over lifetime, move the gradient colouring to the Color over Lifetime module. That way the colour will animate over the particle’s life/duration.

Visually/aesthetically speaking, you’d also perhaps want to consider using a square highlight particle/tile FX instead of a radial gradient, although perhaps your particles are placeholders because that looks like the default particle texture.

9197381--1282430--upload_2023-8-5_22-15-28.png

9197381--1282427--upload_2023-8-5_22-4-2.png

1 Like

Thanks for the input, my idea was that if one color is dark and the other bright then the particle should appear on both type of squares.

I will look into square highlight, this comes from a particle package that I bought so I’m not sure about the texture but I will also look into that.

I think it’s an issue with my lighting because I made a new project and got this with default lighting:

That’s still light on light, and it looks like the particle is using additive blending (colour of particle is added over whatever is behind it). Try using alpha blending on the material and a colour that fits over both light and dark (like orange). The material of the board isn’t so relevant as the particle.

1 Like

Thanks, you are right it’s litteraly a ShaderGraph material named Particle Additive. Raising the intensity from 2 to 8 helps a little but I guess I need another material because I can’t keep adding more lights to the scene.

OK I think I’ve understood your pointers and got something like that:

It needs more refining but it looks like I’m on the right track. Thanks for your help!

1 Like

That image helps! Seeing the material of the particle, I mean.
It seems simple enough you could just replace it with one of the included particle shaders.

For example, the built-in shader has HDR emissive (intensity), texture sheet frame blending (Tex Sheet Blending) and soft particles (Geo Fade, I’m assuming), as well as camera fading (Fade Distance?). I’m not sure what “Fix Dark Edges” does, but for your purposes it’s unlikely to be very useful based on the name.

Just make sure you set the rendering mode to Fade or Transparent.
There’s no need for lighting a self-lit material, and they are very, very cheap.

Built-in UNLIT (should work with URP):

9198131--1282637--upload_2023-8-6_10-43-10.png

URP Unlit OPAQUE (which is similar to your latest image):

9198131--1282643--upload_2023-8-6_10-44-31.png

TRANSPARENT:

9198131--1282646--upload_2023-8-6_10-44-45.png

This is alpha blending, and the colour of the particle isn’t added to what’s behind it, it’s replacing it.

Additive: gray particle over white background = white.
Alpha: gray particle over white background = gray.

TL;DR: Your particle/effect is simple.
Just use a built-in particle shader, without additive blending, and with transparency.

1 Like

Thanks, they work but they don’t take a texture as surface input so the effect is square. It’s good to know though. I think I can tweak this shadegraph so that the colors are right.

As for dark edges it’s caused by some PNGs if I understood well.

ETA: this is what I get so far, there is indeed some kind of dark edge but it’s the price to pay I guess