POV-Ray : Newsgroups : povray.general : hdri cube to lat long Server Time
5 Aug 2024 04:13:04 EDT (-0400)
  hdri cube to lat long (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Gilles Tran
Subject: Re: hdri cube to lat long
Date: 21 Jan 2003 15:09:53
Message: <3e2da911@news.povray.org>

dans le message de news: 3e2cc44c@news.povray.org...
> Anyone know how to take 6 hdr pictures which make up a cubic environment
map
> and make them into a lightprobe type image that mlpov will accept?

I'm currently using this for Terragen-made HDRs (no bottom though as there's
usually a real one in the scene). It's not perfect but the spherical mapping
has drawbacks too.

#declare Pane=union{triangle{0,x,x+y} triangle{0,y,x+y}}

#declare Panoramic=union{
        #declare A=1.3;
        object{Pane texture{pigment{image_map{hdr "mohave0901" interpolate
2}} finish{ambient A diffuse 0}}}
        object{Pane texture{pigment{image_map{hdr "mohave0902" interpolate
2}} finish{ambient A diffuse 0}} rotate y*90 translate x}
        object{Pane texture{pigment{image_map{hdr "mohave0903" interpolate
2}} finish{ambient A diffuse 0}} rotate y*180 translate x-z}
        object{Pane texture{pigment{image_map{hdr "mohave0904" interpolate
2}} finish{ambient A diffuse 0}} rotate y*270 translate -z}
        object{Pane texture{pigment{image_map{hdr "mohave0905" interpolate
2}} finish{ambient A diffuse 0}} rotate -x*90 translate y}
    translate z*0.5-x*0.5-y*0.5
}
object{Panoramic}


Post a reply to this message

