Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Oct 2012
Offline Last Active Nov 19 2012 02:11 PM

Topics I've Started

Computing spherical harmonic coefficients for HDR images

19 November 2012 - 04:37 AM

Hi there again! Posted Image

I am dealing with spherical harmonics once again. The new problem is the following:

I would like to compute the SH coefficients of HDR images and construct a sphere map of it.

I've started my looking at the official project page, which contains the function prefilter.c.
The code structure is the following:
input(filename, width) ;
prefilter(width) ;
tomatrix() ;

Unfortunately though, when I tried running the c-file on HDR images, I got an error (incompatible format). The accepted format is .float. I would like to change the input(filename, width) function to accept the HDR format as well.
The next idea I came up with was to use a library to read HDR images, namely, the following.
Unfortunately though, this one is written in C++. Thus, I am asking myself how to combine the two.

Any ideas on how to get started would be greatly appreciated.

How to represent a point using spherical harmonics?

17 November 2012 - 12:21 PM

Hi guys! :)

I have a new interesting question for us today:
Given the direction to a point light source (e.g. [0 0 1]), how do we find the spherical harmonics representation of it?

Let's assume the degree of approximation is 2, i.e. there are 9 coefficients for each color channel.
Here's a link to an excellent tutorial on this topic: http://www.cs.columbia.edu/~cs4162/slides/spherical-harmonic-lighting.pdf
Unfortunately though, it does not answer my question.

Thanks and looking forward to your suggestions!

Simple Drop-down menu with Image Display

30 October 2012 - 02:19 AM

Hi guys! Posted Image

I'm working on a very simple problem right now.
I would like to create a user interface of the following structure:

1) Drop-drop menu with options of multiple image names
2) Image panel, which displays the image selected in the menu

Any ideas of how to get started?

Thanks!Posted Image

Spherical Harmonics - Sphere maps, cube maps and user interaction

28 October 2012 - 01:24 PM

Hi guys! Posted Image

This is my very first post on this forum Posted Image

I'm very much new to OpenGL and I'm currently starting my newest adventure in this field - Spherical Harmonics.
The idea I would like to implement it the following:

A user interface (OpenGL or MATLAB), which displays an illumination model and a scene containing synthetic objects.
The user gets to rotate/move/play around with the illumination model and, as a result, the image is rendered under the chosen illumination.

I have read through quite a few previous posts on this topic and googled the web (this is the most relevant project page: Link), but there are still a few open questions.

1) What is the interpretation of a spherical harmonic model - it models the incoming light for each pixel on the surface, i.e. irradiance. And rendering is done based on the outgoing lighting power, i.e. radiance. Is this correct?

2) SH are said to be good for image with only low-frequency components. Why so? Could anyone provide with an example image, which is NOT suitable for SH modeling?

3) Spherical harmonics can be represented using cube maps or spheres. What is the difference - is one representation better than the other? Are there any other options - e.g. triangles, octaeders, ellipses, etc.?

4) Light probes can be used as environments maps (Link). Are there any other options?

5) I came across an excellent tutorial by Robin Green (Link). I also found a nice implementation of it, which I would like to edit: Link
Unfortunately though, I am not quite sure how/where to get started.
Any suggestions?

Looking forward to your response! Posted Image