POV-Ray : Newsgroups : povray.binaries.images : DF3 Interpolation Problem : DF3 Interpolation Problem Server Time
31 Jul 2024 18:27:09 EDT (-0400)
  DF3 Interpolation Problem  
From: JeffBTX
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


 

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