From: Jack Couilliard
Subject: Re: hdri cube to lat long
Date: 21 Jan 2003 18:50:51
Message: <3e2ddcdb$1@news.povray.org>
Duh, of course (why didn't I think of that?).

Thanks


Post a reply to this message

From: Jim
Subject: Re: hdri cube to lat long
Date: 21 Jan 2003 21:25:04
Message: <web.3e2e00a5987060ffef139e8d0@news.povray.org>
Yes, HDRShop specializes in HDRI file manipulations,
ergo the name, HDRShop (reference to Photoshop).
Other conversions include mirror ball to light probe.
LogLUV and "float" TIFFs are among the other formats
the program works with.

                              Jim Julian


Post a reply to this message

From: Gilles Tran
Subject: Re: hdri cube to lat long
Date: 22 Jan 2003 03:53:40
Message: <3e2e5c14$1@news.povray.org>

web.3e2e00a5987060ffef139e8d0@news.povray.org...
>
>  HDRShop specializes in HDRI file manipulations,
> ergo the name, HDRShop (reference to Photoshop).

Yes, but does it let you stich together 6 images to make a vertical cross
(which can in turn be transformed into a mirror ball image) ? I still
haven't found a way to cut and paste an HDR image on a new one without
completely replacing it, so positioning 6 images in a cross shape seems out
of the question, unless there's a special trick to do this (I hope so).

G.
--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Jim
Subject: Re: hdri cube to lat long
Date: 23 Jan 2003 00:55:03
Message: <web.3e2f8335987060ffb82400590@news.povray.org>
Gilles,

   Below you will find the command path you need.
I haven't tried this, so I can't tell you any more
about the process.

HDRShop:
Image/Panorama/Panoramic Transformations..



Dialog box for Panoramic Transformations:

Left side - Source drop-down box:
       "Cubic Environment (6 separate images)"

Right side - Destination drop-down box:
       "Cubic Environment (vertical cross)"


                             Good luck,
                             Jim Julian


Post a reply to this message

From: Gilles Tran
Subject: Re: hdri cube to lat long
Date: 23 Jan 2003 03:38:08
Message: <3e2fa9f0@news.povray.org>

web.3e2f8335987060ffb82400590@news.povray.org...
>    Below you will find the command path you need.
> I haven't tried this, so I can't tell you any more
> about the process.

Oh I've seen this, but I just can't figure out how and where to import the 6
separate images, and it's not in the tutorials either. I hope I'm missing
something obvious.

G.

--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Jim
Subject: Re: hdri cube to lat long
Date: 24 Jan 2003 14:10:18
Message: <web.3e318e63987060ffbf033edd0@news.povray.org>
Hi Gilles,

   This is what I did:

1. loaded a 60k *.bmp test file, not HDR, but good for a test of
   program functionality.
2. loaded five more copies of the same image.
3. opened the transformations dialog box.
4. chose the input/output options.
5. ran the program and waited.
 After awhile, the program came back with a cross-box image that I saved as
JPEG.

While I was at it , I tested the lat-lon ouput option.
This requires only one input file. It worked on the same test image.


                                    Jim Julian


Post a reply to this message

From: Gilles Tran
Subject: Re: hdri cube to lat long
Date: 24 Jan 2003 16:02:49
Message: <3e31a9f9@news.povray.org>

web.3e318e63987060ffbf033edd0@news.povray.org...

> 2. loaded five more copies of the same image.

Thanks for trying but... the panoramic transformation only applies to the
current image and doesn't take into account the other 5. Indeed, if if did,
it would at least propose a way to stitch them together (like other panorama
tools). Just try to load 6 different images.
The way I see it - and unless I'm missing something -  this feature is only
useful to create a template cross to be used for the placement of JPEG
images (in another software). The LDR crosses of different exposures are
then used to create the final HDR one. In fact, it sort of makes sense,
since digital cameras don't output HDR images anyway. Possibly it's a
problem only for Terragen users, who are the only ones stuck with a panorama
made of 6 separate HDR pics.

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Jim
Subject: Re: hdri cube to lat long
Date: 24 Jan 2003 19:50:06
Message: <web.3e31df0b987060fff7d6f5b00@news.povray.org>
Come on guys, do your home work.
   If you go to the HDRShop site; click on the "Board" tab at the top,
 you go to the discussion group. Search back to April and you will find the
following response to someone with the same problem.

-----------------------------------------------------------------------------

Re: can hdrshop make 6 hdr images to 1 cross?
--------------------------------------------------------------------------------
 I'm assuming you have 6 square images each with a horizontal and vertical
field of view of 90 degrees. It is possible to put them together in HDR
Shop, though it isn't exactly an easy operation.

The main troublesome part is how to get all the images into the correct
relative positions, without the aid of the handy layer system in
photoshop.. hehe.

First, turn off the 'restrict selection to image' option
(Select->Select Options)

Then turn on the Selection Range window (Select -> Select Window), so you
can type in the selection ranges by hand.

Now you load up the 6 images, rotate them appropriately,
select the rectangle around each image that represents their position in the
finished image, and crop to that region. Then you can composite them
together by adding
(Image->Calculate can add 4 images at once, repeat on
the result to add more)

For example, lets say your images are 256x256.
Lets do the image that's looking upwards.
With the select range window, type in a selection range:
Left: -256
Top: 0
Width: 768
Height: 1024
Then crop the image (Image->Crop). This gives you an
image with the upward-looking square in the correct position.

Then for the image looking left, do the same except select:
Left: 0
Top: -256
Width: 768
Height: 1024

Then for the forward looking image:
Left: -256
Top: -256
Width: 768
Height: 1024

etc.

-----------------------


On the other hand, I'm sure it would be a fairly simple to create a plugin
to do that automatically given 6 images. Let me know if this would help out
alot.

Chris
-------------------------------------------------------------------------------

                                           Good luck,
                                           Jim Julian


Post a reply to this message

From: Gilles Tran
Subject: Re: hdri cube to lat long
Date: 25 Jan 2003 16:33:14
Message: <3e33029a@news.povray.org>

web.3e31df0b987060fff7d6f5b00@news.povray.org...
>    If you go to the HDRShop site; click on the "Board" tab at the top,
>  you go to the discussion group. Search back to April and you will find
the
> following response to someone with the same problem.

Thanks, I had missed that board somehow.
Well, the method works indeed but I hope someone makes a plugin as it's not
really straightforward.
If someone's interested here are the selection values
(left/top/width/height) for the entire cube (assuming the image size
is 256 x 256) :
front: -256 / -256 / 768 / 1024
right: -512 / -256 / 768 / 1024
back (flip vertically before use) : -256 / -768 / 768 / 1024
left: 0 / -256 / 768 / 1024
up: -256 / 0 / 768 / 1024
down: -256 / -512 / 768 / 1024

Once the images are cropped:
combine up/left/front/right
combine previous + down
combine previous + back

One remaining problem are the visible seams in the final image. I've been
able to remove them by turning off
the interpolation or by using gaussian blur but of course these solutions
are not 100% satisfying. Possibly there's a way to make the images overlap
so more tests are necessary.

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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