Using Niagara to show stars in the sky

Hi!

I have the location of all of those bright stars in the sky. Someone has suggested me to use Niagara to draw them instead of using actors with a emissive material:

But I haven’t done anything before with Niagara.

How can I spawn something like that in a location (x, y, z) using Niagara?

The stars are spheres with an emissive material with different sizes.

Thanks!

I’m assuming you need to move them around for gameplay is why you’re using Niagara? If so, look at using Niagara Data Channels:

Now I’m using Actors. I have no idea about Niagara.

Someone has suggested me to use Niagara instead of spawn 8k actors.

I want to spawn (or whatever is called in Niagara) something that looks like a star using Niagara.

Thanks for your answer!

Niagara will be way more performant than actors. NDC will let you push data and use it in emitters however you need (position, color, size, duration…).

If you just need a star background, I would go with a material based approach on a sky dome/sphere for best performance.

I’ve found this: https://www.youtube.com/watch?v=0R7llmGGTXA

I need a tutorial or something to learn how to do it.

@Countsie

I’ve forgotten to mention that I’m using actors because I need to hide them and show them again. Or because the player can interact with them, by clicking on them. Can I do that with a Niagara Effect?

Thanks!

hmmm. i dont think there is an easy way to select individual emitters/particles like with a linetrace. in that case, I would do it with a ISM/HISM, you can get the ‘item’ from the hit result and it will be the index of the specific instance. You can use custom data to change the instance color in it’s material, use the random instance value in your material to modify the ‘twinkle’. you can ‘hide’ an instance by setting it’s scale to 0.

if not using nanite, keep your star mesh SUPER simple if you’re doing 8k objects. Try a cube, see if that works.

once you get it set up and working, if you still have performance issues, i might consider breaking the stars into visual ‘sections’, each using it’s own ISM so view culling can skip rendering ISMs not in view.