The skyish planet terminator problem

Helpdesk Real 3D Main area

Planetary scenes have always been a problem for Real3D due to the fact that you can not set the material so that the terminator (the line between lit and unlit parts of a planet) appears sharp. One way around this problem is to add a non shadowcasting 179 degree spotlight inside the planet, set the planet material just a little bit transparent (since brilliancy is set to zero, it is impossible to actually see through it), and the terminator can be controlled by adjusting the spotfade value of the light. Now comes the problem... adding skyes. The ‘normal’ way of adding skyes would be to create a second sphere, just a little big larger, and noisemap a transparency/brilliancy level onto the sphere, so that there would be areas that are totally transparent and the rest would be white. This is not what happens when you try it off course.

The approach to get a nice cloudy planet with a sharp terminator

NormalShaded WithTerminator NormalClouds
Fig. 1. This show what a normal shaded globe with no clouds would look like. Fig. 2. Here I use a spotlight to simulate the sharp terminator. The main light has been dimmed down and surface is now a little transparent. Fig. 3. The same as fig. 1 but with a secondary object with noisy clouds.
TerminatorClouds CloudScope NoiseMapped
Fig. 4. Same as fig. 2 but with a secondary object with noisy clouds. This does not look good at all. Fig. 5. Now this is a bit different from the previous ones. Spotlight creates a nice and sharp terminator, but the sky is made by replacing the object color with white using scope. If the replacement factor was 100, we would get a 50/50 mix (blending), so I turned the factor up to 500. Fig. 6. The same as fig. 5 but I have now added 'normal' noise in the mapping handler. Actual values are a=0.07 and b=0.7. Also color of the sky has been changed to show that it doesn't filter the original color.

Above is a few pictures to illustrate the way to get pretty convincing clouds to a planet, in this case the planet Earth. The common thing about all these pictures is the Scope RPL handler, which is a single line like this:

relx FFETCH 0.1 F* rely FFETCH 0.25 F* relz FFETCH 0.1 F* 0.37 0.65 3.5 8 NOISE 100.0 F* s FSTORE DROP DROP
What this actually does is this: The relx FFETCH 0.1 F* fetches the x component of the vector needed. Y and z are also fetched but notice that the rely is multiplied with a larger number. This is to achive greater variations along the y axis. What happens next is the settings for the noise function, which is 0.37 for minimun clip, 0.65 for maximum clip, 3.5 in variations (rapid), and 8 in octaves (noise frequencies). What clipping achieves is to make larger constant areas of either cloudy or clear patches. More on how to use noise on playing with noise.
Helpdesk Real 3D Main area