POV-Ray : Newsgroups : povray.binaries.images : A Man in a Strange World : Re: A Man in a Strange World Server Time
7 Aug 2024 23:21:32 EDT (-0400)
  Re: A Man in a Strange World  
From: Zeger Knaepen
Date: 1 Nov 2005 18:44:58
Message: <4367fdfa@news.povray.org>
"gerberc" <ni.### [at] bluewinch> wrote in message 
news:web.4367c7f9eaacc993e249c31f0@news.povray.org...
> Render time was about 5.5 h at 2000x1500 pixels on a 3.6 GHz P4 
running
> under Win XP. No radiosity and no area_lights though, just the sun and 
one
> shadowless fill light. The slowest thing was the sky (media clouds).

Hmmm, strange, the clouds aren't the most impressive part of the image 
(although that's because the rest is *very* impressive).

Maybe my fastclouds might help here.  They're not really 3D, so they're 
not 100% accurate, but they look good enough and render fast (see image, 
rendered at 640*480 on an Athlon XP 2500+ under Windows XP, while typing 
this message, in 8 seconds)

--- code: ---

#macro fastclouds(LS,Cast,Fluffyness,Translate,Scale,Scale2,MinT)
 #ifndef (CloudForm)
  #declare CloudForm=
  pigment {
   bumps
   warp {turbulence .75 lambda 3}
   scale 10
   warp {turbulence .5 lambda 3}
   scale 1/10
   scale 100
   warp {turbulence 1 lambda 2}
   scale 1/100
   rotate 45
  }
 #end
 #declare Clouds=
 pigment {
  pigment_pattern{CloudForm}
  color_map {
   [(1-Cast) rgb 0]
   [(1-Cast)+Fluffyness rgb 1]
  }
  translate Translate
  scale Scale2 
 }
 #declare Clouds3=
 pigment {
  pigment_pattern{CloudForm}
  color_map {
   [(1-Cast)-Fluffyness/5 rgb 0]
   [(1-Cast)+Fluffyness*1.5 rgb 1]
  }
  translate Translate
  scale Scale2 
 }
 #local Clouds2=
 pigment {
  pigment_pattern{CloudForm}
  color_map {
   [(1-Cast)/1 rgb 0]
   [1+Fluffyness rgb 1]
  }
  translate Translate
  translate -vnormalize(LS)*.25*Cast
  scale Scale2 
 }
 #declare Cloudsphere=
 sphere {
  0,1
  pigment {
   pigment_pattern {Clouds}
   pigment_map {
    [0 
     pigment_pattern {Clouds2}
     color_map {
      [0 rgb 1 transmit 1]
      [1 rgb .5 transmit 1]
     }
    ]
    [1 
     pigment_pattern {Clouds2}
     pigment_map {
      [0 rgb (1*MinT)+LColor*(1-MinT) transmit .5+MinT/2]
      [1 rgb MinT filter 1]
     }
    ]
   }
  }
  finish {ambient 1 diffuse 0}
  scale 500
  translate -y*450
  scale Scale
  hollow
 }
 object {Cloudsphere}
#end

--- end code ---

--- usage: ---

// usage for this demo-image
#declare CloudForm= // the shapes of the clouds
pigment {
 bumps
 warp {turbulence .75 lambda 3}
 scale 10
 warp {turbulence .5 lambda 3}
 scale 1/10
 scale 100
 warp {turbulence 1 lambda 2}
 scale 1/100
 rotate 45
}
#declare LS=<-50000,35000,50000>*1000; //Sun light_source location
#declare Cast=.4; // 0: no clouds, 1: fully overcast, can be higher 
than 1
#declare Fluffyness=.3; // 0: very hard-edged clouds, 1: very soft 
clouds
#declare Translate=15; // translation of the cloud-pattern
#declare Scale = 100; // scale of the cloud-pattern
#declare Scale2=.045; //uhm, I forgot :)
#declare MinT=.025; // minimum transparency of the clouds (can be seen 
as the inverse of the "thickness" of the cloud-layer)
fastclouds(LS,Cast,Fluffyness,Translate,Scale,Scale2,MinT)

--- end usage ---

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message


Attachments:
Download 'fastclouds-macro.jpg' (76 KB)

Preview of image 'fastclouds-macro.jpg'
fastclouds-macro.jpg


 

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