POV-Ray : Newsgroups : povray.general : Night Sky - Beginners Question : Re: Night Sky - Beginners Question Server Time
23 Apr 2024 10:55:19 EDT (-0400)
  Re: Night Sky - Beginners Question  
From: Alain Martel
Date: 27 Apr 2020 14:46:41
Message: <5ea72891$1@news.povray.org>
Le 2020-04-27 à 13:34, Jezza a écrit :
> Hi, I have only started on POV RAY for a day or so, so please go gently!
>   I am trying to produce a 3D set of point light sources which the camera can
> view.
> Imagine that they were 10 or so stars in a Night Sky constellation. I know how
> to get the
> star coordinates etc etc, but have so far only used SPHERE as each object star.
> The spheres size is determined by distance from camera, but I don't want
> that...I want a small fixed size point of light for each coordinate star, that I
> can vary the brightness of (to mimic the abs mag of the star), and also the
> colour of each.
> 
> Any ideas...even if you just refer me to a tutorial !
> 
> Many Thanks
> Jezza
> 
> 
> 

First, you can never see a light source, so, that's not an option.

Place all of your «stars» at the same distance. That way, they can all 
be of the same size.
Next, it's just a mater of setting the brightness and colour.

You can use the aoi pattern. It's similar to the slope pattern, but the 
direction is relative to the direction at witch it is viewed.
Povray wiki page on that subject :
  http://wiki.povray.org/content/Reference:Aoi_Pattern

Make the spheres large enough that they cover a few pixel. Make the 
pigment black when viewed tangentially and the desired colour when 
viewed perpendicularly.
Now, if the colour get large, it will looks like more of the surface is 
coloured.

You don't need any light, just use emission with a value ranging from 0 
to 100 or even more in the finish.
Now, the pigment only need to define the actual colour and the emission 
will determine the brightness.

The final result can look similar to :
texture{
  pigment{
   aoi pigment_map{
     [0.02 Star_Colour]
     [0.5  rgb 0]
     }
   }
  }
  finish{ emission Bright diffuse 0 ambient 0}
}

Where Star_colour and Bright are previously defined values.



Alain


Post a reply to this message

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