Discussion:
[Yafray-devel] Producing HDR images with yafray
m***@mgix.com
2005-05-18 23:32:47 UTC
Permalink
Hello,

I've patched yafray to get it to output unclamped
floating point (HDR) images in TIFF format.

It works fine in the sense that I get the full
floating point dynamic range in penumbra areas,
which gives me a lot more freedom at the compositing
stage.

However, I haven't been able to get it to output
unclamped floating points values, specifically
pixel intensity values above 1 (which are essential
to get clean lens flares in low light scenes with
spotlights.)

Instead of digging through the code, I thought
you guys may be able to point out why things are this
way (why I can't get a pixel intensity value above 1),
and where I may intervene in the code to fix this.

Also, if the floating point TIFF output code interests
anyone, I can post that.

Cheers,

- Emmanuel
Diego Pino Navarro
2005-05-19 00:01:42 UTC
Permalink
Hi Emmanuel,

Are you generating this TIFFs for 35mm compositing (32bit color?)
I think you should post the question about intensity above 1 in the
forum, there is more activity there, eeshlo should know where to dig in
the code.

Would be nice if you could post the code for this mod.

Bye

Diego
Post by m***@mgix.com
Hello,
I've patched yafray to get it to output unclamped
floating point (HDR) images in TIFF format.
It works fine in the sense that I get the full
floating point dynamic range in penumbra areas,
which gives me a lot more freedom at the compositing
stage.
However, I haven't been able to get it to output
unclamped floating points values, specifically
pixel intensity values above 1 (which are essential
to get clean lens flares in low light scenes with
spotlights.)
Instead of digging through the code, I thought
you guys may be able to point out why things are this
way (why I can't get a pixel intensity value above 1),
and where I may intervene in the code to fix this.
Also, if the floating point TIFF output code interests
anyone, I can post that.
Cheers,
- Emmanuel
_______________________________________________
Yafray-devel mailing list
http://lists.nongnu.org/mailman/listinfo/yafray-devel
Mein
2005-05-19 02:37:27 UTC
Permalink
Hello,

Maybe you should post on the forum about the importance of the mailinglist.
I think this mailinglist is here to talk about the bit more complex
questions regarding the code.

But maybe I should have posted this there... excuses :)

Mein.




Hi Emmanuel,

Are you generating this TIFFs for 35mm compositing (32bit color?)
I think you should post the question about intensity above 1 in the
forum, there is more activity there, eeshlo should know where to dig in
the code.

Would be nice if you could post the code for this mod.

Bye

Diego
Post by m***@mgix.com
Hello,
I've patched yafray to get it to output unclamped
floating point (HDR) images in TIFF format.
It works fine in the sense that I get the full
floating point dynamic range in penumbra areas,
which gives me a lot more freedom at the compositing
stage.
However, I haven't been able to get it to output
unclamped floating points values, specifically
pixel intensity values above 1 (which are essential
to get clean lens flares in low light scenes with
spotlights.)
Instead of digging through the code, I thought
you guys may be able to point out why things are this
way (why I can't get a pixel intensity value above 1),
and where I may intervene in the code to fix this.
Also, if the floating point TIFF output code interests
anyone, I can post that.
Cheers,
- Emmanuel
_______________________________________________
Yafray-devel mailing list
http://lists.nongnu.org/mailman/listinfo/yafray-devel
_______________________________________________
Yafray-devel mailing list
Yafray-***@nongnu.org
http://lists.nongnu.org/mailman/listinfo/yafray-devel
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005
Emmanuel Mogenet
2005-05-19 06:33:32 UTC
Permalink
Post by Diego Pino Navarro
Hi Emmanuel,
Are you generating this TIFFs for 35mm compositing (32bit color?)
Any kind of compositing, film or video benefits from floating point images,
for reasons that are too long to list here.
Post by Diego Pino Navarro
I think you should post the question about intensity above 1 in the
forum, there is more activity there, eeshlo should know where to dig
in the code.
Is eeshlo one of the developers of yafray ?
If this list is inactive, should I get in touch with the developers
directly ?
Post by Diego Pino Navarro
Would be nice if you could post the code for this mod.
I'll post it as soon as I'm sure I'm sending it to someone than
can actually help me with it.

Cheers,

- Emmanuel
Diego Pino Navarro
2005-05-19 15:42:03 UTC
Permalink
Hi,

I don´t agree with you, i.e DV compression is so bad (YUV: 4:1:1) that
even your best color range gets messed up, 32 bit is only usefull for
Cine compositing(35mm, super 16 and maybe HD(10bits only) and depth
maps. but anyway
I think you are not understanding opensource the right way, your idea
of posting code only to someone that can really help you is a little
selfish..but i can live with HDRI images as output, or modify teh
source(and post it) myself.

Documentation says you should avoid Gamma/Exposure correction, have you
tried it?

Diego
Post by Emmanuel Mogenet
Post by Diego Pino Navarro
Hi Emmanuel,
Are you generating this TIFFs for 35mm compositing (32bit color?)
Any kind of compositing, film or video benefits from floating point images,
for reasons that are too long to list here.
Post by Diego Pino Navarro
I think you should post the question about intensity above 1 in the
forum, there is more activity there, eeshlo should know where to dig
in the code.
Is eeshlo one of the developers of yafray ?
If this list is inactive, should I get in touch with the developers
directly ?
Post by Diego Pino Navarro
Would be nice if you could post the code for this mod.
I'll post it as soon as I'm sure I'm sending it to someone than
can actually help me with it.
Cheers,
- Emmanuel
_______________________________________________
Yafray-devel mailing list
http://lists.nongnu.org/mailman/listinfo/yafray-devel
Emmanuel Mogenet
2005-05-19 16:15:04 UTC
Permalink
Post by Diego Pino Navarro
Hi,
I don´t agree with you, i.e DV compression is so bad (YUV: 4:1:1) that
even your best color range gets messed up, 32 bit is only usefull for
Cine compositing(35mm, super 16 and maybe HD(10bits only) and depth
maps. but anyway
First, not all video is DV.
There aren't many video professionals I know that work
with DV unless they've fallen down on hard times.

Second, the limitations of the final output format are irrelevant
to the discussion : when you are using elements generated by a
3D renderer in order to assemble a composite you are potentially
feeding your elements to a varying number of color correction passes,
convolutions, fake motion-blur and other 2D post-processing operations
that are either downright impossible or way to expensive to perform inside
the 3D renderer. At that point, if you do not have the full dynamic
range that
was available inside the renderer, you are basically making your life
very complicated.

Case in point : download the EXR library, and use the tree image example.

Now try the following:

1. Downconvert the frame to 8bit
. Apply a x5 brightness to light up the part that's in front of
the tree
. Shoot to video

2. Apply the x5 brightness on the half-float EXR image
. Downconvert the result to 8bit
. Shoot to video

Compare the results.
You'll see that output of case 1 is as crappy as can be, whereas
the output of case 2 is clean, even though both are shot to video.

Other case in point : try to reproduce a half decent spotlight bloom effect
in a super-dark scene (like shooting car headlights at night) with an 8bit
pipeline. No way.

On the other hand, if you do it on a floating point pipeline and then shoot
to video, it'll look good, independent of the lame quality of the output
media.
Post by Diego Pino Navarro
I think you are not understanding opensource the right way, your idea
of posting code only to someone that can really help you is a little
selfish..but i can live with HDRI images as output, or modify teh
source(and post it) myself.
I'm not being selfish. If I was, I wouldn't offer to post the code. I
just want
to make sure I'm sending my stuff someplace it serves an actual purpose.
Post by Diego Pino Navarro
Documentation says you should avoid Gamma/Exposure correction, have
you tried it?
Nope, but I'll give it a shot.
GSR - FR
2005-05-19 17:32:53 UTC
Permalink
Hi,
Post by Emmanuel Mogenet
Compare the results.
There is an interesting web page talking about the effects of how
operations are performed, demos ready to watch:
http://mysite.verizon.net/spitzak/conversion/composite.html

That website even proposes a system to cope with 8 bit inputs to
provide more real nightshots (compress high part of the scale).

GSR
m***@mgix.com
2005-05-19 18:31:02 UTC
Permalink
Post by GSR - FR
There is an interesting web page talking about the effects of how
http://mysite.verizon.net/spitzak/conversion/composite.html
Yep, that's Bill Spitzak's site. He's the guy who wrote Nuke
(a compositing system in use at Digital Domain), so he's got
quite a good grip on how these things go.

However, his site is mostly about evangelizing the compositing
community about the benefits of image processing in linear space
(which is a very good thing, btw).

What I'm talking about is the fact that you CANT - whichever smart
color space you work in - make a car headlight "bloom" properly unless
you have floating point elements in the first place : the dynamic range
between the dark background and the peak intensity of the car headlight
is far too large to be handle by any kind of 8bit encoding. And it shows even
in Bill's examples
GSR - FR
2005-05-19 20:09:18 UTC
Permalink
Hi,
Post by m***@mgix.com
However, his site is mostly about evangelizing the compositing
community about the benefits of image processing in linear space
(which is a very good thing, btw).
In linear float, not just linear. The page
http://mysite.verizon.net/spitzak/conversion/multiply.html is like

"
1. Downconvert the frame to 8bit
. Apply a x5 brightness to light up the part that's in front of
the tree
. Shoot to video

2. Apply the x5 brightness on the half-float EXR image
. Downconvert the result to 8bit
. Shoot to video
"

He has also http://mysite.verizon.net/spitzak/conversion/blur.html
about night shots and lights. Composing the original image and the
blur with roll off one gives a nice bloom result.

What I will not disagree is that if you can have all the range with
lots of steps, better.

GSR
Emmanuel Mogenet
2005-05-19 21:25:33 UTC
Permalink
Post by GSR - FR
Hi,
Post by m***@mgix.com
However, his site is mostly about evangelizing the compositing
community about the benefits of image processing in linear space
(which is a very good thing, btw).
In linear float, not just linear. The page
http://mysite.verizon.net/spitzak/conversion/multiply.html is like
Nope, you're not getting my point.
In Bill's image, the source element is eight bit.

The fact that the linearization and brightness math is in
float does not buy you back the lost dynamic in the blacks
of the original image.
Alfredo de Greef
2005-05-19 07:07:04 UTC
Permalink
Unless you really need tiff format, you are aware that
it is possible to save HDR images in either radiance
.hdr or OpenEXR format? At least in the current cvs it
is.
I really would have to see your code, but I can't see
why you would be unable to get the full range.
You are using a floatbuffer?
Also make sure that you bypass tonemapping
(exposure/gamma). Look at the HDR_io/EXR_io files and
the render code in scene.cc as an example.
Are you actually using current cvs or older code?
Post by m***@mgix.com
Hello,
I've patched yafray to get it to output unclamped
floating point (HDR) images in TIFF format.
It works fine in the sense that I get the full
floating point dynamic range in penumbra areas,
which gives me a lot more freedom at the compositing
stage.
However, I haven't been able to get it to output
unclamped floating points values, specifically
pixel intensity values above 1 (which are essential
to get clean lens flares in low light scenes with
spotlights.)
Instead of digging through the code, I thought
you guys may be able to point out why things are
this
way (why I can't get a pixel intensity value above
1),
and where I may intervene in the code to fix this.
Also, if the floating point TIFF output code
interests
anyone, I can post that.
Cheers,
- Emmanuel
_______________________________________________
Yafray-devel mailing list
http://lists.nongnu.org/mailman/listinfo/yafray-devel
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
Emmanuel Mogenet
2005-05-19 18:40:15 UTC
Permalink
Post by Alfredo de Greef
Unless you really need tiff format, you are aware that
it is possible to save HDR images in either radiance
.hdr or OpenEXR format? At least in the current cvs it
is.
I didn't know that. I worked in the released code, not in the
cvs head because I needed something stable quick.

I just pulled the cvs head, and yes, I see an OpenEXR io module.
I'll try to play with it if I can figure out how to compile the current
cvs head.
Post by Alfredo de Greef
I really would have to see your code, but I can't see
why you would be unable to get the full range.
I've attached my code.
Post by Alfredo de Greef
You are using a floatbuffer?
yes
Post by Alfredo de Greef
Also make sure that you bypass tonemapping
(exposure/gamma).
That might be the problem.
I'll go play with it now
Emmanuel Mogenet
2005-05-19 22:40:26 UTC
Permalink
Alfredo,

I recompiled the latest CVS head, with OpenEXR
output activated, and it works perfectly : I managed
to render some OpenEXR files with very large illumination
values, and I did indeed get values above 1.

Thanks a lot for your help,

- Emmanuel
Emmanuel Mogenet
2005-05-19 22:45:55 UTC
Permalink
I can even get it to ouput negative pixel values

Darklights work !!

Great !!

Loading...