POV-Ray : Newsgroups : povray.general : Wanted: Air and Water Server Time
10 Oct 2026 12:29:53 EDT (-0400)
  Wanted: Air and Water (Message 1 to 50 of 51)  
Goto Latest 50 Messages Next 1 Messages >>>
From: Sven Littkowski
Subject: Wanted: Air and Water
Date: 10 Feb 2016 21:35:27
Message: <56bbf36f@news.povray.org>
Hi,

does anyone have a realistic way to simulate air and water?

For the air, it should make everything fading in distance to a air blue
and behave in all other ways also like atmosphere.

And the water should have transparency that becomes more bluish in
distance, simply like real water, too.

I intend to use both inside a cylinder, where the air would be in the
shape of a cylinder, and the water in the shape of a difference
(cylinder/cylinder).

Thanks a lot for your help.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 02:53:59
Message: <56bc3e17$1@news.povray.org>
On 11-2-2016 3:35, Sven Littkowski wrote:
> Hi,
>
> does anyone have a realistic way to simulate air and water?
>
> For the air, it should make everything fading in distance to a air blue
> and behave in all other ways also like atmosphere.
>
> And the water should have transparency that becomes more bluish in
> distance, simply like real water, too.
>
> I intend to use both inside a cylinder, where the air would be in the
> shape of a cylinder, and the water in the shape of a difference
> (cylinder/cylinder).
>
> Thanks a lot for your help.
>

The keyword for both is: media.

If you want to learn about POV-Ray, I suggest you first experiment 
deeply with the technique involved and then show us the results 
(successes and failures).

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 06:11:31
Message: <56bc6c63@news.povray.org>
Yes, I have used Media in a few cases before. But I find it hard, to
make it having the colors I want, and I indeed (here you're right) don't
have much understanding on how to work with it.

The media I need, would me of a cylindrical shape, thus I would create a
cylinder and fill it with media, that I know. But beyond that, there is
the vast void that I have to conquer, thus I need help to develop the
technologies for that. ;-)


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 07:21:43
Message: <56bc7cd7@news.povray.org>
On 2/11/2016 11:10 AM, Sven Littkowski wrote:
> Yes, I have used Media in a few cases before. But I find it hard, to
> make it having the colors I want, and I indeed (here you're right) don't
> have much understanding on how to work with it.
>
> The media I need, would me of a cylindrical shape, thus I would create a
> cylinder and fill it with media, that I know. But beyond that, there is
> the vast void that I have to conquer, thus I need help to develop the
> technologies for that. ;-)
>

You can only get a generalised help. From my experience every time I use 
media I have to relearn how to use it. It seems to me that each 
different usage requires different settings.

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 07:31:09
Message: <56bc7f0d$1@news.povray.org>
On 11-2-2016 12:10, Sven Littkowski wrote:
> Yes, I have used Media in a few cases before. But I find it hard, to
> make it having the colors I want, and I indeed (here you're right) don't
> have much understanding on how to work with it.
>
> The media I need, would me of a cylindrical shape, thus I would create a
> cylinder and fill it with media, that I know. But beyond that, there is
> the vast void that I have to conquer, thus I need help to develop the
> technologies for that. ;-)
>

As for the air, I would say that a scattering media with a slightly 
bluish tint would do the trick. Water is more tricky as it involves 
absorption (red I would guess) in addition to scattering.

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 07:45:06
Message: <56bc8252$1@news.povray.org>
Yes, that is exactly the reason, why I find it so difficult to use,
despite of the gains it has.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 07:45:58
Message: <56bc8286$1@news.povray.org>
Thanks. There are two keywords in it, which will help me now to
investigate better: scattering and absorption.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 08:04:08
Message: <56bc86c8$1@news.povray.org>
On 11-2-2016 13:45, Sven Littkowski wrote:
> Thanks. There are two keywords in it, which will help me now to
> investigate better: scattering and absorption.
>

With scattering you might also need to scatter a reddish/orange colour 
to get blue. I think I was wrong in my previous post.

Good starting point for air and water are - as always:

http://www.f-lohmueller.de/pov_tut/
http://www.imagico.de/pov/water/water04.php

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 09:41:51
Message: <56bc9daf$1@news.povray.org>
On 2/11/2016 12:45 PM, Sven Littkowski wrote:
> Thanks. There are two keywords in it, which will help me now to
> investigate better: scattering and absorption.
>

There is also emission which you could use for the central light source.
I was going to mention Rune Johansen's "electric.inc" but that uses the 
glow keyword which requires MegaPov. So it will not work with the 
official PovRay.
Nevertheless Rune's site does have some good include files that you 
might find useful. I often use his Grass Tex Include File and his 
Particle System is good too.

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 09:45:03
Message: <56bc9e6f$1@news.povray.org>
On 2/11/2016 2:41 PM, Stephen wrote:
> Rune's site

Oops!
http://runevision.com/3d/


-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 16:05:31
Message: <56bcf79b$1@news.povray.org>
Lohmueller and Imagico give a good tutorial on water. That was a good help.

Lohmueller has a tutorial only about clouds, but I need something
different, interior or media or so, for the entire air body.

Still trying to find some ways to create an atmosphere...


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 20:07:09
Message: <56bd303d@news.povray.org>
Le 16-02-10 21:35, Sven Littkowski a écrit :
> Hi,
>
> does anyone have a realistic way to simulate air and water?
>
> For the air, it should make everything fading in distance to a air blue
> and behave in all other ways also like atmosphere.
>
> And the water should have transparency that becomes more bluish in
> distance, simply like real water, too.
>
> I intend to use both inside a cylinder, where the air would be in the
> shape of a cylinder, and the water in the shape of a difference
> (cylinder/cylinder).
>
> Thanks a lot for your help.
>

