POV-Ray : Newsgroups : povray.binaries.images : Rings cutting atmosphere phenomenon Server Time
7 Aug 2024 13:22:42 EDT (-0400)
  Rings cutting atmosphere phenomenon (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: EagleSun
Subject: Rings cutting atmosphere phenomenon
Date: 27 May 2006 23:40:00
Message: <web.44791b1274beee03bb1697f60@news.povray.org>
I'm working on the planets in an up-coming Star Wars movie, and I've ran
into a peculiar phenomenon, trying to

render rings around a planet produces an artifact where the rings cut away
the atmosphere of the planet.  For the

model, I use Saturn.

Here is the source code that reproduces the phenomenon...

// Saturn
#macro Saturn(_distance, _hour, _year, _heading, _pitch, _bank)
 SunLight(saturn_distance, sun_radius, rgb 1, 10, _heading, _pitch, _bank)
 #local _albedo=0.46;
 #local _radius=60268;
 #local _tilt=26.7;
 #local _tiltshift=0;
 #local _ringalbedo=0.66;
 object {
  LandSurface(_radius, 200, 0, 1, jpeg_type, "Solar
System/Saturn/saturn.jpg", png_type, "Solar

System/Saturn/saturn-cloud-bump.png")
  TransformWorld(_distance, _hour, _year, _heading, _pitch, _bank, _tilt, 0)
 }
 object {
  Atmosphere(_radius, 60, 91/255, 117/255, 192/255, 1/8000, 3, 0)
  TransformWorld(_distance, _hour, _year, _heading, _pitch, _bank, _tilt, 0)
 }

 PlanetRings("Solar System/Saturn/saturn_13182_rings.inc", 140460, 74500, 2,
78, _ringalbedo, _distance,

_hour, _year, _heading, _pitch, _bank, _tilt, _tiltshift)
#end




#macro LandRSurface(_radius, _hirelief, _lorelief, _albedo,
_landmapimagetype, _landmap, _landbumpimagetype,

_landbump)
 #local _planetradius=_radius*unitscale;
 #local _planethirelief=_hirelief*unitscale;
 #local _planetlorelief=_lorelief*unitscale;
 #local _planetdelta=_planethirelief-_planetlorelief;
 #local fn_PlanetBump=function{
  pigment{
   image_map{
    map_image(_landbumpimagetype, _landbump)
    map_type 1
    //once
    interpolate 2
   }
  }
 }
 isosurface
 {
  function {
   f_sphere(x, y, z, (_planetradius+_planetlorelief))-((1-fn_PlanetBump(x,
y, z).red)

*_planetdelta)
  }
  contained_by {
   sphere{
    0,(_planetradius+_planethirelief)
   }
  }
  accuracy surface_accuracy*unitscale
  texture
  {
   pigment
   {
    image_map
    {
     map_image(_landmapimagetype, _landmap)
     map_type 1
    }
   }
   finish
   {
    ambient 0
    brilliance land_brilliance
    albedo(_albedo)
   }
  }
 }
#end



#declare Atmosphere_Option=5;
#macro Atmosphere(_land_radius, _hh_value, _r, _g, _b, _atm_mag,
_decay_magnitude, _fade_distance)
 #switch (Atmosphere_Option)
 #case (1)
  #local _atm_height=4;
  #local _atm_lo=pow(16, _hh_gamma);
  #break
 #case (2)
  #local _atm_height=10;
  #local _atm_lo=pow(1024, _hh_gamma);
  #break
 #case (3)
  #local _atm_height=12;
  #local _atm_lo=pow(4096, _hh_gamma);
  #break
 #case (4)
  #local _atm_height=16;
  #local _atm_lo=pow(65536, _hh_gamma);
  #break
 #case (5)
  #local _atm_height=32;
  #local _atm_lo=pow(65536*65536, _hh_gamma);
  #break
 #end
// #local _half_height=_hh_value/2;
// #local _half_height=_hh_value*_hh_gamma;
 #local _half_height=_hh_value;
 #local _atm_magnitude=_atm_mag;

// #local _atm_altitude=_atm_height*_half_height*_hh_antigamma;
 #local _atm_altitude=_atm_height*_half_height;

 #local _atm_radius=_land_radius+_atm_altitude;
 #local _color=rgb<_r, _g, _b>;
 #local _color_map=_color;

 #local _atm_hi_color=_color_map*_atm_height;
