POV-Ray : Newsgroups : povray.binaries.images : DF3 Interpolation Problem Server Time
14 Nov 2024 12:22:35 EST (-0500)
  DF3 Interpolation Problem (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: JeffBTX
Subject: DF3 Interpolation Problem
Date: 30 May 2009 12:30:01
Message: <web.4a215eb4e03c06cff8eed5c40@news.povray.org>
Please refer to this thread in the New Users section:
http://news.povray.org/povray.newusers/thread/%3Cweb.4a2091fa9ea5e81c2c1590090%40news.povray.org%3E/

The first post is:
http://news.povray.org/web.4a2091fa9ea5e81c2c1590090%40news.povray.org

Message header:
From: JeffBTX
Subject: DF3 / interpolation question
Date: 30 May 2009 02:00:01

Basically I am getting artifacts from DF3 files. Alain suggested a possible
solution; fill empty spaces with 1's instead of 0's. I tried it... the problem
was alleviated somewhat. I am still getting severe artifacts if a voxel is
placed EXACTLY at the corner of a media cube, so I "backed the voxel off" into
the cube away from the corner a little. I'm still getting artifacts.

====================
Here is the code that I used to display the DF3:
====================

include "colors.inc"

camera {location <0,1.5,-1.5> look_at <0,0,0>}

light_source {<10,0,-10> rgb 1}

// plane {z, 10 pigment {Gray50} hollow }

box {0, 1

  texture {
    pigment {rgbt 1}
  }

  interior {

    media {

//      emission 1*3
//      absorption 1*5
//      scattering {1, White*3 extinction 1}


      density {
        density_file df3 "ts10.df3" interpolate 0
      }

    }

  }
  hollow
  translate -0.5
  rotate <0,45,0>
}
====================

As you can see, one can comment out / uncomment any or all of the three media
types. For absorption media to show, there is a gray plane behind the media
cube that can be un-commented-out.

The three green cylinders help to orient the viewer.

====================


The attachment is a screenshot of the data inside the DF3 (a hexdump). This is a
10x10x10 DF3; but I am still having the problem with a 100x100x100; I used a 10x
DF3 to show the voxel better. The header is indicated by green boxes, the voxel
is indicated by a red box. The DF3 is of the proper filesize and I think it was
constructed properly; 10*10*10+6 = 1006 bytes.

As you can see, the offset of the voxel is at 075h. That puts the voxel *AT* the
second coordinate away from the forward, left, lower corner. The coord is XYZ =
2,2,2; subtracting 1 to bring into the range of 0 to 9 is 1,1,1; and then the
offset is 1 + (1*10) + (1*10*10) = 111, + 6 (for the header) is 117, and in hex
that is 075h.

As Alain suggested, I filled the blank DF3 with 01 instead of 00 before I
altered it for the voxel.

In further posts I will try to post a .ZIP of the DF3, and a screenshot of
renderings that displays the problem (this will be the first time I have tried
to post attachments, so we will see if this works...)


Post a reply to this message


Attachments:
Download 'panels.jpg' (245 KB)

Preview of image 'panels.jpg'
panels.jpg


 

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 12:35:01
Message: <web.4a215ff31aa18c33f8eed5c40@news.povray.org>
Okay

The attachment here UNZips to the small 1006 byte DF3 file that I used for this
experiment.


Post a reply to this message


Attachments:
Download 'ts10.zip' (1 KB)

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 12:40:01
Message: <web.4a2160bd1aa18c33f8eed5c40@news.povray.org>
And finally here is a screenshot of some renders. The artifact problem is very
obvious. Even though this is a 10x10x10 DF3, I am still getting artifacting
with a 100x100x100 DF3.


Post a reply to this message


Attachments:
Download 'panels.jpg' (245 KB)

Preview of image 'panels.jpg'
panels.jpg


 

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 12:55:00
Message: <web.4a2163c61aa18c33f8eed5c40@news.povray.org>
"JeffBTX" <nomail@nomail> wrote:
> And finally here is a screenshot of some renders. The artifact problem is very
> obvious. Even though this is a 10x10x10 DF3, I am still getting artifacting
> with a 100x100x100 DF3.

.... SORRY about that! I overwrote the screenshot that I took (DARN it!! I could
kick myself - and it was such a NICE screenshot, with explanatory notes and
stuff!).

It displayed five 320x240 panels in a 1024x768 JPG, emission with interpolate 0,
1, and 2; scattering with interpolate 2 and absorption with interpolate 2 to
show the problem. Oh, well.

Anyway.

Instead of wasting bandwidth re-constructing and re-posting the screenshots,
please try the POV code that I used, with that DF3 file (or a similar
situation), try using interpolate 0 1 and 2.

I need input from a "Guru" for an explanation of the problem, and definitive
knowledge as to what is happening so I can avoid unintentional rendering
effects.

- Thanks,
- Jeff


Post a reply to this message

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 13:15:01
Message: <web.4a2168991aa18c33f8eed5c40@news.povray.org>
.... lets try this again, if it fails for some reason I give up.

The attachment SHOULD be the screenshots of some renders.

As to that ZIP I posted of the DF3 file... something happened(?)

It (the original ZIP) UNZips just fine into the DF3 file on my hard drive.

BUT if I download the ZIP out of the post, and UNZip it, Windows Vista refuses,
says that it is "empty" (?) Something happens during uploading, I guess (?)

Anyway...


Post a reply to this message


Attachments:
Download 'screen.jpg' (28 KB)

Preview of image 'screen.jpg'
screen.jpg


 

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 13:25:00
Message: <web.4a216b4d1aa18c33f8eed5c40@news.povray.org>
.... good, the second attempt at posting that screenshot worked (after I
reconstructed it - sorry, no notes because I had to build it again and I was in
a hurry, but the problem is obvious).

If someone can maybe explain the problem I am having posting ZIP attachments, I
would appreciate it. I double checked. The original zip that I UPloaded DOES
extract with the DF3 file, but if I DOWNLOAD it out of the newsgroup, it is
empty. It is probably a Vista oddity.


Post a reply to this message

From: StephenS
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 13:55:00
Message: <web.4a2171e71aa18c333d5bd1d30@news.povray.org>
"JeffBTX" <nomail@nomail> wrote:
....

> If someone can maybe explain the problem I am having posting ZIP attachments, > I
> would appreciate it. I double checked. The original zip that I UPloaded DOES
> extract with the DF3 file, but if I DOWNLOAD it out of the newsgroup, it is
> empty. It is probably a Vista oddity.

Did you use a news reader or the web interface?
When the web interface was first set up, I had a problem downloading zip files,
I've not tried recently.

Stephen S


Post a reply to this message

From: Tim Attwood
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 18:31:39
Message: <4a21b3cb$1@news.povray.org>
> Basically I am getting artifacts from DF3 files. Alain suggested a 
> possible
> solution; fill empty spaces with 1's instead of 0's. I tried it... the 
> problem
> was alleviated somewhat. I am still getting severe artifacts if a voxel is
> placed EXACTLY at the corner of a media cube, so I "backed the voxel off" 
> into
> the cube away from the corner a little. I'm still getting artifacts.

What is going on is that the bounding object is too close to the voxel.

Why is that so? After all, the density pattern goes from <0,0,0>
to <1,1,1>, shouldn't that mean it fits in a box the same size?

The answer is in the way that media is handled by POV.
A ray coming from the camera hits the bounding object...
then travels through the object until it exits the bounding object.
So you have a line segment, by default POV then chops that
line segement up in to 10 parts or "intervals", then tests each
interval, resulting in a color contribution for the final pixel.

So what happens when a voxel is near the edge of the
bounding object?
POV measures the first interval as a distance from the
side of the bounding object... the shape of the bounding
object is determining the geometry of the interval, so
some rays have more contribution from the lit voxel,
and it begins to take on the shape of the side.

The obvious fix is just to make the bounding object
bigger... but then you end up with intervals that are too
big. So then you need to increase the intervals to match.

camera {
   location <0,3,-3>
   direction z
   right     x*image_width/image_height
   look_at <-0.5,-0.35,0>
   angle 5
}
box {-1, 2
  texture {
    pigment {rgbt 1}
  }
  interior {
    media {
      emission 1*3
      absorption 1*5
      scattering {1, White*3 extinction 1}
      density {
        density_file df3 "ts10.df3" interpolate 0
      }
      intervals 30
      samples 1,100
    }
  }
  hollow
  translate -0.5
  rotate <0,45,0>
}


Post a reply to this message

From: Alain
Subject: Re: DF3 Interpolation Problem
Date: 30 May 2009 21:36:52
Message: <4a21df34@news.povray.org>
JeffBTX nous illumina en ce 2009-05-30 12:28 -->
> Please refer to this thread in the New Users section:
>
http://news.povray.org/povray.newusers/thread/%3Cweb.4a2091fa9ea5e81c2c1590090%40news.povray.org%3E/
> 
> The first post is:
> http://news.povray.org/web.4a2091fa9ea5e81c2c1590090%40news.povray.org
> 
> Message header:
> From: JeffBTX
> Subject: DF3 / interpolation question
> Date: 30 May 2009 02:00:01
> 
> Basically I am getting artifacts from DF3 files. Alain suggested a possible
> solution; fill empty spaces with 1's instead of 0's. I tried it... the problem
> was alleviated somewhat. I am still getting severe artifacts if a voxel is
> placed EXACTLY at the corner of a media cube, so I "backed the voxel off" into
> the cube away from the corner a little. I'm still getting artifacts.
> 
> ====================
> Here is the code that I used to display the DF3:
> ====================
> 
> include "colors.inc"
> 
> camera {location <0,1.5,-1.5> look_at <0,0,0>}
> 
> light_source {<10,0,-10> rgb 1}
> 
> // plane {z, 10 pigment {Gray50} hollow }
> 
> box {0, 1
> 
>   texture {
>     pigment {rgbt 1}
>   }
> 
>   interior {
> 
>     media {
> 
> //      emission 1*3
> //      absorption 1*5
> //      scattering {1, White*3 extinction 1}
> 
> 
>       density {
>         density_file df3 "ts10.df3" interpolate 0
>       }
> 
>     }
> 
>   }
>   hollow
>   translate -0.5
>   rotate <0,45,0>
> }
> ====================
> 
> As you can see, one can comment out / uncomment any or all of the three media
> types. For absorption media to show, there is a gray plane behind the media
> cube that can be un-commented-out.
> 
> The three green cylinders help to orient the viewer.
> 
> ====================
> 
> 
> The attachment is a screenshot of the data inside the DF3 (a hexdump). This is a
> 10x10x10 DF3; but I am still having the problem with a 100x100x100; I used a 10x
> DF3 to show the voxel better. The header is indicated by green boxes, the voxel
> is indicated by a red box. The DF3 is of the proper filesize and I think it was
> constructed properly; 10*10*10+6 = 1006 bytes.
> 
> As you can see, the offset of the voxel is at 075h. That puts the voxel *AT* the
> second coordinate away from the forward, left, lower corner. The coord is XYZ =
> 2,2,2; subtracting 1 to bring into the range of 0 to 9 is 1,1,1; and then the
> offset is 1 + (1*10) + (1*10*10) = 111, + 6 (for the header) is 117, and in hex
> that is 075h.
> 
> As Alain suggested, I filled the blank DF3 with 01 instead of 00 before I
> altered it for the voxel.
> 
> In further posts I will try to post a .ZIP of the DF3, and a screenshot of
> renderings that displays the problem (this will be the first time I have tried
> to post attachments, so we will see if this works...)
> 
> 
> ------------------------------------------------------------------------
> 
Good news!

There are NO artefacts when using version 3.7 beta 32 and interpolate 2.
Interpolate 0 is NO interpolation. You only see the voxel.
Interpolate 1 is linear interpolation. The voxel becomes fuzzy.
With 3.6.1 and interpolate 2, there are HUGE artefacts. Making the container 
larger don't help, in fact, the result gets worst. Also, if you enlarge the 
container, you also need to increase the samples value a LOT. Adding 0.1 all 
around and you need samples 20, at least!

Also, DON'T increase the intervals value!
I just tested samples 300 VS. intervals 30 samples 10.
My "normalised" times are:
intervals 30 samples 10: 1 (100% of the time)
samples 300: 0.787 (78.7% of the time)

samples 300 gives much smoother results, even if they are still uncorrect.

The documentations are WRONG about the default values used. They are:
method 3
intervals 1
samples 3


Post a reply to this message

From: JeffBTX
Subject: Re: DF3 Interpolation Problem
Date: 31 May 2009 04:45:01
Message: <web.4a2242841aa18c336698c4a30@news.povray.org>
First; I made an error, in the code to display the DF3, replace:
//      emission 1*3
//      absorption 1*5
//      scattering {1, White*3 extinction 1}
with:
//      emission White*3
//      absorption White*5
//      scattering {1, White*3 extinction 1}

Okay...

StephenS;
I am using the web interface to access the POV Ray newsgroup. In Vista, I am
using "Windows Mail" (versus Outlook Express)... I've never tried to look at
newsgroups with that before... I just tried... "Windows Mail" just downloads a
list of microsoft.public.(xxx)(.xxx)(etc.) groups, no POVRay. Searched for
help, in Vista Outlook Express no longer exists. I don't know what to do if I
want to post .ZIPs for some reason... I am going to have to research adding
different news servers to Vista Windows Mail (IF I can do that...). Any Vista
users know a solution? Help? Inexperienced here, with this issue.

Tim;
What you say makes perfect sense to me; that is, I understand it. But Alain says
that doesn't really help... I posted the code from your post into a new POV
file, tweaked the camera, etc., and rendered it. Using interpolate 2, the
problem still exists.

Alain;
Thanks for the information. POVRay 3.6.1c is the problem, then... I hate to
download an ongoing work-in-progress beta though. I guess I just have to wait
for an official 3.7 release... in the meantime, any work I do with DF3's will
be suspect.

Oh, well.

- Thanks, all.


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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