For air, use a low density scattering media with a blueish tint, like 
rgb<0.5, 0.7, 1>
Make sure that your container have the hollow option enabled. Simply 
adding "hollow" is enough.
A quick and dirty alternative is the use of fog with the appropriate 
colour. fog is fast and never interact with your light sources. It will 
affect shadowed areas in the same way it affect lighted areas. 
Appropriate for testing in the composition phase.

For the water, you can also use media, but, you can also use colour fading.
Adding refraction is crutial to get beleiveable water. Refraction is 
turned on by having an ior in the interior block.

interior{ior 1.33 // typical water ior
  fade_colour <0.4, 0.66, 0.9>
  fade_distance SomeDistanceValue
  fade_power 1 // or 1001
}

Adjust "SomeDistanceValue" as needed to get the result that you want.
Fading is compatible with the use of media.
You don't need the media if you want to model very limpid water, but 
media is required if the water is to have any turbidity.
Colour fading is fast, very fast compared with scattering media, so, the 
testing won't take much time.


Alain


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 20:13:52
Message: <56bd31d0$1@news.povray.org>
Le 16-02-11 09:41, Stephen a écrit :
> On 2/11/2016 12:45 PM, Sven Littkowski wrote:
>> Thanks. There are two keywords in it, which will help me now to
>> investigate better: scattering and absorption.
>>
>
> There is also emission which you could use for the central light source.
> I was going to mention Rune Johansen's "electric.inc" but that uses the
> glow keyword which requires MegaPov. So it will not work with the
> official PovRay.
> Nevertheless Rune's site does have some good include files that you
> might find useful. I often use his Grass Tex Include File and his
> Particle System is good too.
>

For the glow, you can use emissive media with an appropriate pattern. 
The spherical pattern is often the best suitted one, followed by 
cylindrical.

media{emission Colour}
This gives you an uniform glowing media.

sphere{0, 1 pigment{rgbt 1}
  hollow
  media{emission Colour density{spherical}}
}

gives you a spherical glowing media, contained within an unit sphere, 
that goes from full strength at the center and drop to zero at the 
surface of the sphere.



Alain


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 23:20:05
Message: <56bd5d75$1@news.povray.org>
Thanks. :-)

Not bad. But in my scenario, it is a bit different: there is an
illuminated day" side inside that hollow cylinder, but also a dark
"night" side. The illumination is done already by light sources at the
moment, or an emissive image maybe in the future.

The medium I need, would not need to glow. But it should give that blue
"dust" to the distance, and be brighter around a light or emission source.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 11 Feb 2016 23:33:59
Message: <56bd60b7$1@news.povray.org>
For the air, I am trying to use he code below. But I am getting an error:
"Fatal Error in Renderer: A POV-Ray internal nesting limit was reached."

cylinder // Air
{
 < 0.0, 0.0,  0.0 > < 0.0, 0.0, 5000.0 > 1500.0
 hollow
 interior
 {
  ior 1.3
  fade_distance 10
  fade_power 1001
  fade_color < 0.5, 0.7, 1.0 >
  media
  {
   scattering
   {
    3
    < 0.5, 0.65, 0.4 >
    extinction 1.0
   }
  }
 }
}

------------------------

For the water body, I am using successfully this (still dependent on the
blue of the future air medium):

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 >
 }
}


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 01:35:40
Message: <56bd7d3c$1@news.povray.org>
UPDATE

For the air, I am using now successlessly the code below: it is just dark.

cylinder // Air
{
 < 0.0, 0.0,  0.0 > < 0.0, 0.0, 5000.0 > 1500.0
 hollow
 interior
 {
  media
  {
   scattering
   {
    3
    < 0.5, 0.7, 1.0 >
    extinction 1.0
   }
  }
 }
}


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:07:28
Message: <56bd92c0$1@news.povray.org>
On 12-2-2016 7:34, Sven Littkowski wrote:
> UPDATE
>
> For the air, I am using now successlessly the code below: it is just dark.
>

Try this:

cylinder // Air
{
  < 0.0, 0.0,  0.0 > < 0.0, 0.0, 5.000 > 1.500
  hollow
  pigment {rgbt 1}
  interior
  {
   media
   {
    scattering
    {
     1
     < 1.0, 0.7, 0.5 >/1000
     extinction 1.0
    }
   }
  }
  scale 1000
}

(1) Note the scaling of the cylinder /and/ of the scattering.
(2) I changed the scattering colour
(3) The cylinder needs a transparent pigment

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:09:23
Message: <56bd9333$1@news.povray.org>
On 12-2-2016 7:34, Sven Littkowski wrote:
> UPDATE
>
> For the air, I am using now successlessly the code below: it is just dark.
>

Try this:

cylinder // Air
{
  < 0.0, 0.0,  0.0 > < 0.0, 0.0, 5.000 > 1.500
  hollow
  pigment {rgbt 1}
  interior
  {
   media
   {
    scattering
    {
     3
     < 1.0, 0.7, 0.5 >/1000
     extinction 1.0
    }
   }
  }
  scale 1000
}

(1) Note the scaling of the cylinder /and/ of the scattering.
(2) I changed the scattering colour
(3) The cylinder needs a transparent pigment

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:25:44
Message: <56bd9708@news.povray.org>
Note also that you can thicken or thinning the atmosphere by adding an 
extra multiplicator to the scattering colour:

This will thicken the atmosphere:
scattering {3  < 1.0, 0.7, 0.5 >*1.5 /1000
   extinction 1.0
}

This will thin it:

