Invitation

Whoever wants to contribute to this blog , posting his experiences on the same place, please send me a message !

Sunday, February 19, 2012

Bidirectional Path Tracing using Nvidia Optix , Part 2 (Diffuse + reflections)

After minimal changes , I present you my first reflections (Diffuse Coefficient is Kd=0.1 and reflectance coefficient Kr= 0.9 in this example, these probabilities are used in the Russian Roulette. )



In these two first posts, the intensity of the light is attenuating at each "hop" of the path ,  as a product  of : 
 BDpathEye[eyeIndex].contribution*BDpathEye[eyeIndex].cosin*2.0*M_PIf; 
(2*π is used because at this point only diffuse surfaces are concidered)

Contribution is the brdf of the ray-hitpoint. 



In the next post(s) , i will try to improve this factor by adding the attenuation from the traversed distance(r^2) into the mix , also i will add refraction and specular coefficient 

Wednesday, February 15, 2012

Bidirectional Path Tracing using Nvidia Optix , Part 1 (Diffuse only)

Greetings again after so long time,

In this post i will show you my first results from my implementation of  Bidirectional Path Tracing using Nvidia Optix , which I have started 3  weeks  ago, as a part of my CS Master Thesis in  A.U.E.B.  (Athens,Greece ) For a quick overview of the theory , see here .  Warning , Post in the Greek language :-)

I will try to give a hybrid approach to the problem (using both Optix on GPU and some computations being made on the CPU to balance the computational load )

In this first post, I will show you the first really good rendering ,after correcting some mistakes that i have encountered during these 20 days. The implementation includes at this POINT only the basics , diffuse only surfaces with no visual effects or importance sampling. Reflection and refraction are under construction right now. So you will have them in a later post.

The code is pretty straightforward , but i will not post it right now because it is not finished . I have only strictly implemented the theory which is described in the classic thesis of Veach and similar papers.



I have gathered the best material (theory and staff) that i gather here - >



Example snippet from the main Optix- Function:

______________________________________________________________
.....
unsigned int seed = tea<16>(screen.x*launch_index.y+launch_index.x, frame_number);
  do {
  
    unsigned int x = samples_per_pixel%sqrt_num_samples;
    unsigned int y = samples_per_pixel/sqrt_num_samples;
    float2 jitter = make_float2(x-rnd(seed), y-rnd(seed));
    float2 d = pixel + jitter*jitter_scale;
    float3 ray_origin = eye;
    float3 ray_direction = normalize(d.x*U + d.y*V + W);


//1st Step : Eye-Path 
unsigned int eyeDepth=0u;
float3 tmpres = pathtrace_camera(ray_origin,ray_direction,seed,eyeDepth);
  
//2nd Step : Light-Path
unsigned int lightDepth=0u;
tmpres = pathtrace_light(seed,lightDepth); 

//3rd Step : Combination
 float3 tmpColor=make_float3(0.0,0.0,0.0);

for(int light=0;light<lightDepth;light++)
{
for(int eye=0;eye<eyeDepth;eye++)
{
contrib=make_float3(1.0,1.0,1.0);

for(int i=0;i<light;i++)
{
uint3 lightIndex =make_uint3(launch_index,i);
contrib *= BDpathLight[lightIndex].contribution*BDpathLight[lightIndex].cosin*2.0*M_PIf;
}

contrib *= (BDconnection(light ,eye)*2.0*M_PIf*2.0*M_PIf);

for(int j=0;j<eye;j++)
{
uint3 eyeIndex =make_uint3(launch_index,j);
contrib *= BDpathEye[eyeIndex].contribution*BDpathEye[eyeIndex].cosin*2.0*M_PIf;

}
tmpColor+=contrib;
}
}

    
  tmpColor/=(float)(lightDepth*eyeDepth);
  
  color += tmpColor;
  } while (--samples_per_pixel);

//combination

  float3 pixel_color = color/(float)(sqrt_num_samples*sqrt_num_samples);
_______________________________________________________________________________

Tuesday, July 19, 2011

Bidirectional Path Tracing using Brilliance Engine #2

Our project is nearly over, stay tuned for the version  0.1 during this week


It is co-written with Christos Alatzidis , a jack-of-all-(informatics' )-trades, programmer , friend and classmate.
This is his personal site: http://www.alatzidis.gr/

Sunday, May 29, 2011

Deferred Renderer Graphics Engine

Στα πλαίσια της πτυχιακής μου εργασίας στο Τμήμα Πληροφορικής και Τηλεπικοινωνιών του Εθν.Καπ.Πανεπιστημίου Αθηνών δημιουργήσαμε μαζί με το συμφοιτητή μου Λάμπρο Ταμπούρλο και νυν μεταπτυχιακό φοιτητή αυτού του τμήματος , μία Μηχανή Γραφικών με χρήση της Τεχνικής Deferred Rendering μέσω OpenGL / GLSL  . Επισυνάπτω το αρχείο του συνοδευτικού βιβλίο με την παρουσίαση και τις οδηγίες χρήσης του κώδικα , ο οποίος αν τον επιθυμείτε μπορεί να σας αποσταλεί για μελέτη και χρήση (μη-εμπορική και με αναφορά στην πηγή , προφανώς...) Παρουσίαση

this post is in greek because the attached file is in greek . It presents my degree thesis in Deferred Rendering in OpenGL /GLSL


Bidirectional Path Tracing using Brilliance Engine #1

The second project ,apart from the Android Game , that I am pursuing this time of the year is the creation of an extention of the Brilliance Ray Tracing Engine created by my professor Georgios Papaioannou BRILLIANCE

We are trying to implement a bidirectional path tracer as part of my Master's  course: Advanced Computer Graphics that belongs to the "Computer Science" program of AthensUniversity of Economics and Business

The source code will be posted when ready!

due 3 july 2011

3D - Android Game Part#1

As a part of a educational project in Multimedia over mobile devices , two of my colleagues and me are building a 3D-Game for Android mobile phones.

It is a flight simulator combined with classic coin gathering into a cartoon like environment

The whole project is in OPENGL ES 1.1 for max compatibility with older devices.

Here is the presentation: Android Game :: Aeroplane Stunts

Friday, May 6, 2011

Bidirectional Ray/Path Tracing using Nvidia Optix 2.1 --- A presentation

Επιτέλους το πρωτο ποστ! // And there it is my first post!!

Καλώς το λοιπόν το πρώτο ποστ μου . Προφανώς ο στόχος που είχα θέσει ήταν υπεραισιόδοξος. Αυτό όμως δεν με εμποδίζει να ανεβάσω αυτή την παρουσίαση που έγινε στα πλαίσια του μαθήματος γραφικών της σχολής: Είναι σχετικά με το Bidirectional Ray/Path Tracing και το Nvidia Optix 2.1 και μπορούν να συνδυαστούν . Αυτό θα είναι και εκτός απροόπτου το θέμα της διπλωματικής μου εργασίας

Οριστε: presentation

In this post I present briefly the Bidirectional Ray/Path Tracing technique , Nvidia Optix 2.1  and the posibility to execute BPT on Optix. This will be part of my master-thesis due next year

Any future progress , will be posted most probably in english