// #local _atm_lo_color=_color_map/_atm_lo;
 #local _atm_lo_color=_color_map*0;

// difference {
  sphere {
   <0, 0, 0>, _atm_radius*unitscale
  }
//  sphere {
//   <0, 0, 0>, (_land_radius-_atm_altitude)*unitscale
//  }
  hollow on
  //no_shadow
  material {
   texture {
    pigment {
     rgbt 1
    }
    finish
    {
     ambient 0
     brilliance atmos_brilliance
     diffuse 0
    }
   }
   interior {
    ior 1
    #if (_fade_distance != 0)
     fade_distance _half_height*unitscale*_fade_distance
     fade_power _decay_magnitude
     fade_color <_r, _g, _b>
    #end
    media { // Info from POV-Ray manual: Density*sqrt(3)/vlength(Scale)
     method 3
    // absorption _color*(_atm_magnitude/unitscale)*_decay_magnitude
     scattering {
      4, _color*(_atm_magnitude/unitscale)
     // eccentricity 0.125 // available only on scattering type 5.
      extinction _decay_magnitude
     }
     density {

      function { HalfHeight(_land_radius, _atm_altitude, _half_height,

_atm_height) }
      density_map {
       [0 _atm_lo_color]
       [1 _atm_hi_color]
      }

      scale (_atm_radius*unitscale)
     }
    }
   }
  }
// }
#end



#macro PlanetRings(_ringimage, _outer, _inner, _nscale, _divisions,
_ringalbedo, _distance, _hour, _year, _heading,

_pitch, _bank, _tilt, _tiltshift)
 #include _ringimage
 #local ABdiff=_outer-_inner;
 #local Xring=_outer/_nscale;
 #local Malpha=_nscale*_inner/_outer;
 #local Step=ABdiff*_nscale/(_divisions*_outer);
 #local i=1;
 #while (i<=_divisions)
  object {
   disc
   {
    <0, 0, 0> y, Malpha+(i)*Step, Malpha+(i-1)*Step
    pigment
    {
     onion
     colour_map
     {
      Planet_RingMap(i)
     }
    }
    finish
    {
     ambient 0
     brilliance 1
     albedo(_ringalbedo)
    }
    scale Xring*unitscale
   }
   double_illuminate
   TransformWorld(_distance, _hour, _year, _heading, _pitch, _bank, _tilt,
_tiltshift)
  }
  #local i=i+1;
 #end
#end


Post a reply to this message


Attachments:
Download 'sat-cas1.png' (441 KB)

Preview of image 'sat-cas1.png'
sat-cas1.png


 

From: Tim Nikias
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 04:38:58
Message: <447961a2$1@news.povray.org>
EagleSun wrote:
> I'm working on the planets in an up-coming Star Wars movie, and I've ran
> into a peculiar phenomenon, trying to
> 
> render rings around a planet produces an artifact where the rings cut away
> the atmosphere of the planet.  For the
> 
> model, I use Saturn.
> 
> Here is the source code that reproduces the phenomenon...
> 
SNIP

The discs have to be hollow. Discs are much like planes and divide the 
universe in two halfs: one half above and one half below the disc. I 
think even the source-code is similiar to that of the plane, it's just a 
limited version of the plane.
And if that doesn't help, try raising the max_trace_level in the 
global_settings.

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Sven Littkowski
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 13:54:38
Message: <4479e3de$1@news.povray.org>
Hello Eagle Sun,

I am trying out your macros but I need to know, which which options you are 
using them for your Saturn scene. Can you publish how you call these marcos?

Only then I can try to help. I first need to re-achieve your results in 
order to understand the problem.

Greetings,

Sven


Post a reply to this message

From: EagleSun
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 22:50:00
Message: <web.447a60b9f93ecc729756002c0@news.povray.org>
"Sven Littkowski" <sve### [at] jamaica-focuscom> wrote:
> Hello Eagle Sun,
>
> I am trying out your macros but I need to know, which which options you are
> using them for your Saturn scene. Can you publish how you call these marcos?
>
> Only then I can try to help. I first need to re-achieve your results in
> order to understand the problem.
>
> Greetings,
>
> Sven

Here's the way I call it....

Saturn(0, 5, 0, 120, 0, -23.7)
TerragenViewFrom(1.414, 326381.5, 0, 0, 0)


If you mean "Atmosphere_Option", I chose "5".  But same phenomenon is
reproduced no matter which option I choose.