This will thicken the atmosphere:
scattering {3 < 1.0, 0.7, 0.5 >*0.5 /1000
extinction 1.0
}

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:26:59
Message: <56bd9753$1@news.povray.org>
Note also that you can thicken or thin the atmosphere by adding an extra 
multiplicator to the scattering colour:

This will thicken the atmosphere:
scattering {3  < 1.0, 0.7, 0.5 >*1.5 /1000
   extinction 1.0
}

This will thin it:
scattering {3 < 1.0, 0.7, 0.5 >*0.5 /1000
extinction 1.0
}

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:31:32
Message: <56bd9864$1@news.povray.org>
On 2/12/2016 8:26 AM, Thomas de Groot wrote:
> Note also that you can thicken or thin the atmosphere by adding an extra
> multiplicator to the scattering colour:
>
> This will thicken the atmosphere:
> scattering {3  < 1.0, 0.7, 0.5 >*1.5 /1000
>    extinction 1.0
> }
>
> This will thin it:
> scattering {3 < 1.0, 0.7, 0.5 >*0.5 /1000
> extinction 1.0
> }
>

We are getting double posts from you, Thomas

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 03:40:34
Message: <56bd9a82$1@news.povray.org>
On 12-2-2016 9:31, Stephen wrote:
> On 2/12/2016 8:26 AM, Thomas de Groot wrote:
>> Note also that you can thicken or thin the atmosphere by adding an extra
>> multiplicator to the scattering colour:
>>
>> This will thicken the atmosphere:
>> scattering {3  < 1.0, 0.7, 0.5 >*1.5 /1000
>>    extinction 1.0
>> }
>>
>> This will thin it:
>> scattering {3 < 1.0, 0.7, 0.5 >*0.5 /1000
>> extinction 1.0
>> }
>>
>
> We are getting double posts from you, Thomas
>

Due to typing errors, I deleted my initial messages and sent the 
corrected ones again. Apparently, Thunderbird correctly makes the 
deletions invisible (at least for me) but not the website.

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 04:43:40
Message: <56bda94c@news.povray.org>
Update

I made some progress, but still have a problem: while seen from the
daytime position everything looks fine, the sunset and night positions
are not correct: no night darkness, and no sunset colors.

If you can help, please try. Thanks.




#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 >
}*/
light_source { < -5000, 10000, 10000 > color rgb < 0.2, 0.1, 0.0 > *3.0 }
light_source { < -10000, 05000, 10000 > color rgb < 0.5, 0.5, 0.5 > }
light_source { < -5000, -10000, 10000 > color rgb < 0.005, 0.0, 0.01 > }
#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,  Colony Ship I - Heightfield Landscape.png
           <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'
sl - colony ship i.png


 

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 04:47:27
Message: <56bdaa2f$1@news.povray.org>
Thanks, seeing your advises now. Look further down - how do you like my
atmosphere? It is not perfect: the nighttime position is not dark but
blue, and the sunset camera position also does not show sunset colors.
Any idea?

Code and image inside my update posting.


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 05:27:19
Message: <56bdb387$1@news.povray.org>
On 2/12/2016 8:40 AM, Thomas de Groot wrote:
>> We are getting double posts from you, Thomas
>>
>
> Due to typing errors, I deleted my initial messages and sent the
> corrected ones again. Apparently, Thunderbird correctly makes the
> deletions invisible (at least for me) but not the website.

I am using Thunderbird too.
I must have looked and downloaded them before you cancelled.
No big deal. :)

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 07:31:27
Message: <56bdd09f@news.povray.org>
On 12-2-2016 10:46, Sven Littkowski wrote:
> Thanks, seeing your advises now. Look further down - how do you like my
> atmosphere? It is not perfect: the nighttime position is not dark but
> blue, and the sunset camera position also does not show sunset colors.
> Any idea?
>
> Code and image inside my update posting.
>


I am afraid I have no real experience with sunset or night atmospheres. 
Bruno Cabasson seems to get very close though.

-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 08:21:25
Message: <56bddc55$1@news.povray.org>
Am 12.02.2016 um 10:42 schrieb Sven Littkowski:
> Update

Please don't post images in povray.general (or any newsgroup without
".binaries." in the name, for that matter).


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 12 Feb 2016 14:58:14
Message: <56be3956$1@news.povray.org>
Ah, yes. okay. :-)


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 13 Feb 2016 16:14:53
Message: <56bf9ccd$1@news.povray.org>
Le 16-02-11 23:19, Sven Littkowski a écrit :
> Thanks. :-)
>
> Not bad. But in my scenario, it is a bit different: there is an
> illuminated day" side inside that hollow cylinder, but also a dark
> "night" side. The illumination is done already by light sources at the
> moment, or an emissive image maybe in the future.
>
> The medium I need, would not need to glow. But it should give that blue
> "dust" to the distance, and be brighter around a light or emission source.
>

Your light need to be fading.
That mean using fade_power 2 and fade_distance SomeRelativelyShortDistance.
That also mean that the light's intensity will large to very large, 
possibly in the 1000000 range.

That wat, the illumination will be much stronger near the lights, making 
it right for scattering media. Just make the media have a blue colour. 
It will glow blue, and the illumination reatching the surface will get a 
yellow tint.
Also, that scattering media will gives a blue tint to things farther away.

