POV-Ray : Newsgroups : povray.binaries.images : bright specks intersecting media objects Server Time
28 Dec 2024 13:37:05 EST (-0500)
  bright specks intersecting media objects (Message 1 to 5 of 5)  
From: omniverse
Subject: bright specks intersecting media objects
Date: 4 Jan 2017 07:55:01
Message: <web.586ceedd76c376849c5d6c810@news.povray.org>
Couldn't find a solution to this problem by changing media parameters so I
wonder if it's possible to remove these specks at all or if there's a bug in the
media code.

For now I only found box and boxed pattern to be the worst but I've seen it to a
lesser degree using sphere and spherical, also very much less using torus and
toroidal warp.

The rendering shown here was post-processed just to overlay a 10% transparent
image from the intersection of the 2 boxes and how the specks mainly align with
those mutual lines. However, 4 specks don't appear to coincide with intersecting
surfaces (lower right).

/* test boxed pattern media bright specks */

//cmd:+oc:\renderings\testmediaspecks

//cmd:+oc:\renderings\testmediaspecksintersect

#version 3.7;

camera {
 location -x*4 look_at 0
 up y
 right image_width/image_height*x
 //angle 30
}

// try with and without this scene container (camera inside)
box{-9,9 hollow pigment{rgb 0.1}} // specks much more apparent

#local Intersect=no; // check how boxes intersect?

#if(Intersect=yes) intersection{ #end

#for(It,0,1,1) // create multiple boxes

box
{
 -1, 1
 hollow on
 pigment
 {
  rgbt 1
 }
 interior
 {
  media
  {
   //method 1
   //intervals 30
   //confidence 0.9
   //variance 1/128
   //ratio 0.5
   //jitter 0.9
   //aa_threshold 0.1
   //aa_level 3
   //samples 33
   emission <0.1,0.1,0.8>
   //absorption 1
   density
   {
    boxed // box pattern centered on <0,0,0>
    density_map
    {
     [0 rgb 1] [0.1 rgb 0] [1 rgb 0]
    }
    //scale 1.01
   }
  }
 }
 rotate <30,30,30>*It
 translate -<1,1,1>*It/2+<1,1,1>*It/2
}

#end

#if(Intersect=yes) } #end

/* END TEST MEDIA SPECKS */


Post a reply to this message


Attachments:
Download 'test_media-specks_intersect.jpg' (28 KB)

Preview of image 'test_media-specks_intersect.jpg'
test_media-specks_intersect.jpg


 

From: Alain
Subject: Re: bright specks intersecting media objects
Date: 4 Jan 2017 20:04:53
Message: <586d9bb5$1@news.povray.org>

> Couldn't find a solution to this problem by changing media parameters so I
> wonder if it's possible to remove these specks at all or if there's a bug in the
> media code.
>
> For now I only found box and boxed pattern to be the worst but I've seen it to a
> lesser degree using sphere and spherical, also very much less using torus and
> toroidal warp.
>
> The rendering shown here was post-processed just to overlay a 10% transparent
> image from the intersection of the 2 boxes and how the specks mainly align with
> those mutual lines. However, 4 specks don't appear to coincide with intersecting
> surfaces (lower right).
>
> /* test boxed pattern media bright specks */
>
> //cmd:+oc:\renderings\testmediaspecks
>
> //cmd:+oc:\renderings\testmediaspecksintersect
>
> #version 3.7;
>
> camera {
>  location -x*4 look_at 0
>  up y
>  right image_width/image_height*x
>  //angle 30
> }
>
> // try with and without this scene container (camera inside)
> box{-9,9 hollow pigment{rgb 0.1}} // specks much more apparent
>
> #local Intersect=no; // check how boxes intersect?
>
> #if(Intersect=yes) intersection{ #end
>
> #for(It,0,1,1) // create multiple boxes
>
> box
> {
>  -1, 1
>  hollow on
>  pigment
>  {
>   rgbt 1
>  }
>  interior
>  {
>   media
>   {
>    emission <0.1,0.1,0.8>
>    //absorption 1
>    density
>    {
>     boxed // box pattern centered on <0,0,0>
>     density_map
>     {
>      [0 rgb 1] [0.1 rgb 0] [1 rgb 0]
>     }
>     //scale 1.01
>    }
>   }
>  }
>  rotate <30,30,30>*It
>  translate -<1,1,1>*It/2+<1,1,1>*It/2
> }
>
> #end
>
> #if(Intersect=yes) } #end
>
> /* END TEST MEDIA SPECKS */
>