The "TerragenViewFrom()" macro looks like this:

#macro TerragenViewFrom(_zoom, _fromobject, _shift_x, _shift_y, _shift_z)
 camera
 {
  direction <0, 0, _zoom>
  up y*image_height/image_width
  right x*PixelRatio
  look_at <_shift_x*unitscale, _shift_y*unitscale, _shift_z*unitscale>
  location <0, 0, -(_fromobject*unitscale)>
 }
#end


Here are comments that will provide a bit more explanation...

// Stars_Crackle(_heading, _pitch, _bank)
// Planet(_distance, _hour, _year, _heading, _pitch, _bank)
// Satellite(_sun, _distance, _hour, _year, _heading, _pitch, _bank)
// TerragenViewFrom(_zoom, _fromobject, _shift_x, _shift_y, _shift_z)


I've also tried a wide range of values for max_trace_level from 5 to 20.
The phenomenon has never gone away.  As far as I can tell.... the objects
are 1) Isosurface, 2) hollow sphere with media (3), and 4) disks.  At most
extreme liberal thought, I can't see any reason to go higher than 8.... but
what do I know, I'm a beginner.

Any planet image may be used for the map.

Let me know if you need more info...


Post a reply to this message

From: Sven Littkowski
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 23:09:40
Message: <447a65f4$1@news.povray.org>
Thanks,

testing now...

Sven


Post a reply to this message

From: Sven Littkowski
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 23:11:27
Message: <447a665f$1@news.povray.org>
The value "SunLight" is unknown. I still need that variable declaration, and 
others, if more should be missing.

Greetings,

Sven


Post a reply to this message

From: Sven Littkowski
Subject: Re: Rings cutting atmosphere phenomenon
Date: 28 May 2006 23:27:35
Message: <447a6a27$1@news.povray.org>
Hi again.

Some other variables also seems to be not in the right order or to be 
undeclared.

Best would be to post here the complete files, that should kill all of those 
errors.

Greetings,

Sven


Post a reply to this message

From: EagleSun
Subject: Re: Rings cutting atmosphere phenomenon
Date: 29 May 2006 01:05:01
Message: <web.447a8013f93ecc729756002c0@news.povray.org>
Tim Nikias <JUS### [at] gmxnetWARE> wrote:
> EagleSun wrote:
> > I'm working on the planets in an up-coming Star Wars movie, and I've ran
> > into a peculiar phenomenon, trying to
> >
> > render rings around a planet produces an artifact where the rings cut away
> > the atmosphere of the planet.  For the
> >
> > model, I use Saturn.
> >
> > Here is the source code that reproduces the phenomenon...
> >
> SNIP
>
> The discs have to be hollow.

WHOAH!  No wonder.... I would never have thought of it... but why?  When I
tried it, I got this.... (see image)


Post a reply to this message


Attachments:
Download 'hollow-disks.png' (201 KB)

Preview of image 'hollow-disks.png'
hollow-disks.png


 

From: Tim Nikias
Subject: Re: Rings cutting atmosphere phenomenon
Date: 29 May 2006 01:21:06
Message: <447a84c2@news.povray.org>
> WHOAH! No wonder... I would never have thought of it... but why? 
When > I tried it, I got this.... (see image)

Looks fine to me: shadow from the planet onto the rings, from the rings 
onto the planet... If there's anything wrong with that, add some 
no_shadow keywords. Or, if you're spotting some other problem through 
those various layers of objects and their media-hulls, try raising 
max_trace_level.

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: EagleSun
Subject: Re: Rings cutting atmosphere phenomenon
Date: 29 May 2006 10:55:00
Message: <web.447b0af0f93ecc724de801770@news.povray.org>
Tim Nikias <JUS### [at] gmxnetWARE> wrote:
> > WHOAH! No wonder... I would never have thought of it... but why?
> When > I tried it, I got this.... (see image)
>
> Looks fine to me: shadow from the planet onto the rings, from the rings
> onto the planet... If there's anything wrong with that, add some
> no_shadow keywords. Or, if you're spotting some other problem through
> those various layers of objects and their media-hulls, try raising
> max_trace_level.
>
> Regards,
> Tim

Oh... it looks great to me too..... all I mean is... why did "hollow on"
work so well?  And why did "hollow off" cut away the atmosphere?  Just
trying to learn POV-Ray...


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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