|
|
UPDATE
Habitat was filled with air.
Problem:
while it looks acceptably good on the daytime side, the sunset side
misses a lot of those colors, and the nighttime side is also wrong.
Please have a try on your own and help, if you got some ideas. Thanks.
Scene Code ---------------------------------------------------------
#version 3.7;
#include "macros.inc"
#include "shapes.inc"
#declare MyRadiosity = on; // on or off
#declare MediumRadiosity = on;
#declare FastRadiosity = off;
#declare CameraDaytime = on;
#declare CameraSunset = off; // Problem: doesn't look like sunset
#declare CameraNighttime = off; // Problem: doesn't look like sunset
#declare CameraOutside = off;
global_settings
{
#if(MyRadiosity)
radiosity
{
media on
pretrace_start 0.08
#if(FastRadiosity)
pretrace_end 0.015
#elseif(MediumRadiosity)
pretrace_end 0.008
#else
pretrace_end 0.001
#end
count 400
error_bound 0.75
recursion_limit 1
}
#end
adc_bailout 0.0039
ambient_light rgb < 1.000, 1.000, 1.000 >
assumed_gamma 1.000
irid_wavelength rgb < 0.250, 0.180, 0.140 >
max_trace_level 5
number_of_waves 10
noise_generator 3
charset ascii
}
#default { pigment { rgb 1.0 } finish { ambient 0.0 specular 1.0 } }
#if(CameraDaytime)
camera // Daytime Position Inside
{
location < 0.0, -1400.0, 100.0 >
look_at < 0.0, -1400.0, 200.0 >
right 1.77*x
}
#elseif(CameraSunset)
camera // Sunset Position Inside
{
location < 1400.0, 0.0, 100.0 >
look_at < 1400.0, 0.0, 200.0 >
right 1.77*x
}
#elseif(CameraNighttime)
camera // Nighttime Position Inside
{
location < 0.0, 1400.0, 100.0 >
look_at < 0.0, 1400.0, 200.0 >
right 1.77*x
}
#elseif(CameraOutside)
camera // Outside
{
location < -5000.0, 5000.0, -5000.0 >
look_at < 0.0, 0.0, 0.0 >
right 1.77*x
}
#end
#declare Seed=seed(441);
#if(CameraOutside)
light_source
{
< -10000.0, 10000.0, 10000.0 >
color rgb < 1.0, 1.0, 1.0 >
}
#end
/*
#declare LightDistance = -253.1;
#declare LightWidth = 50.0;
#declare MyRadius = 5;
#declare MyTightness = 50;
#declare MyFalloff = 80;
#declare MyLightMultiplicator = 0.007;
#declare LightSectionHalf = union
{
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 spotlight point_at < 000.0, -1500.0,
0.0 > radius 10 tightness 10 falloff 20 rotate < 0.0, 0.0, 2.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 spotlight point_at < 050.0, -1350.0,
0.0 > radius 10 tightness 10 falloff 20 rotate < 0.0, 0.0, 2.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 spotlight point_at < 100.0, -0950.0,
0.0 > radius 10 tightness 10 falloff 20 rotate < 0.0, 0.0, 2.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 spotlight point_at < 150.0, -0700.0,
0.0 > radius 10 tightness 10 falloff 20 rotate < 0.0, 0.0, 2.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 spotlight point_at < 175.0, -0600.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 5.0 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.88627,
0.50196 > * MyLightMultiplicator*05 spotlight point_at < 200.0, -0550.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 7.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.69412,
0.28235 > * MyLightMultiplicator*04 spotlight point_at < 225.0, -0500.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 10.0 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.99608, 0.35686,
0.08627 > * MyLightMultiplicator*04 spotlight point_at < 250.0, -0450.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 12.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.76863, 0.27059,
0.05882 > * MyLightMultiplicator*04 spotlight point_at < 275.0, -0400.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 15.0 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.54902, 0.10980,
0.10980 > * MyLightMultiplicator*03 spotlight point_at < 300.0, -0350.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 17.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.43922, 0.09412,
0.16078 > * MyLightMultiplicator*03 spotlight point_at < 325.0, -0300.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 20.0 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.31373, 0.07843,
0.14902 > * MyLightMultiplicator*02 spotlight point_at < 350.0, -0250.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 22.5 > }
light_source { < 0.0, LightDistance, 0.0 > rgb < 0.15294, 0.04706,
0.10588 > * MyLightMultiplicator*02 spotlight point_at < 375.0, -0200.0,
0.0 > radius MyRadius tightness MyTightness falloff MyFalloff rotate <
0.0, 0.0, 25.0 > }
}
#declare LightSection = union
{
object { LightSectionHalf scale < 1.0, 1.0, 1.0 > }
object { LightSectionHalf scale < -1.0, 1.0, 1.0 > }
}
#declare RundeLight = 50.0;
#while(RundeLight<4950.0)
object { LightSection translate < 0.0, 0.0, RundeLight > }
#declare RundeLight = RundeLight+50.0;
#end
*/
// ---------------------------------------------------
#macro
RoundCilinderSegment(StartHeight,EindHeight,Radius,StartHoek,EindHoek,Bevel,BevelHeight,MaxLength)
#local Start=y*(StartHeight+Bevel);
#local Eind=y*(EindHeight-Bevel);
#local Start2=y*StartHeight;
#local Eind2=y*EindHeight;
#local StartHoek2=StartHoek+degrees(Bevel/Radius);
#local EindHoek2=EindHoek-degrees(Bevel/Radius);
#local TotaleLengte=radians(EindHoek-StartHoek)*(Radius+BevelHeight);
#local Aantal=max(int(TotaleLengte/MaxLength),1);
#local Tel=0;
mesh {
triangle {
vrotate(<Radius,StartHeight,0>,y*StartHoek),
vrotate(<Radius,EindHeight,0>,y*StartHoek),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*StartHoek2)
}
triangle {
vrotate(<Radius,EindHeight,0>,y*StartHoek),
vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*StartHoek2),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*StartHoek2)
}
triangle {
vrotate(<Radius,EindHeight,0>,y*StartHoek),
vrotate(<Radius,EindHeight,0>,y*StartHoek2),
vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*StartHoek2)
}
triangle {
vrotate(<Radius,StartHeight,0>,y*StartHoek),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*StartHoek2),
vrotate(<Radius,StartHeight,0>,y*StartHoek2)
}
triangle {
vrotate(<Radius,StartHeight,0>,y*EindHoek),
vrotate(<Radius,EindHeight,0>,y*EindHoek),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*EindHoek2)
}
triangle {
vrotate(<Radius,EindHeight,0>,y*EindHoek),
vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*EindHoek2),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*EindHoek2)
}
triangle {
vrotate(<Radius,EindHeight,0>,y*EindHoek),
vrotate(<Radius,EindHeight,0>,y*EindHoek2),
vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*EindHoek2)
}
triangle {
vrotate(<Radius,StartHeight,0>,y*EindHoek),
vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*EindHoek2),
vrotate(<Radius,StartHeight,0>,y*EindHoek2)
}
#while (Tel<Aantal)
#local H1=StartHoek2+(EindHoek2-StartHoek2)*(Tel/Aantal);
#local H2=StartHoek2+(EindHoek2-StartHoek2)*((Tel+1)/Aantal);
#local P1=vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*H1);
#local P2=vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*H1);
#local P3=vrotate(<Radius+BevelHeight,EindHeight-Bevel,0>,y*H2);
#local P4=vrotate(<Radius+BevelHeight,StartHeight+Bevel,0>,y*H2);
#local N1=vrotate(x,y*H1);
#local N2=vrotate(x,y*H2);
smooth_triangle {P1,N1,P2,N1,P4,N2}
smooth_triangle {P2,N1,P3,N2,P4,N2}
//triangle {P1,P2,P4}
//triangle {P2,P3,P4}
#local P2B=vrotate(<Radius,EindHeight,0>,y*H1);
#local P3B=vrotate(<Radius,EindHeight,0>,y*H2);
triangle {P2,P2B,P3}
triangle {P2B,P3B,P3}
#local P2B=vrotate(<Radius,StartHeight,0>,y*H2);
#local P3B=vrotate(<Radius,StartHeight,0>,y*H1);
triangle {P2B,P1,P3B}
triangle {P1,P4,P2B}
#local Tel=Tel+1;
#end
}
#end
#macro Verlaag(X)
#local R=X-(1+rand(Seed)*2.5);
R
#end
#macro
CilinderGreeble(StartHeight,EindHeight,Radius,StartHoek,EindHoek,Bevel,BevelHeight,MaxLength,Detail)
#local Start=(StartHeight+Bevel);
#local Eind=(EindHeight-Bevel);
#local StartH=StartHoek+degrees(Bevel/Radius);
#local EindH=EindHoek-degrees(Bevel/Radius);
//cilindertjes:
#local Aantal=rand(Seed)*Detail;
#while (Aantal>0)
#local Size=(Bevel*.01)+rand(Seed)*Bevel*.99*2;
#local Hoek=StartH+(EindH-StartH)*rand(Seed);
#local Hoogte=Start+(Eind-Start)*rand(Seed);
#local Depth=BevelHeight/2+rand(Seed)*BevelHeight/2;
superellipsoid {<1,.1+rand(Seed)*.3> rotate y*90 scale
<Depth,Size,Size> translate x*Radius rotate y*Hoek translate y*Hoogte}
#local Aantal=Aantal-1;
#end
//vakjes:
#local Aantal=rand(Seed)*Detail;
#while (Aantal>0)
#local S=Start+(Eind-Start)*rand(Seed);
#local E=S+(Eind-S)*rand(Seed);
#local SH=StartH+(EindH-StartH)*rand(Seed);
#local EH=SH+(EindH-SH)*rand(Seed);
#local H=BevelHeight/2+rand(Seed)*BevelHeight/2;
RoundCilinderSegment(S,E,Radius,SH,EH,Bevel/2,H,AantalStapjes)
#local Aantal=Aantal-1;
#end
//verticale buisjes
#local Aantal=rand(Seed)*Detail;
#while (Aantal>0)
#local S=Start+(Eind-Start)*rand(Seed);
#local E=S+(Eind-S)*rand(Seed);
#local SH=StartH+(EindH-StartH)*rand(Seed);
//#local EH=SH+(EindH-SH)*rand(Seed);
#local H=(BevelHeight/2+rand(Seed)*BevelHeight/2)/2;
//RoundCilinderSegment(S,E,Radius,SH,EH,Bevel/2,H,AantalStapjes)
cylinder {y*S,y*E,H translate x*Radius rotate y*SH}
sphere {y*S,H translate x*Radius rotate y*SH}
sphere {y*E,H translate x*Radius rotate y*SH}
#local Aantal=Aantal-1;
#end
//horizontale buisjes simuleren, toruskes zouden wsl te traag gaan
#local Aantal=rand(Seed)*Detail;
#while (Aantal>0)
#local S=Start+(Eind-Start)*rand(Seed);
#local H=BevelHeight/2+rand(Seed)*BevelHeight/2;
#local H=min((Eind-S),H*2)/2;
#local E=S+H*2;
#local SH=StartH+(EindH-StartH)*rand(Seed);
#local EH=SH+(EindH-SH)*rand(Seed);
RoundCilinderSegment(S,E,Radius,SH,EH,H,H,AantalStapjes)
#local Aantal=Aantal-1;
#end
#end
#macro
VerdeelCilinder(StartHeight,EindHeight,Radius,StartHoek,EindHoek,Diepte,Bevel,BevelHeight)
#local Start=y*(StartHeight+Bevel);
#local Eind=y*(EindHeight-Bevel);
#local Start2=y*StartHeight;
#local Eind2=y*EindHeight;
#if (Diepte<0)
#ifndef(Detail) #local Detail=5; #end
#local H=rand(Seed)*BevelHeight;
#ifndef(MaxSegmentLength) #local AantalStapjes=Bevel; //(eigenlijk de
maximale lengte van een segment)
#else #local AantalStapjes= MaxSegmentLength; #end
RoundCilinderSegment(StartHeight,EindHeight,Radius,StartHoek,EindHoek,Bevel,H,AantalStapjes)
CilinderGreeble(StartHeight,EindHeight,Radius+H,StartHoek,EindHoek,Bevel,H,AantalStapjes,Detail)
#else
// eerst es checken of 't nie onvoorstelbaar ongelijk verdeeld is:
#local Lengte=radians(EindHoek-StartHoek)*Radius;
#local Hoogte=EindHeight-StartHeight;
#local PercentageU=.5+(rand(Seed)-rand(Seed))*.5*.9;
#local PercentageV=.5+(rand(Seed)-rand(Seed))*.5*.9;
#local MidHeight=StartHeight+(EindHeight-StartHeight)*PercentageU;
#local MidHoek=StartHoek+(EindHoek-StartHoek)*PercentageV;
// als't 2 keer zo hoog als breed is (of nog hoger), dan ff enkel in
de hoogte bijsnijden:
#if ((Hoogte>(Lengte*2))&(rand(Seed)>.125))
VerdeelCilinder(StartHeight,MidHeight,Radius,StartHoek,EindHoek,Verlaag(Diepte),Bevel,BevelHeight)
VerdeelCilinder(MidHeight,EindHeight,Radius,StartHoek,EindHoek,Verlaag(Diepte),Bevel,BevelHeight)
// als't 2 keer lager dan breed is (of nog lager), dan ff enkel in de
breedte bijsnijden:
#else
#if (((Hoogte*2)<Lengte)&(rand(Seed)>.125))
VerdeelCilinder(StartHeight,EindHeight,Radius,StartHoek,MidHoek,Verlaag(Diepte),Bevel,BevelHeight)
VerdeelCilinder(StartHeight,EindHeight,Radius,MidHoek,EindHoek,Verlaag(Diepte),Bevel,BevelHeight)
#else
VerdeelCilinder(StartHeight,MidHeight,Radius,StartHoek,MidHoek,Verlaag(Diepte),Bevel,BevelHeight)
VerdeelCilinder(MidHeight,EindHeight,Radius,StartHoek,MidHoek,Verlaag(Diepte),Bevel,BevelHeight)
VerdeelCilinder(StartHeight,MidHeight,Radius,MidHoek,EindHoek,Verlaag(Diepte),Bevel,BevelHeight)
VerdeelCilinder(MidHeight,EindHeight,Radius,MidHoek,EindHoek,Verlaag(Diepte),Bevel,BevelHeight)
#end
#end
#end
#end
//#include "textures.inc"
#declare HabitatOutside = union
{
#declare Detail=5;
#declare MaxSegmentLength=.1;
VerdeelCilinder(-3,3,1,0,360,10,.002,.0075)
cylinder {-3*y,3*y,1}
//Metaal()
rotate < 90.0, 0.0, 0.0 >
translate < 0.0, 0.0, 3.0 >
scale < 1.0*1600.0, 1.0*1600.0, (1.0/6.0)*5200.0 >
translate < 0.0, 0.0, -100.0 >
}
#declare Backbone = union
{
#declare Detail=5;
#declare MaxSegmentLength=.1;
VerdeelCilinder(-3,3,1,0,360,10,.002,.0075)
cylinder {-3*y,3*y,1}
//Metaal()
rotate < 90.0, 0.0, 0.0 >
translate < 0.0, 0.0, 3.0 >
scale < 750.0, 750.0, (1.0/6.0)*5000.0 >
translate < 0.0, 0.0, 0.0 >
}
#declare MyLight = difference // Backbone Light
{
cylinder { < 0.0, 0.0, 0.0 > < 0.0, 0.0, 5000.0 > 760.0 }
box { < -760.1, 0.0, -0.1 > < 760.1, 760.1, 5000.1 > }
pigment
{
gradient x
color_map
{
[ 0.00 rgb < 0.00000, 0.00000, 0.00000 > * 1 ]
[ 0.05 rgb < 0.15294, 0.04706, 0.10588 > * 1 ]
[ 0.10 rgb < 0.31373, 0.07843, 0.14902 > * 1 ]
[ 0.30 rgb < 1.00000, 0.69412, 0.28235 > * 1 ]
[ 0.425 rgb < 1.00000, 0.98824, 0.88235 >* 2 ]
[ 0.575 rgb < 1.00000, 0.98824, 0.88235 >* 2 ]
[ 0.70 rgb < 1.00000, 0.69412, 0.28235 > * 1 ]
[ 0.90 rgb < 0.31373, 0.07843, 0.14902 > * 1 ]
[ 0.95 rgb < 0.15294, 0.04706, 0.10588 > * 1 ]
[ 1.00 rgb < 0.00000, 0.00000, 0.00000 > * 1 ]
}
translate < -0.5, 0.0, 0.0 >
scale < 1520.0, 1.0, 1.0 >
}
finish { emission 1.0 }
translate < 0.0, -10.0, 0.0 >
}
#declare MyAtmosphere = cylinder // Air
{
< 0.0, 0.0, 0.0 > < 0.0, 0.0, 5000.0 > 1500.0
pigment { rgbt < 1.0, 1.0, 1.0, 1.0 > }
hollow
interior
{
fade_colour < 0.4, 0.66, 0.9 >
fade_distance 5000.0
fade_power 1001
media
{
emission 0.0005
density
{
gradient y
density_map
{
[ 0.0 rgb < 0.5, 0.7, 1.0 > * 0.1 ]
[ 0.4 rgb < 0.5, 0.7, 1.0 > ]
[ 0.5 rgb < 0.5, 0.7, 1.0 > ]
[ 1.0 rgb < 0.0, 0.0, 0.0 > ]
}
translate < 0.0, -0.5, 0.0 >
scale < 3000.0, 3000.0, 1.0 >
}
// absorption 1000.0
/* scattering
{
1
< 0.5, 0.7, 1.0 >
extinction 1.0
} */
}
}
}
#declare Fn_1 = function(x,y,z)
{
1-(-f_snoise3d(x*5,y*3,z*5)*0.8)
}
#declare TheLandscape = object
{
HF_Cylinder( Fn_1, // Function,
0, // UseUVheight: 0 or 1
1, // UseUVtexture: 0 or 1
<50,50>, // Resolution,
1, // Smooth: 0 or 1
"", // FileName, ""=no file,
<0,0,0>, // EndA,
<0,1.5,0>, // EndB
1.60 ,// Radius
0.05 // Depth
) //-------------------------
scale < 0.58, 0.67, 0.58 >
rotate < 90.0, 0.0, 0.0 >
scale < 1500.0, 1500.0, 2500.0 >
}
#declare MyLandscape = union
{
object { TheLandscape scale < 1.0, 1.0, 1.0 > translate < 0.0, 0.0,
0000.0 > }
object { TheLandscape scale < 1.0, 1.0, -1.0 > translate < 0.0, 0.0,
5000.0 > }
pigment { rgb < 0.05, 0.25, 0.0 > }
finish { emission 0.0 }
}
#declare MyWaterLevel = 1440.0;
#declare fn_pattern = function
{
pattern { bozo scale 0.15 }
}
#declare fn_water = function
{
z - fn_pattern(x, y, 0)*0.25
}
#declare MyWater = difference // Water
{
cylinder { < 0.0, 0.0, 0.0 > < 0.0, 0.0, 5000.0 > 1500.0 }
cylinder { < 0.0, 0.0, -0.1 > < 0.0, 0.0, 5000.1 > MyWaterLevel }
material
{
texture
{
pigment { color rgbt < 0.2, 0.7, 0.3, 0.5 > }
finish
{
ambient 0.0
diffuse 0.0
emission 0.0
reflection
{
0.0, 1.0
falloff 5
fresnel on
}
specular 0.4
roughness 0.003
}
normal
{
function { f_ridged_mf(x, y, z, 0.1, 3.0, 7, 0.7, 0.7, 2) } 0.8
scale 0.13
}
}
interior
{
ior 1.3
fade_distance 10
fade_power 1001
fade_color < 0.8, 0.2, 0.2, 0.5 >
media
{
// absorption < 0.8, 0.6, 1.0, 0.5 >
scattering
{
3
< 0.5, 0.65, 0.4 >
extinction 1.0
}
}
}
}
normal
{
function { f_ridged_mf(x, y, z, 0.1, 3.0, 7, 0.7, 0.7, 2) }
0.8
scale < 0.13, 0.4, 0.13 >
}
}
object { HabitatOutside hollow }
object { Backbone hollow }
object { MyLight }
object { MyAtmosphere }
object { MyLandscape }
object { MyWater }
Post a reply to this message
Attachments:
Download 'sl - colony ship i.png' (106 KB)
Preview of image 'sl - colony ship i.png'
|
|