Blurring precalculated cube maps

I might be having a mental lapse here…

I am looking for an easy way to blur a cube map, without just forcing to a lower mip level. Is there a tool or easy method for doing this? I was just messing with ATI’s CubeMapGen, but did not see what I was looking for. The only thing I have come up with thus far would be to go into Photoshop, orienting and assembling the cube map facets into 6 different textures for flitering and then chop those back up and reconstruct the cube map again. (Besides, I am not even convinced that would be accurate.)

I managed to blur some stuff fine with ATI CubeMapGen.
Granted, it’s not user friendly or self-explanatory at all but with a bit of fiddling around you should be able to do it.
I don’t have the app here right now so I can’t recall exactly what I did, but I’m pretty sure it was just 2-3 of the basic buttons down the right, and a slider or two.

ATI Cubegen works great for that, HDRShop is good too, but I liked Cubegen better, it’s a tad slow on some of the blurs so play with the settings

trying to blur it in photoshop is going to be a bitch to line up those seams, so try cubegen or hdrshop.

the other trick that I’ve done too is if you’re using this on a game or on a programmable shader read in a lower mip of the map and it looks like a blurry version, works great on dull metal

Just to echo what’s already been said, I’d recommend CubeMapGen too – only tool which blurs and generates acceptable mip chains in cubemaps IMO.

http://developer.amd.com/media/gpu_assets/GDC2005_CubeMapGen.pdf

Common trick for a few image based lighting methods (spherical harmonics, straight IBL, PRT’s etc) is to encode different domain frequencies of lighting within lower mips. You can then easily index in with whatever filtering method you want. Common method to get per-pixel glossy environmental reflections.

I had been using CubeMapGen, but I could only get it to blur the lower level mips, (unless I missed a setting or was doing something wrong.)

I was looking for a way to really blur out the higher res mips, not just doing a blur to account for bilinear filtering across the facet seams, which is what CubeMapGen seems to be doing.

ok stealing this picture form somewhere else to illustrate what I mean, so apologies if it disappears…

under the blue area, that controls pre-filtering. Selecting the blur type you want, and increasing base filter angle IIRC, allows you to blur the highest mip down (full res, through all mips) as opposed to just progressive mips.

It gets REALLY slow, but you can end up blurring a 1024x1024x6 size cube map right down to a single average colour.

Yup I’ve had good experience as well. Keep trying :stuck_out_tongue: (there may be a tutorial on the lumonix.net forum about cubemaps by Ben Cloward)

Thanks, I’ll check it out. In my defense, I only played with CMG for a few minutes before I kicked off for the weekend, AND I professed that I probably missed something in the UI. :slight_smile:

Good thing this site is here!

This is a topic that I cover in my second DVD on writing HLSL shaders. I go over both using HDRShop and CubeMapGen.

Here are a full more detailed about the CubeMapGen method:

In Joel’s image above, there’s a blue drop-down box called Filter Type that is currently set to Cosine. Cosine is the setting that I usually use. Once you’ve got that set, you’ll then adjust the slider that’s called “Base Filter Angle.” A value of zero on that is a sharp, perfect mirror reflection. A value of 180 means that you’re averaging all of the pixels in a 180 degree hemisphere - so each pixel in your cube map will represent all of the light coming into the surface from every direction. I like to call cube maps blurred this much “Diffusely Convolved Cube Maps.” These can be used for image based lighting as the ambient term. You can get some really nice lighting results with them if you sample them with the world space normals of your model.

Once you’re got your filter type and your base filter angle set, hit the Filter Cubemap button at the bottom of the blue area and after of bit of waiting, you’ll get a nice blurry cube map with no seams.

I put some info here awhile back, might help too.
http://wiki.polycount.net/Diffusely_Convolved_Cube_Map