If you use radiosity and emissive image/pattern, that can't illuminate 
your media. In that case, you'll need to use emissive media to get the 
same result.


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 13 Feb 2016 16:17:46
Message: <56bf9d7a@news.povray.org>
Le 16-02-11 23:33, Sven Littkowski a écrit :
> For the air, I am trying to use he code below. But I am getting an error:
> "Fatal Error in Renderer: A POV-Ray internal nesting limit was reached."
>
> cylinder // Air
> {
>   < 0.0, 0.0,  0.0 > < 0.0, 0.0, 5000.0 > 1500.0
>   hollow
>   interior
>   {
>    ior 1.3
>    fade_distance 10
>    fade_power 1001
>    fade_color < 0.5, 0.7, 1.0 >
>    media
>    {
>     scattering
>     {
>      3
>      < 0.5, 0.65, 0.4 >
>      extinction 1.0
>     }
>    }
>   }
> }
>

An ior of 1.3 for the air? It's air, not water.
A correct ior here would be around 1.000001... Beter off leaving the ior 
totaly out for the air.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 13 Feb 2016 23:47:11
Message: <56c006cf$1@news.povray.org>
Thanks, Alan.

Yes, the strength of the light must have been the problem: I tried
scattering, but got only a black screen. i couldn't explain it to
myself, and that was one of the reasons why I redesigned the
illumination of my scene and removed all light sources 8and use now a
long, emitting bar with radiosity).

I think, I will make one more try with the scattering, as it sound
promising. :-)

-------------------------------


On 13.02.2016 16:15, Alain wrote:
> Your light need to be fading.
> That mean using fade_power 2 and fade_distance SomeRelativelyShortDistance.
> That also mean that the light's intensity will large to very large,
> possibly in the 1000000 range.
> 
> That wat, the illumination will be much stronger near the lights, making
> it right for scattering media. Just make the media have a blue colour.
> It will glow blue, and the illumination reatching the surface will get a
> yellow tint.
> Also, that scattering media will gives a blue tint to things farther away.
> 
> If you use radiosity and emissive image/pattern, that can't illuminate
> your media. In that case, you'll need to use emissive media to get the
> same result.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 13 Feb 2016 23:48:18
Message: <56c00712$1@news.povray.org>
Thanks, another source of errors fixed. :-)

-------------------------------

On 13.02.2016 16:18, Alain wrote:
> An ior of 1.3 for the air? It's air, not water.
> A correct ior here would be around 1.000001... Beter off leaving the ior
> totaly out for the air.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 02:55:00
Message: <56c032d4$1@news.povray.org>
On 14-2-2016 5:47, Sven Littkowski wrote:
> Thanks, Alan.
>
> Yes, the strength of the light must have been the problem: I tried
> scattering, but got only a black screen.

If you get a black screen (or a white screen for that matter) it is 
because your scattering vector value is out of range, either too high or 
too low. You need to experiment with that too. The intensity of the 
light source inside the media may also play an important role.

Important note! Always (repeat: Always) scale your media object and the 
inverse scattering vector proportionally (as I showed you in my example).

In one word: experiment, experiment, experiment (3 words now) :-)

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 08:51:18
Message: <56c08656@news.povray.org>
I am, actually, getting a very different problem now, when trying to use
a scattering effect:

"Fetal Error in Renderer: A POV-Ray internal nesting limit was reached."

What part of my code could cause that?

----------------------------------

#if(IlluminationType="Lights")
 #declare LightDistance = -253.1;
 #declare LightWidth = 50.0;
 #declare MyRadius = 5;
 #declare MyTightness = 50;
 #declare MyFalloff = 80;
 #declare MyLightMultiplicator = 0.007 * 1000.0;
 #declare LightSectionHalf = union
 {
  light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
0.88235 > * MyLightMultiplicator*05 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
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 fade_power 2 fade_distance 100.0
spotlight point_at < 375.0, -0200.0, 0.0 > radius MyRadius tightness
MyTightness falloff MyFalloff rotate < 0.0, 0.0, 25.0 > }
 }
#end

#if(IlluminationType="Lights")
 #declare LightSection = union
 {
  object { LightSectionHalf scale <  1.0, 1.0, 1.0 > }
  object { LightSectionHalf scale < -1.0, 1.0, 1.0 > }
 }
#end

#if(IlluminationType="Lights")
 #declare MyLight = union
 {
  #declare RundeLight = 50.0;
  #while(RundeLight<4950.0)
   object { LightSection  translate < 0.0, 0.0, RundeLight > }
   #declare RundeLight = RundeLight+50.0;
  #end
 }
#end

#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 > * 1.0 ]
     [ 0.5 rgb < 0.5, 0.7, 1.0 > * 1.0 ]
     [ 1.0 rgb < 0.0, 0.0, 0.0 > * 1.0 ]
    }
    translate < 0.0, -0.5, 0.0 >
    scale < 3000.0, 3000.0, 1.0 >
   }
   #if(IlluminationType="Lights")
    absorption 1000.0
    scattering
    {
     1
     < 0.5, 0.7, 1.0 >
     extinction 1.0
    }
   #end
  }
 }
}


----------------------------------

On 14.02.2016 02:54, Thomas de Groot wrote:
> On 14-2-2016 5:47, Sven Littkowski wrote:
> If you get a black screen (or a white screen for that matter) it is
> because your scattering vector value is out of range, either too high or
> too low. You need to experiment with that too. The intensity of the
> light source inside the media may also play an important role.
> 
> Important note! Always (repeat: Always) scale your media object and the
> inverse scattering vector proportionally (as I showed you in my example).
> 
> In one word: experiment, experiment, experiment (3 words now) :-)


Post a reply to this message

From: Stephen
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 10:01:26
Message: <56c096c6@news.povray.org>
On 2/14/2016 1:51 PM, Sven Littkowski wrote:
> I am, actually, getting a very different problem now,

...

