POV-Ray : Newsgroups : povray.binaries.images : Why is there a gap between my df3 media boxes? Server Time
4 Nov 2024 17:32:17 EST (-0500)
  Why is there a gap between my df3 media boxes? (Message 1 to 9 of 9)  
From: Martin Magnusson
Subject: Why is there a gap between my df3 media boxes?
Date: 25 Apr 2008 04:01:14
Message: <48118fca@news.povray.org>
I'm plotting a continuous function in 3D with df3 files and media, using
a number of boxes with media. However, at the transition between
media-filles boxes, there are small gaps. Can someone explain why?

Attached is a rendition of two of the boxes. The df3 files have 10x10x10
entries. Below is the upper plane of the lower box in text format:

     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     4    1    0    0    0    0    0    0    0    0
    95   70   39   16    5    1    0    0    0    0
   139  227  255  224  130   58   25    9    2    0
    11   35   80  135  177  198  210  170  108   55
     0    0    1    3    9   26   67  131  196  222

And the lower plane of the upper box is:

     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     0    0    0    0    0    0    0    0    0    0
     4    1    0    0    0    0    0    0    0    0
    94   71   40   16    5    1    0    0    0    0
   142  233  255  232  134   60   24    8    2    0
     9   32   75  129  172  196  207  166  102   50
     0    0    0    2    8   23   63  128  192  216

As far as I can see, there should be a smooth transition between the two
boxes. Can someone explain where the gap that shows in the image comes
from? I have also attached a scene file that renders this image.


Post a reply to this message


Attachments:
Download 'df3_test.png' (13 KB) Download 'df3_test.pov.txt' (2 KB)

Preview of image 'df3_test.png'
df3_test.png

From: Woland
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 25 Apr 2008 09:20:01
Message: <web.4811d9d41245a67d1826ef6e0@news.povray.org>
In my opinion there is no continuity between two boxes, You have a big jump
between values in lower part of upper box and upper part of lower box (:)).
You should make it more smooth. But maybe i understand You question wrong :(.


Post a reply to this message

From: Martin Magnusson
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 25 Apr 2008 09:40:36
Message: <4811df54$1@news.povray.org>
Woland wrote:
> In my opinion there is no continuity between two boxes, You have a big jump
> between values in lower part of upper box and upper part of lower box (:)).

Thanks for your reply, but I don't think so. It's probably a little
difficult to make sense of the numbers I posted before, but looking at
the left column of the numbers in my previous post (which corresponds to
the part that is closest to the camera in the image), the values of the
neighbouring voxels in the two boxes are 0-0, 4-4, 95-94, 139-142, 11-9.
Isn't that close enough? Judging from the dark band in the image, I
would have expected to find values mostly below 100 in these two slices.

Just in case anyone wants to look at it more closely, I'm attaching the
two df3 files here.


Post a reply to this message


Attachments:
Download '00001017.df3.dat' (1 KB) Download '00001325.df3.dat' (1 KB)

From: Alain
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 25 Apr 2008 11:02:30
Message: <4811f286$1@news.povray.org>
Martin Magnusson nous illumina en ce 2008/04/25 04:01 -->
> I'm plotting a continuous function in 3D with df3 files and media, using
> a number of boxes with media. However, at the transition between
> media-filles boxes, there are small gaps. Can someone explain why?
> 
> Attached is a rendition of two of the boxes. The df3 files have 10x10x10
> entries. Below is the upper plane of the lower box in text format:
> 
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      4    1    0    0    0    0    0    0    0    0
>     95   70   39   16    5    1    0    0    0    0
>    139  227  255  224  130   58   25    9    2    0
>     11   35   80  135  177  198  210  170  108   55
>      0    0    1    3    9   26   67  131  196  222
> 
> And the lower plane of the upper box is:
> 
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      0    0    0    0    0    0    0    0    0    0
>      4    1    0    0    0    0    0    0    0    0
>     94   71   40   16    5    1    0    0    0    0
>    142  233  255  232  134   60   24    8    2    0
>      9   32   75  129  172  196  207  166  102   50
>      0    0    0    2    8   23   63  128  192  216
> 
> As far as I can see, there should be a smooth transition between the two
> boxes. Can someone explain where the gap that shows in the image comes
> from? I have also attached a scene file that renders this image.
> 
> 
> ------------------------------------------------------------------------
> 
Just use une single box twice as high and put the two media in it, translated as 
needed. When you have more than one media in a container, they add toggether.
Your container and media become:

box{0,1 scale 2*z
   hollow
   pigment{ color rgbt 1 }
   interior{
     media{
       emission 1
       density{
	density_file df3 "00001325.df3"
	interpolate 0
		translate z
		}
	}

     media{
       emission 1
       density{
	density_file df3 "00001325.df3"
	interpolate 0
		}
	}


   }
   translate <4, 4, 3>
}

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you resign the fact that printing 
uses CMYK instead of RGB to one of those tests God gave to Job; otherwise life 
would be too painful to go on.
     -- Taps a.k.a. Tapio Vocadlo


Post a reply to this message

From: stbenge
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 25 Apr 2008 18:56:13
Message: <4812618d@news.povray.org>
Martin Magnusson wrote:
> As far as I can see, there should be a smooth transition between the two
> boxes. Can someone explain where the gap that shows in the image comes
> from? I have also attached a scene file that renders this image.

