Cycles HDR texture support

Is everything converted to 8-bits for CPU rendering too?

Yes, the CPU is just another ‘device’ as far as Cycles is concerned. It uses the same rendering source code, with a little bit of glue to plug it into regular CPU rendering, CUDA kernels, or OpenCL kernels. (Some stuff is disabled on some devices, but it’s the same source code.) So, they end up with the same data buffers, more or less, that they read or sample from.

Ah I see, so is this a bad thing, or is this what the majority of engines do?

I’m (clearly :wink: ) not an expert, but does this not effect having a 32-bit pipeline, as surely you’d have some kind of data loss going from 32-bit textures to 8-bit, then back to 32-bit if required.

Well, keep in mind this is 8 bits per component, with 4 components (RGBA), so it’s 32 bits total per color sample, with alpha. But the floating point textures are 32 bits per component (float format), for a total of 128 bits per color sample, with alpha. So, for most textures, you’re not losing anything, but for those that require the HDR range the float precision is the standard thing to use.

Nice. Thanks.
But hey, how do i know if i’m using float or not? Is there any special checkbox i should find, or is it using float all the time?

Ditto here. I’ve tried it with a scene I’m working on at the minute.

On the left is an optimized version of 2.61. On the right, Demohero’s patched Blender (Win 7 64).

I’ve actually turned the intensity down on the patched version (its at 1.00 there, 1.6 on the left).

Wow, it really solved that old “Can’t get real shadows in Cycles” problem! I can turn the intensity of the GI down, but my main problem now is that it is not converging.

Both are at 300 passes.

Looks like you need to turn the intensity further down? a lot looks blown out at the moment
Have you made sure to sample the environment as a lamp to use the importance sampling that Mike has already written?

Thanks, that did the trick. I had to Google where the controls were as I’ve not seen it mentioned in the thread. I’ve been playing with turning the Color management on and off. Off and I get this nearly cartoonish amount of color saturation. With it off, it’s much more natural looking.

Now I’m not sure if it’s just that previous images were just that washed out and now it looks strange to see full-on colors!! I’ll have to experiment with post pro and see what I get.

The sampling patch is just amazing! the image on the left cleared in about 30 passes, compared to 300 on the right!

Ive also hooked up a limiter for our HDR images for that hdr build as show below, gives less fireflies for our HDR images…

If it doesnt make sense, i can explain it. but i think images are more informative then words :wink:

sometimes… :wink:

I haven’t used displacement in cycles, I guess that is what you get if you are fixated on car modelling. But as to why you bake displacement maps using float here is why http://www.blender.org/development/release-logs/blender-246/render-baking/

my point of curiosity is what happens when cycles takes a 32 bit displacement and turns it into an 8 bit per channel map? Does that not reintroduce all the artefacts you tried to avoid in the first place.

Has this patch been integrated in trunk yet?

Got to say again, thank you so much for this, it is amazing!

It’s not in trunk yet; there are some issues for me to work out first. The patch I am working on is really only a temporary workaround to allow some float textures through, and a better/more flexible texture system (float vs not, eliminate the 100 total textures limit, etc.) is really the better idea down the road. Brecht and I chatted through some potential options, but to do it right is a lot of work. Because of that, I’m not sure my float textures patch would make it in, but Brecht seemed okay with my temporary solution.

I’ve been very busy the last week or so (with the new baby, starting back at work again). We’ve got a major project at Tippett Studio I’m trying to finish up, but I’m hoping to find a little spare time soon to massage the patch a bit and see if I can get it to where I’d feel good about resubmitting it.

Very much looking forward to it! It really is like night and day. I had been looking at other HDR renders and wondering what I’d been doing wrong all this time!

The only problem with the current patch (from a user perspective) is the amount of fireflies. I tried the node set-up posted earlier but it just seemed to make it look like you hadn’t used the patch.

Congratulations on the little one!

For now, there is only one texture format being used, and that is the common RGBA INT format. At the moment where you are sampling the texture, it gets converted to float (afair the texture hardware does that, taking care of interpolation along the way). All the math is using floats.

That’d make no sense and would be a complete slap in the face of software development.
Yes, but that’s not exactly what’s happening.

Very late to the table, but I want to say thank you for your work on Cycles, and congratulations on your new family member!

The effect of environment importance sampling is impressive, and this HDR texture support will surely have an equally high impact (I already bought a stainless steel ball out of pure excitement :stuck_out_tongue: ) Do you think this patch will make it in trunk, or would you rather have it done “the proper way”?

I can probably get something accepted into trunk for the interim, rather than going for the whole enchilada (which is a lot more work and is more risky). I’ve been pretty slammed time-wise at Tippett Studio (we’re building a major piece of technology for an upcoming movie), so finding the spare time to fix up that patch has been a little hard, but I think about it every day. :eyebrowlift:

Hi… Joining late to the thread but here I am :)… Just wanted to say that it’s OK, I’ve been pretty slammed time-wise and I’m sure a lot of us can say the same.

Greets.
tuqueque.

Time pressures are well understood. Thanks again for your contributions to Cycles. I contributed to the fund.

MikeFarny - I’ve just checked Tippett Studio webpage and I’m really under a great impression!

I would like to ask you a question about Cycles development. Do you think that with all the features Cycles is about to gain in the next months, maybe a year, Cycles can be used in film industry? Why are you interested in open source rendering engine anyway? Is Blender used in your company at any stage of your work? I would be glad for response!