Which is why I use a modeller. Every line of code I write has to be 
debugged. :-(

I could not code my way out of a wet paper bag.

-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 10:46:59
Message: <56c0a173$1@news.povray.org>
Le 16-02-14 08:51, Sven Littkowski a écrit :
> I am, actually, getting a very different problem now, when trying to use
> a scattering effect:
>
> "Fetal Error in Renderer: A POV-Ray internal nesting limit was reached."
>
> What part of my code could cause that?
>
> ----------------------------------
>
> #if(IlluminationType="Lights")
>   #declare LightDistance = -253.1;
>   #declare LightWidth = 50.0;
>   #declare MyRadius = 5;
>   #declare MyTightness = 50;
>   #declare MyFalloff = 80;
>   #declare MyLightMultiplicator = 0.007 * 1000.0;
>   #declare LightSectionHalf = union
>   {
>    light_source { < 0.0, LightDistance, 0.0 > rgb < 1.00000, 0.98824,
> 0.88235 > * MyLightMultiplicator*05 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> 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 fade_power 2 fade_distance 100.0
> spotlight point_at < 375.0, -0200.0, 0.0 > radius MyRadius tightness
> MyTightness falloff MyFalloff rotate < 0.0, 0.0, 25.0 > }
>   }
> #end
>

Maybe you have to many light interacting with the media.

Use only a single or a few, long and very narrow, area_light using 
area_illumination. If using a few lights, don't go over 4 or 5 TOTAL.
Use something like this for the area_light parameters:

area_light HabitatLength*z, AxleRadius*x*0.7, 257, 33 adaptive 0 
area_illumination

adaptive 0 turn on the adaptive sampling starting with only the 4 
cormers and will subdivide as needed in the penumbrae.
adaptive 1 will start with the corners plus the mid point in each 
directions, for a total of 9 initial samples.

Don't use spotlight but rely on the edges of the cylinder's window to 
limit the area of illumination.

cylinder{0, HabitatLength*z, AxleRadius
  pigment{radial
   color_map{[0 rgb 0.5][0.05 rgbf<0.8, 0.5, 0.2, 1>][0.1 rgbf 1]
   [0.4 rgbf 1][0.45 rgbf<1, 0.7, 0.5, 1>][0.5 rgb 0.5]}
  rotate 180*z}
}



Alain


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 15:03:37
Message: <56c0dd99$1@news.povray.org>
Okay, I will give a try. Thanks a lot.

Should I use "looks_like" or "projected_through" for the cylinder (see
below (quote)?

On 14.02.2016 10:47, Alain wrote:
> cylinder{0, HabitatLength*z, AxleRadius
>  pigment{radial
>   color_map{[0 rgb 0.5][0.05 rgbf<0.8, 0.5, 0.2, 1>][0.1 rgbf 1]
>   [0.4 rgbf 1][0.45 rgbf<1, 0.7, 0.5, 1>][0.5 rgb 0.5]}
>  rotate 180*z}
> }


Post a reply to this message

From: clipka
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 15:05:50
Message: <56c0de1e$1@news.povray.org>
Am 14.02.2016 um 14:51 schrieb Sven Littkowski:
> I am, actually, getting a very different problem now, when trying to use
> a scattering effect:
> 
> "Fetal Error in Renderer: A POV-Ray internal nesting limit was reached."
> 
> What part of my code could cause that?

This message indicates that any one of the following limits was reached:

- 256 media statements relevant at any point in space.

- 256 media intervals (between two object surfaces?).

- 512 lit media intervals (between two object surfaces ?).

- (256 light sources used with media *).

- A limit of 512 overlapping textured elements at any point in space in
a blob or a CSG union, merge or intersection.

- 1024 light sources used with media and/or photons.


(? At present I'm not exactly sure how these limits work.)

(* This limit is only relevant with some alternative code that is
currently disabled.)


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 15:25:06
Message: <56c0e2a2$1@news.povray.org>
Le 16-02-14 15:03, Sven Littkowski a écrit :
> Okay, I will give a try. Thanks a lot.
>
> Should I use "looks_like" or "projected_through" for the cylinder (see
> below (quote)?
>
> On 14.02.2016 10:47, Alain wrote:
>> cylinder{0, HabitatLength*z, AxleRadius
>>   pigment{radial
>>    color_map{[0 rgb 0.5][0.05 rgbf<0.8, 0.5, 0.2, 1>][0.1 rgbf 1]
>>    [0.4 rgbf 1][0.45 rgbf<1, 0.7, 0.5, 1>][0.5 rgb 0.5]}
>>   rotate 180*z}
>> }

You want the cylinder to cast shadows, so, looks_like can't be used. 
looks_like have an implied no_shadow.

projected_through can be seen as an "anti-shadow" thing. Also, it's 
supposed to totaly ignore any pigment and textures and is never visible. 
So, it's not what you need.

No, just a plain cylinder with a pattern that is partly transparent in 
the direction where you want the light to shine through and opaque on 
the "night" side.

You may want to add some shiny or luminous texture on the inside. You do 
that using interior_texture after the normal texture.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 19:32:26
Message: <56c11c9a$1@news.povray.org>
I use 2,000 light sources or so, the last condition might be the one
that applies.  What would happen, if POV-Ray would have higher limits?
Which development file(s) contain these limits? Thanks.

On 14.02.2016 15:04, clipka wrote:
>> What part of my code could cause that?
> 
> This message indicates that any one of the following limits was reached:
> 
> - 256 media statements relevant at any point in space.
> 
> - 256 media intervals (between two object surfaces?).
> 
> - 512 lit media intervals (between two object surfaces ?).
> 
> - (256 light sources used with media *).
> 
> - A limit of 512 overlapping textured elements at any point in space in
> a blob or a CSG union, merge or intersection.
> 
> - 1024 light sources used with media and/or photons.
> 
> 
> (? At present I'm not exactly sure how these limits work.)
> 
> (* This limit is only relevant with some alternative code that is
> currently disabled.)
>


Post a reply to this message

From: clipka
Subject: Re: Wanted: Air and Water
Date: 14 Feb 2016 22:58:42
Message: <56c14cf2$1@news.povray.org>
Am 15.02.2016 um 01:32 schrieb Sven Littkowski:
> I use 2,000 light sources or so, the last condition might be the one
> that applies.  What would happen, if POV-Ray would have higher limits?
> Which development file(s) contain these limits? Thanks.

In the current versions that would be LIGHTSOURCE_VECTOR_SIZE in
source/core/configcore.h.

The only adverse effect would be higher memory consumption and possibly
slightly degraded performance.

The reason why these limits are there in the first place is simply
because, for the sake of performance, the respective data structures
need to be of /some/ fixed size.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 02:59:40
Message: <56c1856c$1@news.povray.org>
On 15-2-2016 1:32, Sven Littkowski wrote:
> I use 2,000 light sources or so, the last condition might be the one
> that applies.  What would happen, if POV-Ray would have higher limits?
> Which development file(s) contain these limits? Thanks.
>

The question immediately arises: Do you /really/ need 2000 light 
sources? Looks like overkill to me.


-- 
Thomas


Post a reply to this message

From: Mike Horvath
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 04:40:35
Message: <56c19d13$1@news.povray.org>
On 2/15/2016 2:59 AM, Thomas de Groot wrote:
> On 15-2-2016 1:32, Sven Littkowski wrote:
>> I use 2,000 light sources or so, the last condition might be the one
>> that applies.  What would happen, if POV-Ray would have higher limits?
>> Which development file(s) contain these limits? Thanks.
>>
>
> The question immediately arises: Do you /really/ need 2000 light
> sources? Looks like overkill to me.
>
>

In my scene with an area light of 8 sources there was noticeable banding 
of the shadows. 2000 does sound like a lot though.


Mike


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 05:21:35
Message: <56c1a6af$1@news.povray.org>
Hi,

I never worked with area light and area illumination before. I tried to
establish this kind of light based on your example, but I am not sure if
I gave the correct numbers. And I also don't know the correct order.


 #declare MyLight = union
 {
  light_source
  {
   5000.0*z      // Location
   760.0*x*0.7   // Color?
   257, 33       // ?
   area_light    // Type
 // The POV-Ray docu says vectors and sizes are required for area light
   < -1000.0, -1300.0, 0.0 > < 1000.0, -1300.0, 5000.0 > 3, 3 // OK?
   adaptive 0    //
   area_illumination on //
  }
  cylinder
  {
   0, 5000.0*z, 760.0
   pigment
   {
    radial
    color_map
    {
     [ 0.00 rgb  0.5 ]
     [ 0.05 rgbf < 0.8, 0.5, 0.2, 1.0 > ]
     [ 0.10 rgbf 1.0 ]
     [ 0.40 rgbf 1.0 ]
     [ 0.45 rgbf < 1.0, 0.7, 0.5, 1.0 > ]
     [ 0.50 rgb  0.5 ]
    }
    rotate 180*z
   }
   translate < 0.0, -10.0, 0.0 >
  }
 }

------------------------------------------------------------

On 14.02.2016 10:47, Alain wrote:
> area_light HabitatLength*z, AxleRadius*x*0.7, 257, 33 adaptive 0 area_illumination


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 05:29:41
Message: <56c1a895$1@news.povray.org>
I came to use 2,000 light sources, because I want soft shadows along the
Z axis (a light each 40 meters) for the one reason, and also a flow from
day-white light via afternoon-peach to sunset-purple along the Z axis.

Alternatively, working with no light source but with emitting surfaces
of those colors and radiosity, does also the trick.

But I am also interested to learn about media atmospheric effects, and
so I try both illuminations still and find out, which way gives me the
best results.

I am considering to create a custom version of POV-Ray that does not
give me those limits. Maybe, one day, these limits can be set within the
appropriate .ini file or within the menu bar of the program (settings,
options), or don't exist anymore but POV-Ray would give a warning or
advise when parsing such a scene. Hey, CLipka, how do you do today? :-)

------------------------------------------------

On 15.02.2016 04:40, Mike Horvath wrote:
> On 2/15/2016 2:59 AM, Thomas de Groot wrote:
>> On 15-2-2016 1:32, Sven Littkowski wrote:
>>> I use 2,000 light sources or so, the last condition might be the one
>>> that applies.  What would happen, if POV-Ray would have higher limits?
>>> Which development file(s) contain these limits? Thanks.
>>>
>>
>> The question immediately arises: Do you /really/ need 2000 light
>> sources? Looks like overkill to me.
>>
>>
> 
> In my scene with an area light of 8 sources there was noticeable banding
> of the shadows. 2000 does sound like a lot though.
> 
> 
> Mike


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 07:34:36
Message: <56c1c5dc$1@news.povray.org>
Small Update, Alain:

I copied your code and made small adaptions. But due to the fact, that I
still have no full understanding of what I am doing here ( :-) ), I
produce errors at the location where I use your "257, 33".

------------------------------------

 #declare MyLight = union
 {
  light_source
  {
   4999.8*(z+0.1)// Location  - small difference to walls (0.1)
   760.0*x*0.7   // Color?
   257, 33       // ? ERROR ---
   area_light    // Type
   < -1000.0, -1300.0, 0.1 > < 1000.0, -1300.0, 4999.9 > 3, 3 // Vectors?
   adaptive 0    //
   area_illumination on //
  }
  cylinder
  {
   0, 5000.0*z, 760.0
   pigment
   {
    radial
    color_map
    {
     [ 0.00 rgb  0.5 ]
     [ 0.05 rgbf < 0.8, 0.5, 0.2, 1.0 > ]
     [ 0.10 rgbf 1.0 ]
     [ 0.40 rgbf 1.0 ]
     [ 0.45 rgbf < 1.0, 0.7, 0.5, 1.0 > ]
     [ 0.50 rgb  0.5 ]
    }
    rotate 180*z
   }
//   interior_texture  // not yet in place. But shouldn't that cylinder
be hollow then?
   translate < 0.0, -10.0, 0.0 >
  }
 }

------------------------------------

On 14.02.2016 10:47, Alain did some écrit:
> area_light HabitatLength*z, AxleRadius*x*0.7, 257, 33 adaptive 0
> area_illumination
> 
> cylinder{0, HabitatLength*z, AxleRadius
>  pigment{radial
>   color_map{[0 rgb 0.5][0.05 rgbf<0.8, 0.5, 0.2, 1>][0.1 rgbf 1]
>   [0.4 rgbf 1][0.45 rgbf<1, 0.7, 0.5, 1>][0.5 rgb 0.5]}
>  rotate 180*z}
> }


Post a reply to this message

From: clipka
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 15:03:23
Message: <56c22f0b$1@news.povray.org>
Am 15.02.2016 um 11:29 schrieb Sven Littkowski:

> Hey, CLipka, how do you do today? :-)

Mild headache, thanks to you ;)


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 15 Feb 2016 22:12:37
Message: <56c293a5$1@news.povray.org>
Too much pressure in your life?   3:)

