|
![](/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!
I found to equations that fit the bill. However, I don't know which one to
choose. Both are said to model the behavior of electric fields. One is from
Wikipedia, the other is from a GameDev.net article.
Here is the first:
#declare Blob_threshold = pow(2,frame_number-3);
#declare fn_A = function { 1.5*Scene_scale / sqrt(pow(x+1*Scene_scale,2) +
pow(y,2) + pow(z,2)) };
#declare fn_B = function { 1.5*Scene_scale / sqrt(pow(x-1*Scene_scale,2) +
pow(y,2) + pow(z,2)) };
#declare fn_C = function { Blob_threshold };
#declare fn_D = function { fn_A(x,y,z) + fn_B(x,y,z) - fn_C(x,y,z) };
#declare fn_E = function { max(0,min(1,fn_D(x,y,z))) };
Here is the second:
#declare Blob_threshold = clock;
#declare fn_A = function { 1.5*Scene_scale / (pow(x+1*Scene_scale,2) + pow(y,2)
+ pow(z,2)) };
#declare fn_B = function { 1.5*Scene_scale / (pow(x-1*Scene_scale,2) + pow(y,2)
+ pow(z,2)) };
#declare fn_C = function { Blob_threshold };
#declare fn_D = function { fn_A(x,y,z) + fn_B(x,y,z) - fn_C(x,y,z) };
#declare fn_E = function { max(0,min(1,fn_D(x,y,z))) };
Which of the two is correct in terms of modeling nature?
-Mike
Post a reply to this message
|
![](/i/fill.gif) |