POV-Ray : Newsgroups : povray.beta-test.binaries : HDR image reversed when read Server Time
29 Mar 2024 03:20:45 EDT (-0400)
  HDR image reversed when read (Message 1 to 5 of 5)  
From: Trevor G Quayle
Subject: HDR image reversed when read
Date: 6 Feb 2006 22:50:38
Message: <43e8190e@news.povray.org>
Windows XP Pro - 2.4GHz - 1.0GB RAM - beta11

As can be seen in the attached images, HDR format images seem to be reversed 
when read.   The scene displays simply a box with an image map and is 
identical for both except on uses a BMP format image and the other uses a 
HDR format image, both made from the same original JPG file. This is valid 
for "map_type 0", I haven't tested for others.

SCENE FILE:

//start

#declare Map="megane.hdr"; //HDR
//#declare Map="megane.bmp"; //BMP
camera{orthographic
  up y*2.05*image_height/image_width
  right x*2.05
  location <0,-0.15,-2>
  look_at  <0,-0.15,0>
}
box{<0,0,0><1,1,1> pigment {image_map {hdr Map once interpolate 2 map_type 
0}} finish {ambient 1 diffuse 0} scale <2,1,1> translate <-1,-.5,0.1> } 
//HDR
//box{<0,0,0><1,1,1> pigment {image_map {hdr Map once interpolate 2 map_type 
0}} finish {ambient 1 diffuse 0} scale <2,1,1> translate <-1,-.5,0.1> } 
//BMP

//end

-tgq


Post a reply to this message


Attachments:
Download 'BetatestHDR-37.jpg' (123 KB) Download 'BetatestBMP-37.jpg' (122 KB)

Preview of image 'BetatestHDR-37.jpg'
BetatestHDR-37.jpg

Preview of image 'BetatestBMP-37.jpg'
BetatestBMP-37.jpg


 

From: Christoph Hormann
Subject: Re: HDR image reversed when read
Date: 7 Feb 2006 03:55:03
Message: <ds9n2p$isn$1@chho.imagico.de>
Trevor G Quayle wrote:
> Windows XP Pro - 2.4GHz - 1.0GB RAM - beta11
> 
> As can be seen in the attached images, HDR format images seem to be reversed 
> when read.   The scene displays simply a box with an image map and is 
> identical for both except on uses a BMP format image and the other uses a 
> HDR format image, both made from the same original JPG file. This is valid 
> for "map_type 0", I haven't tested for others.

The radiance HDR format supports different orientations of the image but 
the reader in POV-Ray treats all the same way currently (just like most 
other HDR readers around).  So you should make sure the program you use 
to write the HDR files uses normal (top to bottom, left to right) 
orientation.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Trevor G Quayle
Subject: Re: HDR image reversed when read
Date: 7 Feb 2006 07:10:46
Message: <43e88e46$1@news.povray.org>
> The radiance HDR format supports different orientations of the image but 
> the reader in POV-Ray treats all the same way currently (just like most 
> other HDR readers around).  So you should make sure the program you use to 
> write the HDR files uses normal (top to bottom, left to right) 
> orientation.
>
> Christoph

Opens forwards in HDRShop which I would think is a common HDR program.  It 
also opens forwards in megapov.

-tgq


Post a reply to this message

From: Trevor G Quayle
Subject: Re: HDR image reversed when read
Date: 7 Feb 2006 09:40:01
Message: <web.43e8b07ed04d4fba6c4803960@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> > The radiance HDR format supports different orientations of the image but
> > the reader in POV-Ray treats all the same way currently (just like most
> > other HDR readers around).  So you should make sure the program you use to
> > write the HDR files uses normal (top to bottom, left to right)
> > orientation.
> >
> > Christoph
>
> Opens forwards in HDRShop which I would think is a common HDR program.  It
> also opens forwards in megapov.
>
> -tgq

As a follow up, I tried writing and reading HDR images successively in the
beta.  (i.e., write the HDR, then read the HDR output by POV as an image
map and rewrite, etc.).  This had the effect of flipping the image back and
forth.  It would appear to me that the output is being written correctly,
but that it is being read backwards.  The attached image shows three
successive outputs from this method (converted to jpg by HDRShop)

As a side note, I also noticed that I get "Unrecognized output file format
H" after the render even though the render and image creation was
successful.

SCENE FILE:
//start
camera{orthographic
  up y*2*image_height/image_width
  right x*2
  location <0,0,-2>
  look_at  <0,0,0>
}

#declare Map="beta1.hdr"; //HDR - name of HDR output by POV
box{<0,0,0><1,1,1>
  pigment {image_map {hdr Map once interpolate 2 map_type 0}}
  finish {ambient 1 diffuse 0}
  translate <-0.5,-0.5,0.1>
  scale <2,2*image_height/image_width,1>
}
//end

-tgq


Post a reply to this message


Attachments:
Download 'beta.jpg' (86 KB)

Preview of image 'beta.jpg'
beta.jpg


 

From: Christoph Hormann
Subject: Re: HDR image reversed when read
Date: 7 Feb 2006 12:35:03
Message: <dsalng$rnj$1@chho.imagico.de>
Trevor G Quayle wrote:
> 
> As a follow up, I tried writing and reading HDR images successively in the
> beta.  (i.e., write the HDR, then read the HDR output by POV as an image
> map and rewrite, etc.).  This had the effect of flipping the image back and
> forth.  It would appear to me that the output is being written correctly,
> but that it is being read backwards.

Yes, indeed it seems the current reading code mirrors the image.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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