Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Generating Cube Maps for IBL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 L. Spiro   Crossbones+   -  Reputation: 14032

Like
0Likes
Like

Posted 29 May 2013 - 05:53 AM

I want to add IBL to my engine (finally) and was just about to use Debevec's HDRShop when I found out it costs too much and is not an option.

I checked for other tools but found mostly things for Blender, Maya, Unity 3D, etc.

#1: Are there are alternative tools you would recommend? I expect to provide it an input cube-map and have it return the cube-map that I need as a look-up table for IBL.
#2: How would I go about making my own? I am not at all against making my own, especially since that would give me full control over the output format. All I need to know is the basic method in which it is done.

I am guessing that for each pixel on the final IBL cube-map you simply sample a hemisphere of the original cube-map (maybe 256 samples or so?) and sum their weighted lambertian contributions (integrating them). Yes? No? Close? Can’t find much on generating these cube-maps either.


Thank you,
L. Spiro

Edited by L. Spiro, 29 May 2013 - 07:05 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

Sponsor:

#2 Tessellator   Members   -  Reputation: 646

Like
2Likes
Like

Posted 29 May 2013 - 08:16 AM

Hi,

ATIs CubeMapGen does what you want and although it's no longer being updated the source is available: http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/cubemapgen/

IIRC in a recent presentation on the new Killzone, one of Guerrilla's devs said that they'd modified the code to match their BRDF when doing the integration, so material roughness is treated uniformly for all light types.

Oh, and this is handy for some of the background and rolling your own: http://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/

thanks,
T

* Hmmm, not so sure it was Guerrilla now... I'll have a look and edit the post if I find different.

Edited by Tessellator, 29 May 2013 - 09:09 AM.


#3 kalle_h   Members   -  Reputation: 1488

Like
2Likes
Like

Posted 29 May 2013 - 09:14 AM

http://seblagarde.wordpress.com/2012/06/10/amd-cubemapgen-for-physically-based-rendering/

 

There is also modified version from amd-cubemapgen.



#4 MJP   Moderators   -  Reputation: 11613

Like
2Likes
Like

Posted 29 May 2013 - 08:09 PM

The general approach is to the take the input cubemap as if it contained radiance at each texel, and pre-integrate the radiance with some approximation of your BRDF. Unfortunately it's not possible to pre-integrate anything except for plain Phong without having to also parametrize on the view direction, so the approximation is not that great if you want a 1:1 ratio of cubemaps. Most people will use CubeMapGen to convolve with a phong-like lobe, using a lower specular power for each successive mip level. You can roll your own if you want, it's not terribly difficult. I actually made a compute shader integrator that we use in-house. Just make sure that you account for the non-uniform distribution of texels in a cubemap when you're integrating, otherwise the result will be incorrect.



#5 L. Spiro   Crossbones+   -  Reputation: 14032

Like
0Likes
Like

Posted 30 May 2013 - 06:28 AM

Thank you everyone; that is basically what I needed to know.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS