POV-Ray : Newsgroups : povray.binaries.images : Blob: problem or no problem? : Re: Blob: problem or no problem? Server Time
29 May 2024 04:44:35 EDT (-0400)
  Re: Blob: problem or no problem?  
From: Cousin Ricky
Date: 18 Jul 2015 15:37:40
Message: <55aaab04@news.povray.org>
On 2015-07-18 04:30 AM (-4), LanuHum wrote:
> Picture shows results of Blender Internal Render and POV-Ray.
> I can achieve smoothing as in Internal or not?


Does Blender use a different blob formula?  I wrote my own blob formula, 
to be implemented as an isosurface, which often gives smoother results 
than POV-Ray's native blob, showing that the formula makes a difference.

However, mine still shows a slight discontinuity.  My brain is too fuzzy 
right now to dive into the calculus, but it seems that what POV-Ray's 
formula and mine have in common is that they both have a discontinuity 
(probably at the 2nd derivative level) where the field of one component 
intersects the surface of another.  The massive Photoshop engine in our 
visual cortex is sensitive to this discontinuity, although you cannot 
see it by looking at a silhouette of the object.

Note:  For all three attachments, the object was translated so that it 
would be centered in my prefab render rig.  This translation is not 
shown in the code excerpts below.

----------[BEGIN CODE EXCERPT: lanuhum-blob1.jpg]----------
blob
{ threshold 0.8
   sphere
   { <0,0,0>, 1.702, 2
     scale <1.775,1.775,1.775>
     translate <-0.919648, 0.000000, 0.000000>
   }
   sphere
   { <0,0,0>, 1.702, 2
     scale <1.775,1.775,1.775>
     rotate <-2.504e-06,-0,0>
     translate <-4.598535, 0.000000, 0.000000>
   }
}
-----------[END CODE EXCERPT: lanuhum-blob1.jpg]-----------

----------[BEGIN CODE EXCERPT: lanuhum-blob3.jpg]----------
#include "functions.inc"
#include "roundedge.inc" // available from the Object Collection

// Copied from LanuHum's blob:
#declare Ctr1 = <-0.919648, 0.000000, 0.000000>;
#declare Ctr2 = <-4.598535, 0.000000, 0.000000>;
#declare Rf = 1.702;
#declare Size = 1.775;
#declare Strength = 2;
#declare Threshold = 0.8;

// Derived values:
#declare Rs = RE_fn_Blob_surface_radius (Rf, Strength / Threshold);
#declare X1 = Ctr1.x;
#declare X2 = Ctr2.x;
#declare Blobbiness = (Rf - Rs) * Size;

#declare Container = box
{ -<2, 1, 1>, <2, 1, 1>
   scale Rs * Size
   translate (Ctr1 + Ctr2) / 2
}
isosurface
{ function
   { 1 - sqrt
     ( RE_fn_Blob2 (f_sphere (x - X1, y, z, Rs * Size), Blobbiness)
     + RE_fn_Blob2 (f_sphere (x - X2, y, z, Rs * Size), Blobbiness)
     )
   }
   contained_by { box { min_extent (Container), max_extent (Container) } }
   max_gradient 1 / Blobbiness
   accuracy 0.0001
}
-----------[END CODE EXCERPT: lanuhum-blob3.jpg]-----------

----------[BEGIN CODE EXCERPT: lanuhum-blob4.jpg]----------
#include "functions.inc"
#include "roundedge.inc" // available from the Object Collection

// Copied from LanuHum's blob:
#declare Ctr1 = <-0.919648, 0.000000, 0.000000>;
#declare Ctr2 = <-4.598535, 0.000000, 0.000000>;
#declare Rf = 1.702;
#declare Size = 1.775;
#declare Strength = 2;
#declare Threshold = 0.8;

// Derived values:
#declare Rs = RE_fn_Blob_surface_radius (Rf, Strength / Threshold);
#declare X1 = Ctr1.x;
#declare X2 = Ctr2.x;
#declare Blobbiness = (Rf - Rs) * Size * 1.2; // 1.2 is a fudge.

#declare Container = box
{ -<2, 1, 1>, <2, 1, 1>
   scale Rs * Size
   translate (Ctr1 + Ctr2) / 2
}
isosurface
{ function
   { 1 - sqrt
     ( RE_fn_Blob2 (f_sphere (x - X1, y, z, Rs * Size), Blobbiness)
     + RE_fn_Blob2 (f_sphere (x - X2, y, z, Rs * Size), Blobbiness)
     )
   }
   contained_by { box { min_extent (Container), max_extent (Container) } }
   max_gradient 1 / Blobbiness
   accuracy 0.0001
}
-----------[END CODE EXCERPT: lanuhum-blob4.jpg]-----------


Post a reply to this message


Attachments:
Download 'lanuhum-blob1.jpg' (24 KB) Download 'lanuhum-blob3.jpg' (25 KB) Download 'lanuhum-blob4.jpg' (26 KB)

Preview of image 'lanuhum-blob1.jpg'
lanuhum-blob1.jpg

Preview of image 'lanuhum-blob3.jpg'
lanuhum-blob3.jpg

Preview of image 'lanuhum-blob4.jpg'
lanuhum-blob4.jpg


 

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