On 15.02.2016 15:02, clipka wrote:
> Am 15.02.2016 um 11:29 schrieb Sven Littkowski:
>> (ideas to improve POV-Ray...) Hey, CLipka, how do you do today? :-)
> 
> Mild headache, thanks to you ;)
>


Post a reply to this message

From: Alain
Subject: Re: Wanted: Air and Water
Date: 16 Feb 2016 14:10:26
Message: <56c37422@news.povray.org>
Le 16-02-15 05:21, Sven Littkowski a écrit :
> Hi,
>
> I never worked with area light and area illumination before. I tried to
> establish this kind of light based on your example, but I am not sure if
> I gave the correct numbers. And I also don't know the correct order.
>
>
>   #declare MyLight = union
>   {
>    light_source
>    {
>     5000.0*z      // Location
Yes, location of <0, 0, 5000>
>     760.0*x*0.7   // Color?
That makes your light red. It evaluate to rgb <760*0.7, 0, 0>
>     257, 33       // ?
This WILL cause an error and stop parsing.
MUST folloow both area_light AND the two axis
>     area_light    // Type
>   // The POV-Ray docu says vectors and sizes are required for area light
>     < -1000.0, -1300.0, 0.0 > < 1000.0, -1300.0, 5000.0 > 3, 3 // OK?
That can be ok. This define a rectangle set -1300 unit down the y axis, 
and set at an angle.
A 3 by 3 array is extremely croase. Barely ok for a test render. Could 
be used simulate an actual array of 3 by 3 lights if used without jitter 
and adaptive.
>     adaptive 0    //
Good for test render. If good enough, may be kept for final render.
>     area_illumination on //
OK
>    }

You first define the location of the light, then it's colour.
After that, you add the area_light parameters and other light options.

It's as follow, after location and colour/intensity:
area_light
First size of the area light as an axis
Second size of the area light also as an axis
For both axis, the shortcut n*x, n*y and n*z are legal.
Number of samples along the first axis
Number of samples along the second axis

For the axis, it's usualy beter to define them along the reference axis. 
After that, if needed, you can rotate the light as a whole to orient the 
plane as needed. That's much easier than giguring the correct values for 
the axis. Alternatively, it's possible to use some axis manipulation 
macros to calculate the correct values.

It's followed by the other options in any order:

area_illumination will affect the illumination of objects that are close 
to the light's location.

adaptive turn on the adaptive subsampling. The keyword is followed by an 
integer value that set the minimal number of initial subsampling.
A value of 0 will start with only the 4 corners, and if they are not all 
visible or invisible from a given point, then subdivision will occur.
A value of 1 will start with a 3 by 3 array, adaptive 2 will start with 
a 5 by 5 array, subjected to the actual number of sublights in that 
direction.
adaptive allow the use of large number of samples with minimal 
performance hit.

circular moves the sublights inward so that they reside within a circle 
or ellips.
orient will pivot the sublights array so that it's always facing any 
point bein evaluated. It MUST be used with circular and the two axis 
must be ov the same length and the number of samples must be the same in 
both directions.

jitter will randomly move the sublights to reduce banding. If used with 
antialiasing, each antialiasing samples will have a different jittering 
of the sublights.

area_light is compatible with spotlight, cylinder, projected_through, 
parallel.
It's pointless for a shadowless light.

Correctly writing your sample:
light_source{
  Location
  Colour
  area_light // turn on the area_light feature
  5000*z 760*0.7*x //surface covered be the area_light
  257 33 //number of samples along the long and short axis
  jitter // very small effect in this case, help reduce banding
}

This area_light is parallel with the X-Z plane, and it's longest extent 
is alligned along the z axis.
If location is set for 500*y or <0, 500, 0>, the light will be located 
within this square:
<-16.5, 500, -2500> <16.5, 500, 2500>



Alain


Post a reply to this message

From: Sven Littkowski
Subject: Re: Wanted: Air and Water
Date: 16 Feb 2016 20:16:57
Message: <56c3ca09$1@news.povray.org>
Hi, big thanks, so far. please let's continue.

I used "760.0*x*0.7   // Color?" because you wrote: "AxleRadius*x*0.7".
I don't need a red light, so I will change it. :-)

Right after you wrote "257,33", that is why I placed them right after,
too. What are these two numbers actually about, or for?
And where exactly to place them? After the vectors of the area_light as
replacement for "3,3"?

Vectors of the area_light:
< -1000.0, -1300.0, 0.0 > < 1000.0, -1300.0, 5000.0 >
What exactly do they describe? The illuminated area? Or the area
(rectangle) in which all lights are in? I might have to make some
changes to those two vectors, based on your answer. :-)

