3

I have implemented blast particle within my game but when it spawns, it gets cutout to correspond to the nearest environment object.

This problem, I was getting: enter image description here

Overall there are multiple particle systems are running to achieve this but I am attaching one particle system inspector panel details:

enter image description here

A similar kind of renderer exists for mostly all particle systems. So please guide me to solve the above effect cut related problem with the wall.

EDIT-1:

I have added a VFX rendering camera and created separate later too for the effects but there is no change in the result. enter image description here

EDIT-2:

Here you have a screenshot for the Main Camera of the game: enter image description here

Siddharth
  • 4,142
  • 9
  • 44
  • 90

2 Answers2

1

You could add collisions to the particles so that they either bounce away from the world object or are just destroyed.

Example Collision Setup

enter image description here

It will add a little overhead but depending on how many particles the effect uses it shouldn't be an issue, and if it is you could test it with a lower collision quality.

Community
  • 1
  • 1
akaBase
  • 2,178
  • 1
  • 18
  • 31
0

I found this advice on the polycount forums written by user AlecMoody:

[1.] Create a second camera parented to the primary camera...

[2.] Create a render layer for your [particle effect] (or assign it to an existing layer).

[3.] Set the main camera culling mask to everything except your explosion layer.

[4.] Set the child camera culling mask to only be your explosion layer. The child camera should have the clear flag set to "don't clear"

[5.] and put a positive value into the [child] camera depth.

Since for you having a higher depth on the child camera doesn't make it render above the lower depth cameras, setting the clear flag to "depth only" may help you.

Community
  • 1
  • 1
Ruzihm
  • 19,749
  • 5
  • 36
  • 48
  • So apart from adding another camera, there is no option exist to solve this problem? because my 3d camera following a player and doing other tasks too. – Siddharth Dec 30 '19 at 17:26
  • Nobody said this was the only way. How does your camera doing other things matter? Did you try this answer? – Ruzihm Dec 30 '19 at 17:38
  • If you're asking if theres just an option "cullParticlesOutOfPointOfView = true` or something like that, then no. –  Dec 30 '19 at 18:28
  • I have updated my question after applying the above solution. – Siddharth Dec 31 '19 at 10:34
  • @Siddharth what's the depth on the main camera? it should be something less than 1 – Ruzihm Dec 31 '19 at 13:21
  • Minimap camera depth = -1, Main camera depth = 0, VFX camera depth = 1 – Siddharth Dec 31 '19 at 13:26
  • @Siddharth we need more information about how you are rendering the cameras to the viewport. Please include the inspector of the main camera in the question. – Ruzihm Dec 31 '19 at 14:10
  • @Ruzihm If I change the camera flag from "Don't Clear" to "Depth Only" then there is no cut in the particle system when it hit the wall - is this proper solution? – Siddharth Dec 31 '19 at 15:19
  • @Siddharth I'm not sure why that's happening but I've edited the answer to include that. I could make a more informed answer if you shared the inspector for your main camera. – Ruzihm Dec 31 '19 at 16:31
  • 1
    @Ruzihm okay, I will share screenshot tomorrow with you and really thank you for all your support :) – Siddharth Dec 31 '19 at 17:22
  • @Ruzihm I have added details for the Main Camera within the question... – Siddharth Jan 01 '20 at 09:31