POV-Ray : Newsgroups : povray.advanced-users : Unexpected isosurface (dis)appearance Server Time
21 Dec 2024 22:03:21 EST (-0500)
  Unexpected isosurface (dis)appearance (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: Unexpected isosurface (dis)appearance
Date: 4 Aug 2018 08:50:00
Message: <web.5b65a0da640ec8d0458c7afe0@news.povray.org>
So, I was just starting a small scene to use clipped_by in, and something's
going on with the isosurface that's making it very confusing and difficult to
interpret.
Using the first camera location, you can see that it looks like there is no
"back" to the shape.  Using the second camera location from above, you can see
that they are indeed whole shapes.
I tried using open, interior_texture, a larger contained_by box{}, ....

I'm not understanding why I can see _through_ the shape to the checkered plane
in the background.  :(




#version 3.8;
global_settings {assumed_gamma 1.0}

#include "colors.inc"

camera {
   location <0, 1, -12>
   //location <0, 12, 0>
  look_at  <0, 0, 0>
  right x*image_width/image_height
  up y
}

sky_sphere {pigment {rgb <0.5, 0.5, 1>}}
plane {y, -3 pigment {checker}}

light_source {<0, 5, -30> color White}

#declare F_ellipsoid = function (x, y, z, a, b, c, R) {(pow(x,2)/pow(a,2)) +
(pow(y,2)/pow(b,2)) + (pow(z,2)/pow(c,2)) - R}

#declare R = 1;
#declare a = 1.0 * R;
#declare b = 0.7 * R;
#declare c = 1.0 * R;

// for dynamic adapting of the max_gradient value
#declare Min_factor = 0.6; // between 0 and 1
#declare MaxGradient = 9;
#declare P0 = MaxGradient*Min_factor;
#declare P1 = sqrt(MaxGradient/(MaxGradient*Min_factor));
#declare P2 = 0.7;  // between  0 and 1

#for (R, 1, 3)
#declare Ellipsoid =
isosurface {
 function {F_ellipsoid (x, y, z, a, b, c, R)}
 //open
 //function {abs (F_ellipsoid (x, y, z)) -0.1}
 accuracy 0.001
 //max_gradient 3
 evaluate P0, P1, min (P2, 1)
 //contained_by {sphere {0, R}}
 contained_by {box {<-R, -R, -R>, <R, R, 3*R>}}
 texture {pigment {rgb <0, 0.3*R, 1>} finish {specular 0.2}}
 interior_texture {pigment {rgb <1, 0.3*R, 0>} finish {specular 0.2}}
}

object {Ellipsoid clipped_by {box {<-R, -R, -R*0.9>, <R, R, 3*R>}} translate
x*(-6+(R*3))}
#end


Post a reply to this message

From: clipka
Subject: Re: Unexpected isosurface (dis)appearance
Date: 4 Aug 2018 09:40:02
Message: <5b65acb2$1@news.povray.org>
Am 04.08.2018 um 14:49 schrieb Bald Eagle:
> So, I was just starting a small scene to use clipped_by in, and something's
> going on with the isosurface that's making it very confusing and difficult to
> interpret.
> Using the first camera location, you can see that it looks like there is no
> "back" to the shape.  Using the second camera location from above, you can see
> that they are indeed whole shapes.
> I tried using open, interior_texture, a larger contained_by box{}, ....

Because isosurfaces can be arbitrarily complex, by default only the
first N intersections along the ray are computed. `clipped_by` handling
is done in a later stage, so if those N intersections are all outside
the `clipped_by` shape, no further intersections will be computed, and
the object will appear to have a hole there. The same also happens in
non-union CSG.

You can change N by specifying `max_trace N` in the isosurface block.
Alternatively, you can specify `all_intersections` to set N to the
maximum supported value.

The default for N is 1, the maximum is 10.

The higher N, the slower the isosurface will render.


Post a reply to this message

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