# How to create a blinking star field

I'm trying to recreate the blinking star effect seen in this video.

I have created a plane, added a particle emitter and added a sphere as the emitter. In the original sphere particle instance I have used the following node setup.

The Value node has a noise modifier on it to simulate the blinking effect (similar to this). When I animate it all of the particles blink simultaneously, rather than each one individually.

How would I make each behave independently?

• You can use a texture to control the brightness of the lights, then animate the paramteters for the texture. Read: How to control many tiny lights
– user1853
Jun 28 '18 at 14:41
• @cegaton I've tried that but it only works on arrays, not particles Jun 28 '18 at 16:07
• Method from @cegaton could work for static particles but for moving ones it would be not so great. Jun 28 '18 at 19:19

My idea is to use a material's Particle Info node and route the Index property into a noise texture to provide a brightness.

You'll notice I animated the Y coordinate of the texture so that the brightness of each particle changes over time. If you have immobile particles and want the animation to loop you could build nodes to set y=sin(theta) and z=cos(theta) where theta is a function of time to loop the coordinates over the course of the animation.

I rigged my animation to use an Object as the particle render instead of a halo, and the material is on the particle object. The emitter object's material seems to be irrelevant when using Objects to render particles.

My animation turned out EXTREMELY blinky. I suspect it would calm down if the slope on the fcurve of my Y texture coordinate were shallower.

Of course, the texture node you use (and what parameters you use to configure it) will affect the blinking behavior as well.

I used an emission node, but that means that my particles can be black. If you want them to be transparent, then use a white emission BSDF and a transparent BSDF, and route the output of the texture node into the factor of a mix node that mixes the emission with the transparent BSDF.

Note: This is only workaround method! I'm struggling with fully random effect for a while, in similar scenario (rotation cycle of the object). So I hope that this won't be the only answer to this question.

This gifs are 5 seconds long.

## Overview

You have here mostly everything done.

To animate "fake" randomness you will need to make several copies of your star object and also make copies of a Material for each of them. The more object you will have, the more random effect you will get.

Then in Graph Editor you can change Phase in Noise Modifier to something else for each value you have keyframed (and each object of course) - it's Strength in my case.

Now you can Group those objects and use them in Particle System as a Group with Pick Random selected. I've also set some Random Size.

## Comment

I don't know if and (if yes) how to control values in Noise Editor to skip manual part of this process. It's kind a tedious and after all not some random in global perspective.

So as for me this method worked pretty well in last project, but for sure I would be happy to know how to make this fully automated. So I can sleep at night.

• @hellocatfood If you like this solution you can accept it and/or upvote ;) Jun 28 '18 at 23:09
• @lukeD I accepted the above solution as it solves it and offers more flexibility, but totally upvoted yours ;-) Jun 28 '18 at 23:11