Stars appearing over asteroids

So I added some asteroid images to the particle system to simulate… well, asteroids flying through space. It would make sense for them to be in front of the particles resembling stars, the problem is no matter how far back I push the star particles, it always looks like they’re in front of the asteroids in the game.

It’s a bit hard to see, but hopefully on the circled asteroid you can see the two white dots above it.

This is what the scene looks like. The asteroids are on the left, and the star particles on the right:

As you can see none of the star particles shouldn’t be getting in front of the asteroids, and yet they are! They’re not transparent either. The alpha bar in Tint Colour for the asteroids is fully to the right.

Anyone know what’s wrong here? Thanks!

Hello James, how are you?
I think that this is happening because of the shape of the emmiter, there are some particles being sent to a positive/negative z direction. You can either scale the z of this particle system to a very low value or you could edit the emmiter shape

Thanks for replying. Did you mean you thought there were stray particles getting in the way? I changed the both the emitters to a box shape and changed the X rotation to point them further way and am still getting the same problem.

Strange, I would have to take a look at the project to help you find the issue, although I will onlu be back to my home on saturday. :frowning:

Have you checked the alpha of the asteroid image itself? (not in the inspector), if you didn’t, try reopening it and save it in a format that don’t saves the alpha and try to see if the problem persists

Sorry, I don’t understand what you mean by “alpha” haha. Do you mean the original image the individual asteroids were from, or before they were added to the particle system?

He’s asking if the asteroid could be partially transparent. Can you see other things through it? If you move it over your ship, could you still see the ship at all?

More information would be helpful. Can we have screenshots of your hierarchy and the particle system inspector values? Do you have one particle system in play or two?

1 Like

I moved the asteroids in front of the ships and yeah you can see the ships through asteroids. There are two particle systems, not including the asteroids.

1 Like

Sorry about the delay to answer, I have not bookmarked the thread.
The opacity of the image that you are using might not be 100%, so even if you set the alpha channel within the inspector to fully opaque, if the source image is a little transparent the transparency will persist on the game

Or the alpha channel within the particle as Anthony suggested

Man I feel stupid! Asking what you mean by alpha when I myself talked about it already. :confounded: I see what you’re saying now. Check the alpha of the original image.

Don’t worry :joy: this happens all the time with me, many things in our head. :slight_smile:

Let me know if you either the solutions pointed by me and Anthony works, otherwise you can send the project and as soon as I arrive I’ll take a look on it

So, turns out the original image was transparent. I’ve managed to get it solid and the stars to not show behind it now, but now I have another problem. For some reason the asteroids are a lot darker! Ah well, I need to go now so I’ll figure it out later. Thanks for your help!

1 Like

I think that the best option may be light up the source image. Im glad that you got it solved by the way. :slight_smile:

Sorry to drag this back up but when I opened it today everything seems to have reverted to how it was before. Asteroids are their original colour and again you can see the star particles through them. Now, I’ve made absolutely sure the original image wasn’t transparent. I tried putting the original sprite, before I made it a material and added it to the particle system, in the scene and the stars go behind it then. So it seems to me it’s a problem when it becomes a material or when it’s added to the particle system.

If it helps, I’ll put some images of the inspector of the particle system and of the material.

Regarding the darker color, it happens because the Tint Color is grey, you should put it pure white so it will use the exactly color of the asteroid image. Have you tried tweaking the soft particle factor? Try it on min and max and see if it is what is causing it.

Yeah I have tried tweaking the soft particles factor, it doesn’t make a difference.

OK! I’ve definitely got this solved now. Seems the problem was with the shader I was using for the material. I was using Particles/Additive, I changed it to Particles/Alpha Blended and that’s made it solid, you can’t see the stars through it now. Got it looking pretty good now, so time to move on!

1 Like