POV-Ray : Newsgroups : povray.binaries.images : An isosurface cloud. : Re: An isosurface cloud. Server Time
1 May 2024 20:51:23 EDT (-0400)
  Re: An isosurface cloud.  
From: William F Pokorny
Date: 4 Sep 2023 06:32:26
Message: <64f5b23a@news.povray.org>
On 9/4/23 04:28, And wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> Using several povr features, tried my hand at rendering an isosurface
>> cloud this afternoon. Like media, it takes some twiddling. Using +am1
>> +a0.0 +r9 to force a large amount of sampling, one light for the sun and
>> radiosity it took about 30 minutes on my two core, four thread i3.
>>
>> How many shapes - bazillions :-).
>>
>> Bill P.
> 
> I browse here at the first time.
> It is good, how do you render such an image with a "surface"?
> 

Hi. I've attached an image and will paste in the POV-Ray (povr) scene 
file used to create the sub-images. Your question gives me a chance to 
show povr's 'pattern_modifiers' feature too!

On the left is the f_sphere() modified, but still with no turbulence. 
The center image applied a gentle warp { turbulence ...}.

Your question is answered with the image on the right where a violent 
warp turbulence was applied; one which blows the isosurface apart.

The max gradient jumps way up - but we'd ignore it (povr's isosurface 
'report off') in any more complex scene. The max_gradient you use 
becomes a particle sampling setting. For a cloud, or bush, or tree 
foliage you want the isosurface to act like a collection of particles.

Bill P.


//-------------------------------- isoCloudsExmpl.pov
#version unofficial 3.8; // povr
#if (file_exists("version.inc"))
     #include "version.inc"
#end
#if (!defined(Fork_povr))
     #error "This POV-Ray SDL code requires the povr fork."
#end
global_settings { assumed_gamma 1 }
#declare Grey10 = srgb <0.1,0.1,0.1>;
background { Grey10*0.3 }
#declare Camera00 = camera {
     perspective
     location <3,3,-3.001>*0.7
     sky y
     angle 35
     right x*(image_width/image_height)
     look_at <0,0,0>
}
#declare White = srgb <1,1,1>;
#declare Light00 = light_source { <50,150,-250>, White }

// The focus is just below. It shows the use of the
// pattern_modifiers keyword as a way to use the spacial
// modifiers, POV-Ray users know, to manipulate inbuilt functions.

#include "functions.inc"
// Function f_sphere defined in functions.inc
// Bang on a f_sphere() function
#declare Black = srgb <0,0,0>;
#declare PigMods00 = pigment {
     color Black
     rotate 45*x
     scale <1.3,2.3,0.2>
     rotate -15*y
     #if     (0)
         warp { turbulence <0.2,0.2,0.2>
                octaves 3 omega 0.37 lambda 1.75 }
     #elseif (1)
         warp { turbulence <0.2,0.2,0.2>
                octaves 7 omega 0.87 lambda 7.75 }
     #end
}
#declare FnPigMods00 = function {
     pattern_modifiers { PigMods00 }
}
#declare Fn00 = function (x,y,z) {
     f_sphere(FnPigMods00(x,y,z).x,
              FnPigMods00(x,y,z).y,
              FnPigMods00(x,y,z).z,0.3)
}
#declare ChartreuseGreen = srgb <0.50196,1,0.05>;
#declare Isosurface00 = isosurface {
     function { Fn00(x,y,z) }
     contained_by { box { -1.0,1.0 } }
     report on
     threshold 0
     accuracy 0.0005
     max_gradient 17.0
     max_trace 1
     pigment { color ChartreuseGreen }
}

//--- scene ---
     camera { Camera00 }
     light_source { Light00 }
     object { Isosurface00 finish { phong 0.6 phong_size 20} }


Post a reply to this message


Attachments:
Download 'isocloudsexmpl.png' (81 KB)

Preview of image 'isocloudsexmpl.png'
isocloudsexmpl.png


 

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