Forum: Poser - OFFICIAL


Subject: Free IBL Generator TOOL for Poser

bagginsbill opened this issue on Aug 13, 2008 · 158 posts


ice-boy posted Thu, 05 February 2009 at 4:17 AM

Quote - Hi ice-boy.

I assume you're asking if the lens should have a 2.2 in it or not. If you are asking something else, forgive me for all that I'm about to make you read. I'm answering this question: There is a 2.2 in the GenIBL-Lens shader - what should that be if I'm doing a GC render in Pro?

This is very confusing, and I had to think this through and experiment for over an hour to verify my answer.

The answer is it depends on whether or not you are going to save your new probe in HDR or LDR format. If HDR use 1.0. If LDR use 2.2, same as always.

Before I explain anything else, let me make this point really clear. Do not use GC shaders with a GC render in PRO. If you're going to let PRO handle GC, then every shader you use should be generating linear output. Otherwise, the math gets really crazy, and the correct value for GenIBL is neither 1 nor 2.2, but rather 4.84. I don't even want to go there.

I am also going to answer this question: what should the incoming image gamma be set to when doing a GC render in Pro?

So hopefully I'll be covering everything you need; how to make a probe, and how to use a probe.

OK, first, let's talk about probes. Not necessarily ones you make with this tool, but rather IBL probes in general.

When you load a probe image into the IBL, you want it to be feeding linear data. If the incoming image is already linear, you can just plug it in and it will work, as long as PRO uses an Image Gamma = 1.0. So if you have a linear image, and you have render GC off (a linear render - old style like P7), you're fine. If you have render GC on, you must make sure that Pro is using the image as-is, so you have to set the incoming texture gamma to 1.0 for images that PRO will believe are sRGB, not linear.

By default, PRO believes all HDR and EXR images are linear, and all LDR images (JPEG, GIF, TIF, PNG) are sRGB. So watch yourself with LDR images and Render GC enabled. (Also, watch for HDR images that are actually sRGB. I've seen at least one from Dosch.)

If your incoming image actually is sRGB, you want to make sure that a 2.2 anti gamma is applied to it, to make it linear. If Render GC is off, Poser will not do this for you, and you will have to user a Color_Math:Pow node and plug in the number 2.2 in Value_2.

Summary:

linear image, linear render - just connect the image.
linear image , GC render - select 1.0 for image gamma.
sRGB image, linear render - use a Pow(2.2) node.
sRGB image, GC render - select 2.2 for image gamma OR select 1.0 and use a Pow(2.2) node.

OK? That's how to use probes.

Now how to make probes.

I'm going to make the suggestion that it is best if probes are always linear. Because you'll notice that in our little how-to-use summary, we never need a node if we're dealing with linear images. Also, linear is what the IBL actually expects, regardless of a linear render or a GC render.

So!

Here's the deal. When you do a GC render with HDR optimized output turned on, two images are produced internally. Otherwise, only one is made. You can see one of these on your screen. That is the sRGB 8-bit image. There is also an HDR linear image produced. If you save the render as HDR or EXR, it is this linear image that is saved.

My GenIBL-Lens has an anti-gamma 2.2 in it. This is because prior to Pro and the option to do a GC render, the only info we get from reflect and refract is what would normally be put out on the final image. That means the info is in sRGB format. But we want to produce a linear format render. So I do an anti-gamma 2.2 as the last step; sRGB ^ 2.2 = linear.

Now if you're doing a GC render, then the data coming from reflect and refract is already linear! That's one of the great features of a GC render - you're operating strictly on linear data. All the math works right. So it would seem that my last step is bad: linear ^ 2.2 = garbage, right?

Except that the GC render adds an extra gamma correction at the end. So the true math is this:

(linear ^ 2.2) ^ (1 / 2.2)

Recall that (x ^ y) ^ z = x ^ (y * z).

So the above becomes:

linear ^ (2.2 / 2.2) = linear ^ (1) = linear

Hah! So the 2.2 works out, but for a completely different reason!

However, that hidden HDR image that PRO makes is different. PRO does not apply that last gamma correction to it. In this case, you want to stop the lens from doing that. So you should go into the GenIBL-Lens shader and change the 2.2 to 1.0.

Now of course, your sRGB image, which is what you see on the screen in Poser, is going to look different. Pay no attention to that. Just save as HDR and the correct information will be there. I have verified this by loading the resulting HDR image back and rendering it without GC (doing a linear render). It looks the same as the LDR sRGB image.

In summary:

linear render, LDR output - use 2.2
GC render, LDR output - use 2.2
linear render, HDR output - use 1.0
GC render, HDR output - use 1.0

to much info for me to handle.

i explained it like that: when baginsbill(you) made the GC shaders in poser 7 you never said we should gamma correct the IBL in the material room. so i had the GC shaders on my figure but never on my IBL. just the image. so if i now renderin poser pro with GC turned on i need to set it in the IBL material room to 1.
i will never use bad IBL images because i use your images or i make them myself with the IBL generator.

but now that i think about it..........am i right? he he