Povray - Open Source --- MA_Skyfakes
Published: |
29.12.2024 |
Status: |
experimental |
This include-file contains simple and in most cases fast to render objects to make space-related sceneries more nice. A starfied, sun, planets and horizons from the viewpoint of an in-orbit spacecraft.
The number of objects will raise over time as I finish new ones.
Screenplay and Param
As others of my macro-packages now and in the future the most objects created here are compabitle to
Sreenplay and
MA_GetParam*(). So in most cases the first parameters belong to them.
Who dont know what do with them should them leave blank.
Example-Files
Included in the zip-package you will find the example-file
ma_skyfakes_examples.pov, which contains all of the here shown snippets that creates the pictures used in this documentation.
I will not explain all ways and parameters to modify the results - that are to many and their amount grows over time - so please have a look into the files if interested.
Examples
Container
For all following examples the next lines serves as container.
#version 3.7;
#include "colors.inc"
#include "ma_helpers.inc"
#include "ma_skyfakes.inc"
#include "ma_skyfakes_textures.inc"
#declare CamLocation = <0,2,-10>;
#declare CamLookAt = <0,0,0>;
#declare CamAngle = 60;
/* Fill in example-lines here */
MA_CameraAndLight_Set()
Starfield-Background
Simple Starfield-Background
The starfield creates a lightly white dotted background, to be used as pigment for the povray-element sky_sphere. The first parameter roughly stand for the number of stars or star-density, the second one for their size. Both parameters influcence the other, for nice results you should try a littlebit. Also the result depends on the choosen resolution of the resulting picture, so it can happen that smaller test-renderings looks a littlebit strange. Values ranging from 1 to 10 are remommended.
sky_sphere {
SF_BackgroundStars_Pigment(2,5)
}
Sun
Sun + Stars
As the starfield the sun also is a simple color gradient you have to insert into the sky_sphere. The gradient is on one small place light-yellow and in the remaining 99.9 % transparent.
Parameter:
- Size of the sun (with respect to the original, so "2" will result in a twice as big one)
- Size of her corona (with respect to the default-value)
- Rotation X-axis (+ to bottom, + to top)
- Rotation Y-axis (- to left, + to right)
sky_sphere {
SF_BackgroundStars_Pigment(2,5)
SF_BackgroundSun_Pigment(1, 1, 0, 0)
}
Planets
At the moment three different planets are available. The planet gets returned as ordinary sphere-objects with the size of one povray-unit, whereby rings and atmospheres will be bigger.
Create them by:
object { SF_Minshara1("","","") translate <-3,0,0> }
object { SF_Gasgiant1("","","") translate < 0,0,0> }
object { SF_Moon1 ("","","") translate <+3,0,0> }
Planetary Specials
Planets can be eqipped with thin atmospheres and a ringsystem. All of them created with help of the third parameter, which looks for the right param by using
MA_GetParam*().
object {
SF_Minshara1("","","atmo-type: simple-1;rings-type: saturn-1")
SF_Gasgiant1("","","atmo-type: simple-1;atmo-scattering-color: <0.9, 0.2, 0.2>")
}
Planetary Problems
The atmosphere is highly experimential, because I have no clue whats the best way to create it. Depending on distance and/or size of the object (and probably distance to camera/lightsource or whatever) the results can differ very much.
You can counteract with the params, but it will take some time maybe.
In the image the middle planet is unmodified at 20 PU distance to the camera.
The left and right ones are scaled by the factor 2500 and in 50000 units distance to show them on the same scale as the middle.
The atmosphere from the right one is unmodified, the left one was massively decreased to look like the middle one.
I will look for ways to do this automatically in the future, its on my list. Till then the atmosphere can be modified by the param "atmo-scattering-factor", as shown in the example. As bigger and/or farther away the planet is, the smaller the value has to be.
#declare LigVector = <10,0,-10>*100000;
#declare CamLocation = <0,0,-20>;
#declare CamAngle = 40;
object {
//Big size, big distance, low sc-factor
SF_Minshara1("","","atmo-type: simple-1; atmo-scattering-factor: 0.0120")
scale 2500
translate <-8000, 0, 50000>
}
object {
//Small size, small distance, high sc-factor
SF_Minshara1("","","atmo-type: simple-1; atmo-scattering-factor: 40")
scale 1
translate < 0, 0, 0>
}
object {
//Big size, big distance, low sc-factor, much to light
SF_Minshara1("","","atmo-type: simple-1; atmo-scattering-factor: 40")
scale 2500
translate <+8000, 0, 50000>
}
Horizons
Horizont-1
Horizons are more or less planets/spheres, returned in very big size and placed near the camera. On this way you get what looks like a planet viewed from a low orbit.
The 4th parameter defines where the horizont has to appear (l,t,r,b). The vector (5th parameter) should be used to find a nice place on the planet. Be carefull with it, even a tenth of a degree will show different locations.
#declare CamLocation = <3,3,-10>;
object {
SF_GetHorizon1 ( "", "", "", "b", <0,10,0>)
}
Problem: Camera-Parameter
UWA and perspective
In this case there are two usefull camera-types:
perspective (default) and
ultra_wide_angle.
When a big camera-angle is used (> 70 degree),
ultra_wide_angle is the best for sun and planets, because
perspective will deform round objects in the edges of the image. For horizons it can result in opposite effects, maybe you should use
ultra_wide_angle instead.
The anim-gif on the right shows the more flat horizon and bigger planet when
ultra_wide_angle is used.
See also:
http://povray.org/documentation/3.7.0/r3_4.html#r3_4_2_2
http://povray.org/documentation/3.7.0/r3_4.html#r3_4_2_1_3
https://en.wikipedia.org/wiki/Visual_field
I am not sure which type when should be used and whats the way to handle this problem for all uses. Big camera-angle and round objects in the edges maybe in no case is a good idea.
In my example its an easy decision because we dont need a sun when the light does come from the right. For the final picture a camera-angle of 60 degrees was choosen, the sun was removed and a small
spacecraft inserted.
Download
ma_skyfakes.7z => 1.5 MB 7-Zip, Version 1.0 from 29th December 2024