The first thing that I would do is try binding the boxes in a merge.
Another thing to try would be to slightly enlarge the containing boxes :
box{-1.01, 1.01 ...rest of the definition here...}
That also mean altering your density_map :
density_map{ [0 rgb 0][1e-6 rgb 1][0.1 rgb 0] }


Post a reply to this message

From: omniverse
Subject: Re: bright specks intersecting media objects
Date: 4 Jan 2017 21:10:01
Message: <web.586daabcd75225c89c5d6c810@news.povray.org>
Alain <kua### [at] videotronca> wrote:
>
> The first thing that I would do is try binding the boxes in a merge.

This needs all surfaces, or rather the shaped media to show but I gave it a try
anyhow. If the outer containing box is removed I couldn't see specks but the
media loses each individual box shape.
Putting containing box back in shows triangular parts just like intersection
does to it.

> Another thing to try would be to slightly enlarge the containing boxes :
> box{-1.01, 1.01 ...rest of the definition here...}
> That also mean altering your density_map :
> density_map{ [0 rgb 0][1e-6 rgb 1][0.1 rgb 0] }

Thanks for trying to help Alain, unfortunately I wasn't able to fix it that way
either. I had already tried that before, changing media thickness and scaling
it. Checked that again just now, same bright specks.

I was thinking it might have been the pattern coinciding with the shape exactly
and needed to be offset slightly, I guess not. It's more like the box (and
sphere, others?) intersecting points of surfaces cause a complication for the
media.

Bob


Post a reply to this message

From: clipka
Subject: Re: bright specks intersecting media objects
Date: 4 Jan 2017 23:18:16
Message: <586dc908@news.povray.org>
Am 04.01.2017 um 13:50 schrieb omniverse:
> Couldn't find a solution to this problem by changing media parameters so I
> wonder if it's possible to remove these specks at all or if there's a bug in the
> media code.

Looks like a coincident surfaces problem to me: When a ray hits the
surface of one of the boxes, and very shortly thereafter the surface of
the other one, POV-Ray may miss that second intersection, and lose track
whether it is inside or outside that box. In such cases, POV-Ray might
erroneously come to the conclusion that the interior of the box
(including the media) extends to infinity.

If that is the case, then increasing the overall scale of the scene
should do some good.


Post a reply to this message

From: omniverse
Subject: Re: bright specks intersecting media objects
Date: 5 Jan 2017 09:20:00
Message: <web.586e558cd75225c89c5d6c810@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 04.01.2017 um 13:50 schrieb omniverse:
> > Couldn't find a solution to this problem by changing media parameters so I
> > wonder if it's possible to remove these specks at all or if there's a bug in the
> > media code.
>
> Looks like a coincident surfaces problem to me: When a ray hits the
> surface of one of the boxes, and very shortly thereafter the surface of
> the other one, POV-Ray may miss that second intersection, and lose track
> whether it is inside or outside that box. In such cases, POV-Ray might
> erroneously come to the conclusion that the interior of the box
> (including the media) extends to infinity.
>
> If that is the case, then increasing the overall scale of the scene
> should do some good.

That was it! I almost did that but was stubborn about thinking it should be okay
at 0.1+ POV Unit sizes.

Factored everything by 100. Added scale 100 for each box and 1/100 of media
density. No speckles.

Thanks a bunch Clipka.

No bug to fix but does have me thinking this isn't the first time rescaling a
scene larger has been the answer. I'm one of those people who delve into the
small decimal regions of POV space often enough to encounter trouble, so thank
goodness for the earlier fixes.

If anything maybe there should be a troubleshooting section of the documentation
that simply says, "Build it bigger!", or smaller if the opposite causes
problems.
;)

Bob


Post a reply to this message

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