At the moment, I have this as light system, but the resulting image is
just showing a distant gray ring:
---------------------------

#if(IlluminationType="Lights")
 #declare MyLight = union
 {
  light_source
  {
   5000*z                   // Location
   rgb < 1.00000, 0.98824, 0.88235 > // Color
   area_light               // Type
   5000*z 760*0.7*x 257, 33 // Vectors
   adaptive 0               //
   area_illumination on     //
  }
  cylinder
  {
   0, 5000.0*z, 760.0
   pigment
   {
    radial
    color_map
    {
     [ 0.00 rgb  0.5 ]
     [ 0.05 rgbf < 0.8, 0.5, 0.2, 1.0 > ]
     [ 0.10 rgbf 1.0 ]
     [ 0.40 rgbf 1.0 ]
     [ 0.45 rgbf < 1.0, 0.7, 0.5, 1.0 > ]
     [ 0.50 rgb  0.5 ]
    }
    rotate 180*z
   }
//   interior_texture  // not yet in place. But shouldn't that cylinder
be hollow then?
   translate < 0.0, -10.0, 0.0 >
  }
 }
#end

----------------------------------------




On 14.02.2016 10:47, Alain wrote:
> area_light HabitatLength*z, AxleRadius*x*0.7, 257, 33 adaptive 0
> area_illumination
>
> cylinder{0, HabitatLength*z, AxleRadius
>  pigment{radial
>   color_map{[0 rgb 0.5][0.05 rgbf<0.8, 0.5, 0.2, 1>][0.1 rgbf 1]
>   [0.4 rgbf 1][0.45 rgbf<1, 0.7, 0.5, 1>][0.5 rgb 0.5]}
>  rotate 180*z}
> }