Perhaps POV is interpolating values outside your density. It may be 
treating everything outside as 0 and smoothing white values to black 
ones. Try adding a border around your density so that black areas abut 
black, and white areas abut white.

Sam


Post a reply to this message

From: Alain
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 26 Apr 2008 19:40:04
Message: <4813bd54@news.povray.org>
Alain nous illumina en ce 2008/04/25 11:02 -->

> Just use une single box twice as high and put the two media in it, 
> translated as needed. When you have more than one media in a container, 
> they add toggether.
> Your container and media become:
> 
> box{0,1 scale 2*z
>   hollow
>   pigment{ color rgbt 1 }
>   interior{
>     media{
>       emission 1
>       density{
>     density_file df3 "00001325.df3"
>     interpolate 0
>         translate z
>         }
>     }
> 
>     media{
>       emission 1
>       density{
>     density_file df3 "00001325.df3"
>     interpolate 0
>         }
>     }
> 
> 
>   }
>   translate <4, 4, 3>
> }
> 
And my render.

-- 
Alain
-------------------------------------------------
WARNING: The consumption of alcohol may make you think you are whispering when 
you are not.


Post a reply to this message


Attachments:
Download 't3t.jpg' (8 KB)

Preview of image 't3t.jpg'
t3t.jpg


 

From: Martin Magnusson
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 29 Apr 2008 08:42:45
Message: <481717c5$1@news.povray.org>
Alain wrote:
> Just use une single box twice as high and put the two media in it,
> translated as needed. When you have more than one media in a
> container, they add toggether.

Thanks a lot. That works well for getting rid of the gaps.

But now I have another problem with the same scene. When looking at the
media from certain angles, I get "jittery" artifacts, and sometimes the
media look like stacked planes instead of voxels. Also, when using
interpolation, the results are very strange.

See the attached images. The file df3_test-pos uses camera location
<5,0,0>, df3_test-neg uses camera location <-5,0,0>, and df3_test-int
also uses location <-5,0,0> and also "interpolate 2". The df3 file is
the same as in my previous post.

Why is df3_test-neg so noisy?


Post a reply to this message


Attachments:
Download 'df3_test-pos.png' (6 KB) Download 'df3_test-neg.png' (10 KB) Download 'df3_test-int.png' (8 KB) Download 'df3_test.pov.txt' (1 KB)

Preview of image 'df3_test-pos.png'
df3_test-pos.png

Preview of image 'df3_test-neg.png'
df3_test-neg.png

Preview of image 'df3_test-int.png'
df3_test-int.png

From: Alain
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 29 Apr 2008 12:45:55
Message: <481750c3@news.povray.org>
Martin Magnusson nous illumina en ce 2008/04/29 08:42 -->
> Alain wrote:
>> Just use une single box twice as high and put the two media in it,
>> translated as needed. When you have more than one media in a
>> container, they add toggether.
> 
> Thanks a lot. That works well for getting rid of the gaps.
> 
> But now I have another problem with the same scene. When looking at the
> media from certain angles, I get "jittery" artifacts, and sometimes the
> media look like stacked planes instead of voxels. Also, when using
> interpolation, the results are very strange.
> 
> See the attached images. The file df3_test-pos uses camera location
> <5,0,0>, df3_test-neg uses camera location <-5,0,0>, and df3_test-int
> also uses location <-5,0,0> and also "interpolate 2". The df3 file is
> the same as in my previous post.
> 
> Why is df3_test-neg so noisy?
> 
> 
I did notice those stripes with an animation that rotated it in a full circle. I 
don't know why it does that.

Using interpolate 1 give the best results. The gaps are more fuzzy, but still there.
interpolate 2 looks like it's broken in any cases where you have areas with a 
zero value. I get similar corruption with other DF3 files as well.

Using 3.7 beta don't change the problem with interpolate 2.

-- 
Alain
-------------------------------------------------
Beam me up Scotty. This isn't the men's room.


Post a reply to this message

From: Kenneth
Subject: Re: Why is there a gap between my df3 media boxes?
Date: 1 May 2008 14:20:00
Message: <web.481a08f71245a67d78dcad930@news.povray.org>
Martin Magnusson <mmn### [at] invaliddomain> wrote:

>
> Just in case anyone wants to look at it more closely, I'm attaching the
> two df3 files here.

Just thought I would note that, when I first ran your scene file (using one of
your posted df3 files), POV produced an error message: "Cannot read media
density file." Thinking about it a bit, I discovered something interesting (for
me, anyway, as I'm rather new to df3 usage.) Turns out that the scene file's
media density statement needs to be changed to

     density{
           density_file df3 "00001017.df3.dat"

because your uploaded df3 file is a .dat format file. Then it runs OK.
Alternately, the df3 file itself, wherever it's stored, can be renamed as just
00001017, and then called in the media density block as "00001017.dat"

I find this interesting because I assumed that POV's syntax for using a df3 file
was 'rigid,' in the sense that it had to be expressed *only* as "00001017.df3"

Other than that, I can't offer any useful advice on the problem you're having;
sorry.  My only suggestion would have been to up the media samples count; but
that doesn't help.

Ken W.


Post a reply to this message

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