POV-Ray : Newsgroups : povray.binaries.images : POVSolar/POVEarth: still problem with adjusting the day/night gradient : Re: POVSolar/POVEarth: still problem with adjusting the day/nightgradient Server Time
30 Jul 2024 08:27:00 EDT (-0400)
  Re: POVSolar/POVEarth: still problem with adjusting the day/nightgradient  
From: Jörg 'Yadgar' Bleimann
Date: 23 May 2012 09:19:43
Message: <4fbce3ef@news.povray.org>
On 23.05.2012 11:22, Tek wrote:

> The gradient isn't wrapped in pigment_pattern{}, so the rotation and scale
> that's applied to the gradient is also applied to the textures in the
> texture_map.
>
> If you just copy the code from my earlier post it should work.
>

Not just copying, but also inserting the transformations you suggested 
in your posting of May 21... oh, and I also found out that the rotation 
around the y axis has to be applied *before* the compensation for the 
axial tilt to make the day/night boundary following the illumination 
correctly!

Here is my current code and some scenes I rendered:

union
{
   sphere // Earth, surface
   {
     0, 1
     texture
     {
       pigment_pattern
       {
         gradient z
         // transform gradient without affecting patterns in the texture_map
         scale 2 translate -z // offset to middle of gradient
	rotate <0, orb_ang, 0>
         rotate <-bodies[3][4], 0, 0> // x rotation is applied before y
       }
       texture_map
       {
         [0.45 T_Earth_Day]
         [0.48 T_Earth_Night]
       }
     }
     scale <bodies[3][1], bodies[3][3], bodies[3][2]>/sc
   }

   sphere // Earth, clouds
   {
     0, 1
     texture
     {
       pigment
       {
	image_map
	{
	  png "solarsys/cloud_combined_8192a_alpha.png"
	  map_type 1
	  interpolate 2
	}
       }
       finish { F_Standard_Planetary_Surface }
     }
     scale <bodies[3][1]+5, bodies[3][3]+4.983270985, bodies[3][2]+5>/sc
   }
   rotate -y*clock
   SetAxis(bodies[3][10], bodies[3][11])
   translate Pos_Earth/sc
}

// end of code

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download '2012-05-23 earth, take 86 - morning earth from 45,000 kms.png' (123 KB) Download '2012-05-23 earth, take 92 - evening earth from 45,000 kms.png' (125 KB) Download '2012-05-23 earth, take 111 - moscow from 4,000 kms, evening view.png' (570 KB) Download '2012-05-23 earth, take 128 - north pole from 20,000 kms, daylight view.png' (410 KB)

Preview of image '2012-05-23 earth, take 86 - morning earth from 45,000 kms.png'
2012-05-23 earth, take 86 - morning earth from 45,000 kms.png

Preview of image '2012-05-23 earth, take 92 - evening earth from 45,000 kms.png'
2012-05-23 earth, take 92 - evening earth from 45,000 kms.png

Preview of image '2012-05-23 earth, take 111 - moscow from 4,000 kms, evening view.png'
2012-05-23 earth, take 111 - moscow from 4,000 kms, evening view.png

Preview of image '2012-05-23 earth, take 128 - north pole from 20,000 kms, daylight view.png'
2012-05-23 earth, take 128 - north pole from 20,000 kms, daylight view.png


 

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