On 16.02.2016 14:10, Alain wrote:
> Le 16-02-15 05:21, Sven Littkowski a écrit :
>>     5000.0*z      // Location
> Yes, location of <0, 0, 5000>
>>     760.0*x*0.7   // Color?
> That makes your light red. It evaluate to rgb <760*0.7, 0, 0>
>>     257, 33       // ?
> This WILL cause an error and stop parsing.
> MUST folloow both area_light AND the two axis
>>     area_light    // Type
>>   // The POV-Ray docu says vectors and sizes are required for area light
>>     < -1000.0, -1300.0, 0.0 > < 1000.0, -1300.0, 5000.0 > 3, 3 // OK?
> That can be ok. This define a rectangle set -1300 unit down the y axis,
> and set at an angle.
> 
> You first define the location of the light, then it's colour.
> After that, you add the area_light parameters and other light options.
> 
> It's as follow, after location and colour/intensity:
> area_light
> First size of the area light as an axis
> Second size of the area light also as an axis
> For both axis, the shortcut n*x, n*y and n*z are legal.
> Number of samples along the first axis
> Number of samples along the second axis
> 
> For the axis, it's usualy beter to define them along the reference axis.
> After that, if needed, you can rotate the light as a whole to orient the
> plane as needed. That's much easier than giguring the correct values for
> the axis. Alternatively, it's possible to use some axis manipulation
> macros to calculate the correct values.
> 
> It's followed by the other options in any order:
> 
> area_illumination will affect the illumination of objects that are close
> to the light's location.
> 
> adaptive turn on the adaptive subsampling. The keyword is followed by an
> integer value that set the minimal number of initial subsampling.
> A value of 0 will start with only the 4 corners, and if they are not all
> visible or invisible from a given point, then subdivision will occur.
> A value of 1 will start with a 3 by 3 array, adaptive 2 will start with
> a 5 by 5 array, subjected to the actual number of sublights in that
> direction.
> adaptive allow the use of large number of samples with minimal
> performance hit.
> 
> circular moves the sublights inward so that they reside within a circle
> or ellips.
> orient will pivot the sublights array so that it's always facing any
> point bein evaluated. It MUST be used with circular and the two axis
> must be ov the same length and the number of samples must be the same in
> both directions.
> 
> jitter will randomly move the sublights to reduce banding. If used with
> antialiasing, each antialiasing samples will have a different jittering
> of the sublights.
> 
> area_light is compatible with spotlight, cylinder, projected_through,
> parallel.
> It's pointless for a shadowless light.
> 
> Correctly writing your sample:
> light_source{
>  Location
>  Colour
>  area_light // turn on the area_light feature
>  5000*z 760*0.7*x //surface covered be the area_light
>  257 33 //number of samples along the long and short axis
>  jitter // very small effect in this case, help reduce banding
> }
> 
> This area_light is parallel with the X-Z plane, and it's longest extent
> is alligned along the z axis.
> If location is set for 500*y or <0, 500, 0>, the light will be located
> within this square:
> <-16.5, 500, -2500> <16.5, 500, 2500>
> 
> 
> 
> Alain


Post a reply to this message

Goto Latest 50 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.