A sunset
From Picogen-doc

Contents |
A simple sunset
Description
This is one of the most simple scenes possible with picogen.
Either proceed by following this tutorial, or download the scene-file at [1] and dig and try.
How To
Open picogen-simplex or create a new file by clicking File->New or by pressing [ctrl] + n.
Objects
Then right-click somewhere onto the property-editor on the left, and select New Object -> Water Plane; this will add a simple graphics primitive which is reflective like a mirror, but which can fake a bumpy surface. By default, a water-like fake-bumpy-surface is used, hence the name. Start a first test rendering by clicking Render -> Render in the main menu, or by clicking the green arrow on the lower right of the application, or by pressing [ctrl] + F5, and you'll see:

The Film
By default, the resulting image is converted to SRGB-Colours. By doing so, the large range of brightnesses found in real-life outdoor scenes will be mapped better to our limited computer screens. But anyway, it can also wash off a bit of the saturation of colours and possibly give undesired results. We will now try out our scene with SRGB-conversion disabled:
- Open the film-settings-property on the left
- Disable the convert-to-srgb flag
- Start another rendering by clicking Render -> Render in the main menu, or by clicking the green arrow on the lower right of the application, or by pressing [ctrl] + F5
We will see nothing now:

This is because without the SRGB-conversion, the very large brightness of the image does simply not fit onto our screen anymore. Now, edit the value color-scale directly below. For that property, bigger values result in brighter images, lower values result in darker ones. A purely white image as we just got is of course too bright, so try out significantly smaller color-scales (significantly means: divide the current color-scale by 1000, for starters). For our image, we will use a color-scale of 0.00009 (four 0's followed by a 9 ;)). Kick off another rendering:

This is better for now.
Camera
In picogen-simplex, every camera does describe both, the camera itself, and the position of it in the world. So, open up the cameras property on the left. You will see that, by default, a camera titled "hello-world" is installed. It is a so-called pinhole-camera, which is highly related to the real-world pinhole-camera.
Picogen does allow you to install arbitrary many cameras, which serves the purpose of being able to save multiple interesting positions in the world.
A pinhole camera in picogen has the parameter front : Larger values will let you zoom into objects, smaller values will let you zoom away (more specifically, front is the distance of the image-plane to the hole in the pinhole camera). For our scene, we will just use the default value "1.0", which is a good value for most scenes.
Every camera has a transform property, which will describe the position and orientation of the camera. That transform consists of arbitrary many sub-transforms, which means that you can give a rough guess on position and orientation, and then for example move straight forward, without having to destroy your initial guess. By default, a transform consists of a simple position sub-transform called move, and three more sub-transforms which describe yaw ("looking left and right"), pitch ("looking up and down"), and roll ("spinning left or right and making a handstand").
For fun, let us fly high: Open the move sub-transform, and enter a big value like 1050 into the up-property, and do a rendering again:

But now let us return to the water: Enter "1.0" into the up-property.
That's a lot of noise over there in our ocean! We will take care of that later. For now, let us have a first look at picogen's atmosphere.
Atmosphere
The atmosphere is part of the backgrounds-system of picogen. In version 0.3, there is only the pss-sunsky background available, but later version might introduce additional backgrounds like for example a star-hemisphere. The pss in pss-sunsky is for Preetham, Shirley, Smits, who are the authors of the scientific paper A practical analytic model for daylight, upon which picogen's sky is based.
Open up the backgrounds-property, and then pss-sunsky. You will see a plethora of tweakable parameters. The most important ones are the turbidity parameter, which describes the amount of dust and other particles in the atmosphere (and which thus enables you to have e.g. a clear blue sky or a really moody reddish sunset), and of course the direction of the sun below sun-direction.
Small values of turbidity, e.g. 2, yield clear skies. Larger values, e.g. 5 or even 10, yield dense atmospheres with reddish skies.
Sunset and sunrise situations correspond to sun-directions where up is low in relation to right and forward, noon situations correspond to larger up's.
We are looking for a sunset-situation, so give up a value of 0.15, and forward 1.0:

We also want a moodier atmosphere, so give turbidity a value of 5.0:

If that image is to dark for your taste, go back to the film-settings, and slightly tweak the color-scale (try out 0.00012, for instance).
It is "unfortunate" (for our rendering purposes, that is) that the sun-disk is so small on images, even though in real-life it appears bigger to us (you can observe that "effect" when you try to capture a nice photograph of a sunset, just to realise later that you should have zoomed in some more). Thus, pss-sunsky has a property called sun-size-factor, which lets you tweak the size of the sun-disk (a value of 2 would double the radius). Be greedy and try out a value of 150:

By increasing the size we have left the realm of reality already, so nobody would mind if we make the sun a bit brighter. You can use the sun-brightness-factor to achieve this; enter a value of 15, which will make it (you guess it) 15 times brighter:

Moody! (And this even though picogen does not yet have support for a realistic sun appearance in itself, all this are the consequences of only the atmosphere-model in use)
Render-Settings
Finally, we will see how to reduce the noise and set our final image resolution.
A render-setting describes
- the dimensions of the image, i.e. width and height
- the number of samples per pixel, i.e. how many "virtual pixels" compose a screen pixel, which affects anit aliasing and noise reduction (of course, larger values give worse render times, but higher quality)
- the surface integrator to use:
- none results in no objects being drawn
- whitted is fast, but only gives direct lighting on objects
- redshift is a tad slower, but will give you a form of ambient lighting on objects (technically, sky/background-samples around the hemisphere of each intersection are taken)
- the volume integrator to use:
- none results in no volumes at all (the default)
- emission gives volumes, but no "light shafts"
- single gives volumes and first order "light shafts"
There are some more settings, but for now you can ignore them, they are of minor importance for most situations.
Further, every scene can have arbitrary many render-settings, which serves the purpose of being able to define preview and production configurations. By default, two render-settings are added: preview and production (you can add more and of course delete them again by right-clicking onto them and then delete), inspect them and you'll see that the production one sets a higher image-size, more samples per pixel, uses the redshift integrator, and sets a smaller step-size for volume-marching (the latter is the topic of another tutorial). On the lower right of the GUI you can select the current configuration to be used for the next rendering.
Let us make a widescreen image by setting render-settings -> preview -> width to 320, and ... -> height to 128.

Let us also test how the image looks like with 10 samples per pixel:

There is still noise, but it has been significantly reduced. For real production renderings, values of 30 or more (sometimes I use 80) can be used.
Rollout
Now get over to your production render setting, set you favoured resolution (for me that would be 1680x560, I totally love 3:1 aspect ratio), set your sample count to like 30, but then wait for a second: Picogen does not only allow you to do your renderings inside the simplex-gui, but you can also open a whole new process and liberate your final rendering from the application. This makes it a bit nicer to look at the overall rendering process as the limit is your real computer screen, and you can shut-down the GUI, thus reducing the danger of cats and dogs running over the keyboard, reverting your edits.
To do so, either select in the main-menu Render -> Production Render, or just hit F6. One final note: Doing a production render does not automagically select your production-render-settings, so again, select your render-setting manually before doing the production-render, and reap:

Scene-File
Copy+Paste below into a local text-file, or right click [this link] and hit Save as.
scene{ render-settings{ preview{ width:320; height:128; min-y:0; max-y:1048575; seed:0; samples-per-pixel:10; surface-integrator{ type:whitted; } } production{ width:1680; height:600; min-y:0; max-y:1048575; seed:0; samples-per-pixel:20; surface-integrator{ type:whitted; } } } cameras{ hello-world{ transform{ move{ 0; 1050; 0; } yaw{ 0; } pitch{ 0; } roll{ 0; } } type:pinhole; front:1; } } objects{ water-plane{ code:(* 0.1 (- 1 ([LibnoiseBillow frequency{0.1} octave-count{10} persistence{0.5} ] x y) ) ); height:0; material{ color{ type:rgb; rgb{ 1; 1; 1; } } } } } volumes{ } backgrounds{ pss-sunsky{ sun-direction{ 0; 0.15; 1; } sun-size-factor:150; sun-brightness-factor:15; atmosphere-brightness-factor:1; atmospheric-effects-distance-factor:1; atmospheric-effects:1; turbidity:5; overcast:0; } } film-settings{ color-scale:9e-05; convert-to-srgb:0; } }