POV-Ray : Newsgroups : povray.bugreports : Bug between plane and media Server Time: 19 Aug 2019 14:28:36 GMT
  Bug between plane and media (Message 1 to 4 of 4)  
From: Warren
Subject: Bug between plane and media
Date: 10 Aug 2019 12:40:01
Message: <web.5d4ebaca708490849e68eb1f0@news.povray.org>
Hello / Hi
Some time ago I made a scene which includes a media in a sphere and a plane
among other objects. At first the above media wasn't displayed in the rendered
image. I first thought it was me who had done things wrong (bad coordinates,
etc..). But after some further investigations and tweaks in my scene, I had the
conviction the problem was due to a bug (though I'm not sure at 100%). I post
two scenes sums below with the essentials parts (no undeeded objects, just
enough to make the bug appearing: a plane and a media in a sphere with of course
a camera and a light source):

//A scene that works and displays a checkered plane in the background with a
media in the view:
#version 3.8;
global_settings{ assumed_gamma 1.0 }
camera{
 location <0, 1, -6>
 look_at <0, 0, 0>
 sky y
 right 1*x
 up 1*y
 direction 1*z
}

light_source{ <20, 20, -40> color srgb 1 }

plane{-z, -4 pigment{ checker color srgb <0, 0, 1>, color srgb <1, 1, 0> } }

sphere{ 0, 1 hollow on pigment{ color srgbft <0, 0, 0, 0, 1> }
  interior{
    media{ emission 1 samples 1,30 intervals 10
      density{
        spherical density_map{
          [0 color srgb 0 ]
          [0.4 color srgb <1, 1, 0> ]
          [1 color srgb <1, 0, 0> ]
        }
       warp{ turbulence 0.25 lambda 4 omega 0.6 }
      }
    }
  }
  translate -2*z
}

But if I change the plane statement line with the following:
plane{z, 4 pigment{ checker color srgb <0, 0, 1>, color srgb <1, 1, 0> } }

Removing the minus signs from 'z' and '4' hide the media when I render that
scene, but the checkered plane is well displayed.

Here is the output of the 'povray --version' command in the terminal:

POV-Ray 3.8.0-x.10064738.unofficial

This is an unofficial version compiled by:
 Antoine FAURE <www.ant01.fr>
 The POV-Ray Team is not responsible for supporting this version.

Copyright 1991-2019 Persistence of Vision Raytracer Pty. Ltd.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          enabled (using SDL)
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff openexr
  Unsupported image formats: -

Compilation settings:
  Build architecture:  x86_64-pc-linux-gnu
  Built/Optimized for: x86_64-pc-linux-gnu (using -march=native)
  Compiler vendor:     gnu
  Compiler version:    g++-8 8
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -Wno-non-template-friend -Wsuggest-override -s -O3
-ffast-math -march=native -pthread

------------------------------------
You will notice that changing '#version 3.8;' to '#version 3.7;' doesn't change
anything ( just the same result while rendering scene ).


Post a reply to this message

From: Bald Eagle
Subject: Re: Bug between plane and media
Date: 10 Aug 2019 19:10:00
Message: <web.5d4f159cc5e0ae964eec112d0@news.povray.org>
"Warren" <nomail@nomail> wrote:

Hi Warren -
I haven't rendered your scene yet, but I have the sneaking suspicion that what
you're seeing is the inversion of the plane.


"But if I change the plane statement line with the following:
plane{z, 4 pigment{ checker color srgb <0, 0, 1>, color srgb <1, 1, 0> } }

Removing the minus signs from 'z' and '4' hide the media when I render that
scene, but the checkered plane is well displayed."

So, a plane isn't an infinitely thin sheet - it's a "half-space".
Take the POV universe and slice it in half - one side of the slice is "inside"
the plane, and the other part is "outside".

Maybe texture your plane with rgbft 1 and see if you media "reappears".

I think when you switch from -z to z, the boundary/dividing plane stays the same
since you change the sign of the offset as well, but now you've switched inside
and outside.

Maybe add "inverse" to your new plane and see what happens.
Difference away another perpendicular plane, or a very large box, and see if
that uncovers a region of visible media.

Bill


Post a reply to this message

From: Bald Eagle
Subject: Re: Bug between plane and media
Date: 10 Aug 2019 23:20:01
Message: <web.5d4f503ac5e0ae964eec112d0@news.povray.org>
//A scene that works and displays a checkered plane in the background with a
media in the view:
#version 3.8;
global_settings{ assumed_gamma 1.0 }
camera{
 location <0, 1, -6>
 look_at <0, 0, 0>
 sky y
 right 1*x
 up 1*y
 direction 1*z
 rotate -x*90
}

light_source{ <20, 20, -40> color srgb 1 }

#declare Mode = 0;  // <--- change this to see what I mean


plane{z, 4 pigment{ checker color srgb <0, 0, 1>, color srgb <1, 1, 0> }
#if (Mode) inverse #end

}

sphere{ 0, 1 hollow on pigment{ color srgbft <0, 0, 0, 0, 1> }
  interior{
    media{ emission 1 samples 1,30 intervals 10
      density{
        spherical density_map{
          [0 color srgb 0 ]
          [0.4 color srgb <1, 1, 0> ]
          [1 color srgb <1, 0, 0> ]
        }
       warp{ turbulence 0.25 lambda 4 omega 0.6 }
      }
    }
  }
  translate -2*z
}

//But if I change the plane statement line with the following:
//plane{z, 4 pigment{ checker color srgb <0, 0, 1>, color srgb <1, 1, 0> } }


Post a reply to this message

From: Warren
Subject: Re: Bug between plane and media
Date: 11 Aug 2019 09:25:01
Message: <web.5d4fdebec5e0ae969e68eb1f0@news.povray.org>
@Bald Eagle : Ok, I see (after testing your scene). Until now, I
thought the plane object was only a thin leaf, but now it's over. ;-D . To tell
the truth I was a little surprised that long time object like plane cause such
simple 'bug' that nobody found out before. Thank you anyway.


Post a reply to this message

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