Editing User:Kunigami/GSoc2011/Proposal

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 +
= GSoC Project Proposal (the one I submitted on April 9th) =
 +
 +
== Personal Information ==
 +
 +
* Name: Guilherme Kunigami
 +
* E-mail address: kunigamigmail.com (also kunigami-dev@gmail.com)
 +
* IRC username: kunigami
 +
 +
Brief background info:
 +
 +
I'm a computer engineer, MSc. student at UNICAMP. I've experience in C/C++ (4+ years), design of algorithms (ACM-ICPC and Topcoder contestant). Relevant graduate courses I've taken are computational geometry, computer graphics and image processing. Although my research area is essentialy combinatorial optimization and computational geometry, I have a great interest in computer graphics, specially ray tracing.
 +
 +
I've never participated in big projects or Google Summer of Code but already contributed to Scilab translation and bug fixing. I also developed some personal projects like a visualization to computational geometry algorithms (http://www.loco.ic.unicamp.br/~kunigami/projects/geometria/).
 +
 +
Tasks performed so far:
 +
 +
- Submtted a patch: http://sourceforge.net/tracker/?func=detail&atid=640804&aid=3250116&group_id=105292
 +
- Read development guideline: http://brlcad.svn.sourceforge.net/svnroot/brlcad/brlcad/trunk/HACKING
 +
 +
About my time: I'm finishing my master thesis and I think the timing is quite suitable for dedicating to the project. Until middle of May, I need to send a final version of my thesis to my advisor. After that will begin a period of reviews and small changes that will take me little time. So, from middle of May to August 15th, I can surely spend +40h/week. Before that, I'll have to check final details of my thesis and thus I'm not sure if I can spend more than 20h/week. To raise the chances that the project will be done, I'm declaring that I'll take priority on Google Summer of Code over my thesis from May 23th until August 15th. I'll be able to postpone a month or two of my thesis if I successfully complete the program.
 +
 +
I'm enrolled with my University until the end of July, so I'm eligible according to GSoC rules.
 +
 
== Project description ==
 
== Project description ==
  
Line 34: Line 57:
 
The last two items are quite interesting for raytracers.
 
The last two items are quite interesting for raytracers.
  
=== Proposal Idea ===
+
==== Proposal Idea ====
  
 
The OSL represents a interesting framework to develop shaders. BRL-CAD shaders could benefit from it by improving performance with the concept of closures. Also, we could take advantage of already implemented shaders for OSL and when developing new shaders for BRL-CAD we would be contributing to OSL database, which is, according to [6] (may be outdated) quite sparse.
 
The OSL represents a interesting framework to develop shaders. BRL-CAD shaders could benefit from it by improving performance with the concept of closures. Also, we could take advantage of already implemented shaders for OSL and when developing new shaders for BRL-CAD we would be contributing to OSL database, which is, according to [6] (may be outdated) quite sparse.
Line 40: Line 63:
 
There are some issues to solve first. In the OSL specification document from January 2010, it's said that some components are assumed to exist in order to implement shaders using OSL. One of them is the integrator, which combines the color closure, lights and view-dependent variables. They say in the future they would provide a way to implement them through OSL, though I'm not sure what is the current state. If not, it would need to be included in the project.
 
There are some issues to solve first. In the OSL specification document from January 2010, it's said that some components are assumed to exist in order to implement shaders using OSL. One of them is the integrator, which combines the color closure, lights and view-dependent variables. They say in the future they would provide a way to implement them through OSL, though I'm not sure what is the current state. If not, it would need to be included in the project.
  
