|
|
I am attempting, largely through trial and error, to make a scene including
the entire solar system. So far, I have a starfield background and a sun (a
sphere containing light emitting media).
Code to get me this is:
#include "colors.inc"
#include "textures.inc"
#include "stars.inc"
camera
{
location <0, 0, -1000>
look_at <0, 0, 0>
}
sphere // transparent sphere containing media
{ <0,0,0> 1
/*texture
{
pigment {
crackle scale 100 turbulence 100
color_map {
[0.0 rgbf <1, 0, 0, 0.1>]
[0.2 rgbf <1, 0.85, 0, 0.4>]
[0.7 rgbf <1, 0.75, 0, 0.7>]
[1 rgbf <1, 1, 0, 0.4>]
}
}
}*/
pigment {rgbt 1} hollow
interior
{ media
{ emission 20
density
{ spherical density_map
{ [0 rgb 0]
//[0.4 rgb <1,0,0>]
[0.8 rgb <1,1,0>]
[1 rgb 1]
}
}
}
}
scale 80
}
sky_sphere
{
pigment {
granite
color_map {
[ 0.000 0.270 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.270 0.290 color rgb <.5,.5,.4> color rgb <.8,.8,.4> ]
[ 0.290 0.470 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.470 0.490 color rgb <.4,.4,.5> color rgb <.4,.4,.8> ]
[ 0.490 0.680 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.680 0.700 color rgb <.5,.4,.4> color rgb <.8,.4,.4> ]
[ 0.700 0.880 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.880 0.900 color rgb <.5,.5,.5> color rgb < 1, 1, 1> ]
[ 0.900 1.000 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
}
turbulence 1
sine_wave
scale .5
}
scale 0.1
}
The pigment in the sky sphere is taken from the stars.inc file. I am also
messing around with a 'crackle' effect to get that slightly broken look on
the sun, but it doesnt look very good so i have commented it out.
Before I move onto the other planets, I want to make the sun have a flare. I
pursuit of this I have been trying to use NKFlare, but I really _can't_ get
the damm thing to work.
I have followed all the instructions (.flr file and nkflare.inc in the
include folder, added this to the library path, .flr files and .inc file in
the same directory as my source file) and included the appropriate
variables and include files. My code now looks like this:
#include "colors.inc"
#include "textures.inc"
#include "stars.inc"
#include "nkflare.inc"
#include "space2.flr"
camera
{
location <0, 0, -1000>
look_at <0, 0, 0>
}
#declare cam_loc = <0, 0, -1000> // use the x, y, and z of your camera
#declare light_loc = <0,0,0> // use the x, y, and z of the light
// you wish to flare
#declare lookat = <0, 0, 0> // the look_at vector of your camera
#declare sky_vect = <0,1,0>
sphere // transparent sphere containing media
{ <0,0,0> 1
/*texture
{
pigment {
crackle scale 100 turbulence 100
color_map {
[0.0 rgbf <1, 0, 0, 0.1>]
[0.2 rgbf <1, 0.85, 0, 0.4>]
[0.7 rgbf <1, 0.75, 0, 0.7>]
[1 rgbf <1, 1, 0, 0.4>]
}
}
}*/
pigment {rgbt 1} hollow
interior
{ media
{ emission 20
density
{ spherical density_map
{ [0 rgb 0]
//[0.4 rgb <1,0,0>]
[0.8 rgb <1,1,0>]
[1 rgb 1]
}
}
}
}
scale 80
}
sky_sphere
{
pigment {
granite
color_map {
[ 0.000 0.270 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.270 0.290 color rgb <.5,.5,.4> color rgb <.8,.8,.4> ]
[ 0.290 0.470 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.470 0.490 color rgb <.4,.4,.5> color rgb <.4,.4,.8> ]
[ 0.490 0.680 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.680 0.700 color rgb <.5,.4,.4> color rgb <.8,.4,.4> ]
[ 0.700 0.880 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
[ 0.880 0.900 color rgb <.5,.5,.5> color rgb < 1, 1, 1> ]
[ 0.900 1.000 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
}
turbulence 1
sine_wave
scale .5
}
scale 0.1
}
I have been messing around with the scale a bit (hence scale 80 on the
sphere).
Anyway, when I try to render this POV-Ray jumps to the nkflare.inc file, and
hihlights the line
#local lf_2light = cam_loc - light_loc;
and says (at the bottom) "Parse Error: Cannot initialise uninitialised
identifier"
Can anyone help me to get this to work? It would be much appreciated.
I am using POV-Ray 3.6 for Windows, and this is my third day of POV-Ray.
Thanks
PS sorry about the length of the post
Post a reply to this message
|
|