26
$\begingroup$

I'm trying to make a short animation in space and I need stars as my background. I found this nice tutorial, unfortunately it was made in blender render and doesn't work in cycles.

https://www.youtube.com/watch?v=sb4ryQMvRi4

Can someone tell me how to recreate this in cycles?

$\endgroup$
1
  • $\begingroup$ since i can't comment yet i'll do it this way. do you use blender 2.7 or the latest one (2.76)? $\endgroup$ Commented Jan 11, 2016 at 17:18

3 Answers 3

45
$\begingroup$

First you need to jump over the the Node Editor view, then select Shader Nodes and World. Also make sure Use Nodes is checked.

enter image description here

Then add a Noise Texture node and a Color Ramp node. Plug the Fac of the noise texture into the Color Ramp, and the Color of the Color Ramp into the Color of the default Background shader.

enter image description here

You can then adjust the Color Ramp and Noise Texture how you would like to create the desired starry effect.

  • Noise Texture Scale. This controls the size and amount of stars. Higher scale means more, smaller stars; smaller scale means less, larger stars.
  • Noise Texture Detail. This will adjust the shape and variation in brightness in the stars. Higher value will mean more irregularly shaped stars, but there will be a greater variation in the brightness of the stars.
  • Color Ramp Swatches. Adjusting the color swatches on the Color Ramp will change the size and shape of the stars. The farther apart the swatches are the bigger and more irregularly shaped the stars will be.

Shown above are the settings I used to create the below render.

enter image description here

$\endgroup$
1
  • $\begingroup$ just a great solution....!! $\endgroup$
    – Chris
    Commented Jun 16, 2021 at 13:41
24
$\begingroup$

You may do it using Noise Texture and Color Ramp nodes. Set them up as pictured below. enter image description here

Here's the result. enter image description here

Play with the settings pictured below (marked as red) for different effects (like stars density, brightness, etc.). enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ You both posted at the same time, so thank you as well :) $\endgroup$
    – N1xX
    Commented Jan 11, 2016 at 18:04
  • 1
    $\begingroup$ To be exact, my friend PGmath answered 20 seconds before me ;). Anyway, I'm glad I could help :). $\endgroup$
    – Paul Gonet
    Commented Jan 11, 2016 at 18:14
  • $\begingroup$ is it possible to add a bit of colored stars? $\endgroup$ Commented Nov 17, 2018 at 10:49
9
$\begingroup$

I have added even a Milky Way using the Wave texture and some math!

I got a Wave texture, put through a color ramp (I have changed the direction from black to white, but it doesn't matter), and I have got a noise with a color ramp set up with less bright (through color ramp) and less big (with the scale factor of the noise), and I used the maths tool to multiply them (black parts of the noise cancel out the stars, as 1×0 is still 0), and then I just added the math output to the starfield that I have generated just like you can see in the answers above. I think it looks pretty :)

Starfield

Nodes

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .