|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> The example blob function at the end of the isosurface tutorial behaves
> differently at different scales, as can be seen in the example below. This is
> not a problem with the built-in blob object. I was wondering if anyone could
> provide a better formula for when using isosurfaces? Thanks!
Success!
I managed through trial and error to eliminate the variables that caused the
function to be affected by scale.
#declare Blob_threshold = clock;
#declare Blob_start = 1;
#declare fn_A = function { (pow(x+1*Scene_scale,2) + pow(y,2) + pow(z,2) -
pow(1.5*Scene_scale,2)) / pow(Scene_scale,2) };
#declare fn_B = function { (pow(x-1*Scene_scale,2) + pow(y,2) + pow(z,2) -
pow(1.5*Scene_scale,2)) / pow(Scene_scale,2) };
#declare fn_C = function { (Blob_threshold + Blob_start) }
#declare fn_D = function { pow(Blob_threshold, fn_A(x,y,z)) +
pow(Blob_threshold, fn_B(x,y,z)) - fn_C(x,y,z) };
#declare fn_E = function { max(0,min(1,fn_D(x,y,z))) };
The next step is to duplicate the results of the internal "blob" object.
Post a reply to this message
|
![](/i/fill.gif) |