POV-Ray : Newsgroups : povray.advanced-users : HDRI starfield : Re: HDRI starfield Server Time
7 Dec 2021 16:17:36 EST (-0500)
  Re: HDRI starfield  
From: Robert McGregor
Date: 25 Jan 2021 12:25:01
Message: <web.600efd3bd6c0391287570eab0@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> Can anyone recommend an HDRI starfield texture that works with POV-Ray?
> I haven't used HDRI ever before so I don't know what to look for. Thanks!

You didn't mention the context so I don't know what the starfield would be used
for, but there are some nice HDRIs at https://hdrihaven.com/hdris/ and even a
few with night skies.

If you just need something for a backdrop here's a simple noise-based texture
that might do the trick:

//------------------------------------------------------------------------------
// Stars and Nebula
//------------------------------------------------------------------------------

#declare T_StarField = texture {
   pigment {
      average
      pigment_map {
         [2
            bumps
            color_map {
               [0 rgb 0]
               [0.925 rgb 0]
               [1 srgb 0.6] // white (with emission)
            }
            scale 1/2
         ]
         [2
            bumps
            color_map {
               [0 rgb 0]
               [0.925 rgb 0]
               [1 srgb 0.65] // white (with emission)
            }
            scale 1/3
         ]
         [1.5
            bumps
            color_map {
               [0 rgb 0]
               [0.95 rgb 0]
               [1 srgb <0.75,0.75,0>] // yellow
            }
            scale 1/4
         ]
         [0.5
            bumps
            color_map {
               [0 rgb 0]
               [0.95 rgb 0]
               [1 srgb <0.75, 0, 0>] // red
            }
            scale 1/8
         ]
         [0.5
            bumps
            color_map {
               [0 rgb 0]
               [0.95 rgb 0]
               [1 srgb <0, 0, 0.75>] // blue
            }
            scale 1/8
         ]
         [0.5
            bumps
            color_map {
               [0 rgb 0]
               [0.925 rgb 0]
               [1 srgb 0.6] // white (with emission)
            }
            scale 1/16
         ]
      }
   }
   finish { emission 15 }
}

#declare T_Nebula = texture {
   pigment {
      bozo
      turbulence 0.75
      scale 0.125/2
      color_map {
         [0 rgbt 1]
         [0.7 rgbt 1]
         [0.8 srgbt <1, 0, 0.5, 0.75>]
         [0.9 srgbt <0, 0, 2.5, 0.75>]
         [1.0 srgbt <0, 2, 0, 0.75>]
      }
      omega 0.65
      lambda 3
      octaves 5
      scale 10000*4
   }
   finish { emission 0.0035 }
}


//------------------------------------------------------------------------------
// Stars and Nebula
//------------------------------------------------------------------------------

sphere { 0, 10000
   texture { T_StarField scale 10 }
   texture { T_Nebula scale 1 }
   texture { T_Nebula scale 1.5 rotate 45 }
   rotate 180
}

Cheers,
Rob


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.