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:
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 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?
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.