Here is how I plan to execute this project: study the details of BRL-CAD and OSL shader. This includes implementing shaders for these systems as well a simple integration test, which can be done using the single ray shooter from BRL-CAD with no optics or shaders and plugging in the OSL shader. This will assess the feasibility of the project as well as provide an idea on which changes are necessary to adapt OSL shaders. So, we'll be able to design and implement these changes to the BRL-CAD shader system.
+
Here is how I plan to execute this project: study the details of BRL-CAD and OSL shaders. Change the shader system of BRL-CAD to adapt to shaders implemented with OSL (this is important so we can use any shader developed with OSL). Reuse shaders that are already implemented with OSL and that fits the current shaders of BRL-CAD. Then, implement possibly missing shaders. After implementing/porting the first shader, we must check consistency of the new shader system, testing if it works well with the raytracers. Also, after each shader is added, we need to check if the result is similar to the replaced one. An extra task that can be done, if time allows it, is to implement new shaders with this language. Another good thing that can be done is to write a small tutorial on how to implement shaders using OSL.
 +
 
 +
==== Timeline ====
 +
 
 +
Community Bonding:
 +
Study in depth details OSL and BRL-CAD shaders. Possibliy take a look at other shaders like yafaray and pixie.
 +
 
 +
* May 23 to June 20 (4 weeks):
 +
Evaluate which changes need to be done in order that BRL-CAD shader system can accept OSL language-based shaders. Design and start implementing these changes. Report advances to mentor.
 +
 
 +
* June 20 to July 18 (4 weeks):
 +
Research any shader that can be reused for BRL-CAD or implement one. Test it against the new system. Perform tests over the new shader system.
  
Reuse shaders that are already implemented with OSL and that fits the current shaders of BRL-CAD. Then, implement possibly missing shaders. After implementing/porting the first shader, we must check consistency of the new shader system, testing if it works well with the raytracers. Also, after each shader is added, we need to check if the result is similar to the replaced one. Extra tasks that can be done, if time allows it, is to implement new shaders with this language and/or write a small tutorial on how to implement shaders using OSL.
+
* June 18 to July 1 (4 weeks):
 +
Port or implement missing shaders, always performing tests after each one and checking with mentors if the shaders are being rendered as expected.
  
=== Timeline ===
+
If time allows it, implement additional shaders and/or write tutorial on how to develop a shader using OSL.
  
* Community Bonding (4 weeks)
+
==== References ====
** Compile OSL [ok]
 
** Discover how testrender application works [ok]
 
** Implement and compile a shader using OSL [ok]
 
** Test the shader with testrender [ok]
 
  
* Week 1 (May 23th to May 30th)
+
[1] src/liboptical/init.c
** Implement a sample texture/material shader (polka-dot texture) for BRL-CAD [ok]
 
** Test it by assigning it to an object and rendering it. [ok]
 
  
* Week 2-6 (May 30th to Jul 4th)
+
[2] src/liboptical/material.c
** Implement a special shader for BRL-CAD that will be an interface for OSL system [ok]
 
** Integrate a shader implemented in OSL and this interface [ok]
 
  
* Week 7-8 (Jul 4th to Jul 18th)
+
[3] http://opensource.imageworks.com/?p=osl
** Implement some BRL-CAD shaders as OSL shaders
 
*** Mirror
 
*** Glass
 
*** Cloud
 
*** Checker
 
** Check if any additional changes in the system is necessary to render the new shaders
 
  
* Week 9-12 (Jul 18th to Aug 15th)
+
[4] http://code.google.com/p/openshadinglanguage/wiki/OSL_Introduction
** Resolve the multi-threading issue
 
** Extra: implement a mode in rt so the framebuffer updates the screen at every sample
 
** Extra: write a tutorial
 
  
=== References ===
+
[5] http://brlcad.org/w/images/2/2c/Optical_Shaders.pdf
  
# src/liboptical/init.c
+
[6] http://code.google.com/p/openshadinglanguage/wiki/GSoC
# src/liboptical/material.c
 
# http://opensource.imageworks.com/?p=osl
 
# http://code.google.com/p/openshadinglanguage/wiki/OSL_Introduction
 
# http://brlcad.org/w/images/2/2c/Optical_Shaders.pdf
 
# http://code.google.com/p/openshadinglanguage/wiki/GSoC
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)