Final Project

GPU Final Project

Next steps or rather final steps-:

With just a few hours remaining to the final submission. I have to do the following :

Motion blur

Multiple scattering, not sure how trivial or hard it would be after implementing single scattering

Presentation, demo video

Code cleanup\ Comment

Most importantly sleep 😛

Getting back to work now !!

FINAL Presentation

1) PPT

FINAL PPT_GPU(without_video)

2) VIDEO

3) CODE

https://github.com/gundeep/GPUpathTracer

4) PAPER

https://www.dropbox.com/s/y6w0s4n8h8dgs7z/CIS_565_FINAL_Projectfinal.pdf

 

BRDF’s

Just took a break from SSS and shifted my attention to BRDF’s. What is a BRDF ?

The most trivial explanation of a BRDF (bidirectional reflectance distribution function) is that it is the bit of shader code describing how a surface reacts to light. Generally, it is responsible for calculating the specular highlights and diffuse characteristics of the surface material.

Cook Torrance

There is no single model that fits every situation, but there are some better than others. The Cook-Torrance model has been shown to be a top performer, when compared against actual acquired BRDF data. Of course, with the good comes the bad and Cook-Torrance is one of the most expensive models to compute. But for overall results, it is hard to beat.

Why cook torrance?

First, it computes its specular lobe using the half-angle vector, which has been shown to give the most physically plausible results.

Second, it accurately models the Fresnel effect, increasing the specular reflectivity as the surface turns away from the viewing direction.

Finally, it models micro imperfections in the surface, taking into account how they add to, and attenuate, the specular reflections

Theory

The Cook-Torrance BRDF is governed by the following equation, which is computed for each light and summed:

Any BRDF paper is full of mathematics by nature, but do not let this equation scare you.
From the equation above, there are three components contributing to the specular highlights in the Cook Torrance BRDF. They are: a Fresnel term (F); a geometric attenuation factor (G); and micro facet slope distribution (D). We will tackle each one individually, then combine them at the end of our illuminance loop, as directed by the equation above.

Here is the rendered image with Cook Torrance. The green and pink material have specular turned on and the blue material is simply diffuse. I love the subtle reflection that is showing up.

Here i have Gauss Coefficient =100 and roughness= 0.03.

cooktorrance2

 

The single subsurface scattering

SSS_good

Yay’s so finally it seems to reach somewhere. I guess what i am not doing is right now is merging the colors due to reflection in the end. Write now it looks a very diffused i need to added some reflective properties and make it look more glossy.

The hardest part in doing subsurface scattering was to figure how to accumulate color in the end.

Next step-: I might also try multiple scattering if the time permit. Right now most important thing is to have KD tree implementation integrated. Intersection tests are killing me in OBJ’s.

 

Working with subsurface scattering -:

Subsurface scattering (or SSS) is a mechanism of light transport in which light penetrates the surface of a translucent object, is scattered by interacting with the material, and exits the surface at a different point. The light will generally penetrate the surface and be reflected a number of times at irregular angles inside the material, before passing back out of the material at an angle other than the angle it would have if it had been reflected directly off the surface.

Early results

Looks_better_SSS

subsurface_scattering_green

This still does not appear very. Its hard to locate the problem, still working on it!

 

MIDPOINT PRESENTATION

Final_Midpoint_ppt(without_videos)

 

Faster convergence and Fresnel Reflection

Here is the finally a much better result .. Almost there

done

So finally i solved the problem of fast convergence with sweet little hack. I just created the walls as

as source of light, so this way i can make almost every ray count and contribute to the final color. Earlier

i guess most of the ray were not hitting the light or the background and i was terminating them

after 6-7 bounces as a result quite a few rays ended up contributing nothing and that added some variance to the whole path tracer system and hence it took more time to converge

weird artifacts.

 

gettingcloser

Some more weird stufff

fresnel_tryrefraction_blooper

 

OBJ loader and Fresnel Reflection

Early OBJ reader results-

Not sure why it is taking like forever to converge!!

After roughly 900 iteration i have this.

stanford_bunny

 

GPU FINAL PROJECT PROPOSAL !!

For my final project i want to extend my GPU based path tracer. I feel i did a good job in creating a basic setup for a path tracer but i lacked some really cool features.

Seeing some of the results on the path tracers online i felt that I can go a long way with the path tracer i currently have and make it look much more realistic and physically accurate.

Some of the features that plan to accomplish are-:

1) Subsurface scattering.
2) Obj mesh loader.
3) Depth of field.
4) Cook Torrance BRDF model.
5) Motion Blur.
6) Interactive camera.
7) Integrate a stackless KD tree.

I feel this should be more than enough to give me sleepless nights provided i have 3 more courses and projects to work on 🙂

I hope you like my proposal and i would love to hear any suggestions you have.

Regards,
Gundeep

 

 

Advertisements

3 thoughts on “Final Project

  1. Karl Li December 12, 2012 at 1:58 pm Reply

    The single subsurface scattering is looking good! I think getting the multiple scattering to work by the end of your project shouldn’t be too difficult, as it is a relatively trivial extension if your single scattering is implemented correctly.

  2. Karl Li December 12, 2012 at 2:02 pm Reply

    Another thought: while making all the walls of your scene light sources does speed up renders, it will only work for that single scenario. A robust renderer should be able to handle any given scene, not just one single scene specifically hardcoded for the system. In that sense, your “solution” to slow convergence is not really a solution at all- if someone using your renderer loaded up a scene with a small spherical light in an enormous diffuse environment (not hard to imagine, not many useful scenes are inside of boxes of light), the convergence problem will persist. Just something to keep in mind. 😉

    • gundeeptd December 13, 2012 at 3:41 am Reply

      Haha .. karl thanks for the comment.
      It was never a solution, was just a hack for the time being.

      I really need to work a lot to make it a robust renderer which i might probably end up doing after this semester.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: