POV-Ray : Newsgroups : povray.beta-test : Differenced isosurface texture problem Server Time
1 Nov 2024 23:14:54 EDT (-0400)
  Differenced isosurface texture problem (Message 1 to 2 of 2)  
From: Jeff M  Thomas
Subject: Differenced isosurface texture problem
Date: 29 Jan 2002 16:10:16
Message: <3c570fb8$1@news.povray.org>
Differenced isosurface texture problem

I apologize if this is a known issue; I searched the newsgroup and the known
bug list and didn't find anything relating to it.

There appears to be a problem with the textures on iso surfaces that
intersect in a difference CSG. At its worst the texture on the surface of
the subtracted area vanishes completely. What exactly happens depends on
what is intersecting with what, so I created this simple sample scene.

The scene has a difference between a green box and a red sphere, either one
can be a primitive or an iso surface depending on #declare settings. Given
how they are set you will see:

Primitive box, primitive sphere: a green box with a red half-sphere cutout.

Iso box, primitive sphere: same

Primitive box, iso sphere: a green box with a dark green half-sphere cutout.

Iso box, iso sphere: a green box with a clear round cutout, you can see the
ground plane through it.

POVWin v3.5b10, Windows 2000, Pentium III 700,  326MB
POVWin v3.5b10, Windows 98SE, Celeron 500,  192MB

 - J. M. Thomas

#version 3.5;

#include "colors.inc"
#include "functions.inc"


#declare iso_box = true;
#declare iso_sphere = true;


global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <-1.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}

difference
{
#if (iso_box)
  isosurface
  {
    function{ x+y+z }
    threshold 4
    contained_by{ box{ -0.75, 0.75 } }
    pigment{ Green }
    translate<0,0,.5>
  }
#else
  box
  {
    -0.75, 0.75
    pigment{ Green }
    translate<0,0,.5>
  }
#end // iso_box

#if (iso_sphere)
  isosurface
  {
    function{ f_sphere( x, y, z, .5 ) }
    contained_by{ box{ -.5, .5 } }
    pigment{ Red }
    translate<0,0,-0.5>
  }
#else
  sphere
  {
    0.0, .5
    pigment{ Red }
    translate<0,0,-0.5>
  }
#end // iso_sphere
}


Post a reply to this message

From: R  Suzuki
Subject: Re: Differenced isosurface texture problem
Date: 29 Jan 2002 20:29:32
Message: <3c574c7c$1@news.povray.org>
"Jeff M. Thomas" wrote 
> There appears to be a problem with the textures on iso surfaces that
> intersect in a difference CSG. 

See the last paragraph of POV-Help 6.5.4.1.
It might be better to add this to Q&A (9.1.2.8).

R. Suzuki


Post a reply to this message

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