Jump to content
  • Advertisement
Sign in to follow this  

Photon mapping

This topic is 2710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello guys, :rolleyes:

my name is krishna teja

im new to this forum. Joined this forum having good interest in graphics and also want to develop my skills.

my friend recommended to join this forum..

Im doing my masters degree, as part of our college project we should do the following..

Interactive ray-tracer using photon mapping technique:

Global illumination methods are required to achieve realistic image synthesis of general environments. Illumination effects such as shadows, caustics, and indirect illumination are important visual cues that add to the perceived realism of a rendered scene. Photon mapping is a widely used algorithm for global illumination, where one traces pho tons through the scene, recording their interaction with the elements in the scene in a data structure, called the photon map and using this photon map to estimate the physical phenomena such as caustics, diffusion, shadows, etc., to do the final rendering. Since this is a computationally intensive process, the advent of graphics hardware has enabled interactivity in the rendering.

*Create a GPU-based stochastic ray tracer that uses the photon map to simulate full global illumination directly on the graphics hardware, with
progressive, interactive feedback to the user.

*http://www.graphics.stanford.edu/papers/photongfx/ (this was given by our professor)

*Given time to complete this project 3 months :(

*i want to ask u guys how to proceed with this one and which language to use..i.e to use whether (CUDA/Opengl/Opencl/Directx API)

thank u in advance...

Share this post

Link to post
Share on other sites
Depends on what you already know, if you are an expert in DirectX with CUDA, you should go that route.

For the language: If speed is not of great importance, you can choose any language you like. You could even choose Python as it has OpenGL and OpenCL bindings.

For the gpgpu api: OpenCL also run's on ATI/AMD gpu's.

For the rendering api: DirectX and OpenGL is about equally 'fast'. Drawcalls of DirectX are more heavy but that's the only difference. OpenGL is generally seen as easier to learn the basics and get up to speed, this is useful if you want to focus on the algorithm instead of getting stuff on the screen. You should however look into VBO (Vertex buffer objects) fairly quickly as intermediate mode is quite slow. From what I've seen DirectX forces you to use a VBO equivalent, but I'm not quite sure.

About the route you should take: Again this depends on what you already know. If you're already comfortable with a rendering API you don't need to learn that. If you've already written a few gpgpu programs you don't have to this as well.

We can help better if you tell a bit more about what you are capable of and/or are an expert in.


Share this post

Link to post
Share on other sites
There are multiple approaches to this type of Problem.

1. OpenCL/CUDA

In this Approach, you would be writing everything yourself. This is pretty "straight forward", as that you would be implementing every algorithm yourself. Should be easier if you know the Algorithms you need (Monte-Carlo, etc... ).

The only problem here is learning your way around OpenCL or CUDA, Figuring out what you can do in parallel and basically the more technical Side of things.
This would be my Method of Choice if it came down to it.

2. DirectX/OpenGL

As you are supposed to use Ray tracing, it might seem weird to List DirectX and OpenGL which are pure Rasterizers. But, they can still be usefull!

You would still write your Ray Tracer in the normal fashion, Independent of DirectX/OpenGL, but merely using the same Data (Geometry, Photon Map... ).
And you could use DirectX/OpenGL to actually Render the scene (but NOT present it, as it wouldn't fullfill your task) and use all the Inbuild functions of DirectX to create

your Photon Map.

For Simple Geometry I could think that even Re-Rendering each scene from the POV of each Geometry point and using the Stencil Buffer to Pass on Photon Information.
Reflections and Refractions can also be done (even though more difficult as Option 1) using this Method. I've only taken a short peek at the Paper you posted, but I believe they
use this method as well.

3. A Mix of Both

Obviously, you can mix them Up as you please. Not something I would suggest, but it's possible none the less and worth mentioning.

As for the Language, I'd recommend C++. You're going to be working heavily with the Hardware here and Large Chunks of Data. The whole reason of doing this on the GPU is to gain speed. C++ will allow you to optimise your code alot.

However, this all depends on your prior experience with C++.

Share this post

Link to post
Share on other sites
The work by Henrik Wan Jansen et. al. (which you were given by your professor) is exceptional. It's a very good starting point and provides plenty of information for how to do your own implementation.

To make specific recommendations, though, we need to know more about you. What languages and APIs are you familiar with? What background in 3D graphics do you have? Have you written a traditional raytracer? Photon mapper? Radiosity renderer? Monte Carlo path tracer? Are you familiar with the algorithms at least behind those rendering approaches? Do you know how GPGPU techniques work and how to write effective GPU-side code? Do you know OpenCL, CUDA, or DirectX11 Compute Shaders with any degree of proficiency? Have you ever written a hybrid raytracer/polygon rasterizer?

The more we know about your own experience and knowledge level, the more we can offer guided and useful suggestions for how to proceed.

Share this post

Link to post
Share on other sites
[size="4"]Thanq u very much(assasinator, Kayzaks, ApochPiQ) for ur valuable info...

Actually in my bachelors degree i have undergone computer graphics subject . now i got this proj as part of our OS proj( i chose it ). presently im also going for GPGPU course. I have a good enough skills in programming languages like c/c++/java . I have interest in graphics related stuff but never done anything big. im a starter in this area..
eventhough im new to this field i think this is my starting point to this career and definitely assure i can coupe up ..

I will consider each and everyone's way to approach my successful project completion and do many more in future...

another question..
can u tell me what basics should i know and how to proceed??

thank u in advance...

Share this post

Link to post
Share on other sites
Raytracing, photon mapping.. really any form of GI, that you want to be interactive, is a very bad place to start in the graphics field. If you really are a beginner and haven't done much with OpenGL or DirectX, much less compute shaders, CPU parallelism, etc. then you should start smaller - I would advise you choose a different project if at all possible.

I'm actually surprised you would be assigned this with a 3 month time-frame without having some prerequisite course on GPU programming :\

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!