Archives for: June 2009

2009-06-24

Permalink 20:36:40, Categories: GSOC 2009  

Early Refactor Success

Hello CrystalSpace,
This weeks work has been focussed on completing the factoring out of my first reward (debugprint.) This work took significantly longer than initially expected, but I believe that I have learnt a lot from the experience and am confident that the process of factoring out the remaining rewards will be trivial.

I am now putting together a test program that makes use of all rewards, so that I can test the new implementation of each. This program will later serve as the basis of the quest tutorial. From my work with the system I believe there is a firm need for a singular collated example of all rewards and triggers to increase the community's usage of this feature and look forward to providing this.

Finally, I will be posting shortly after this post a formalised list of deliverables. My current progress is behind the initial deadlines set out in my project proposal. At the time I underestimated that time I needed to become familiar with the CS/CEL architecture. However, I believe that I have also overestimated the time needed to implement a behaviour tree. Therefore, I am still confident that all of the promised deliverables will be accomplished in the timeframe of the GSoC program. In addition, a number of other requests have been made for modifications to quest that I hope to cover once the promised refactor and BT implementation is completed. My intention for this post is to update it periodically to show my progress.

That is all for this week, as always please feel free to contact me if you have any suggestions, queries or complaints.

Kind Regards, Sam

2009-06-17

Permalink 14:16:19, Categories: GSOC 2009  

Coding Has Begun

Hello CrystalSpace,
My minor projects late last week and this weekend have come to an end succesfully. I now feel comfortable working with the SCF, Quests and smart pointers. Thank you to everyone on the mailing lists and irc channel that have helped me overcome this initial hurdle.

I have now begun coding the deliverables promised and have made a start on factoring the reward debug message out of quests. My cel workspace now contains a new project plgrewards that compiles a dll containing plugins for each of the rewards and I intend to create something similar for the triggers shortly. I have a busy weekend ahead of me but believe that significant progress will be made on the refactor over the next week / week and a half.

I also intend to publish a formalised list of deliverables with estimated deadlines. I believe there is some way to publish to the blog so that this list will remain as the top post, if so I will periodically update that post to announce deliverables submitted and to show my progress.

As always please feel free to question, poke or criticise me either openly here, in irc, the mailing list or privately by email. I appreciate any and all input on this project.

Kind Regards, Sam

2009-06-16

Permalink 08:43:01 pm, Categories: GSoC 2009, Planning Progress  

Long overdue ...

We are underway and I am long overdue in posting an entry here so there is much to discuss.

What have I been doing:
Planning! I have been getting very familiar with lighter2 and determining where change would be most appreciated. This has been a slow task as much of lighter2 is un-commented (or at least, the comments are not very detailed). Also, I have had to learn much about the CS app framework, the instance tracking classes used in CS and the i* classes used throughout lighter2. Conceptually, I reached a good place to actually propose some changes to Scott my mentor last week and we met to discuss just that.

What is the current status:
At present, we have identified the following concerns or features that need attention in lighter2 and would pertain to my proposal and my areas of expertise -

  1. lighter2 is an external dependency for any CS app. For redistribution purposes, it would be better if it was internal (either built into the library or as a plugin).

  2. lighter2 uses the 'direct lighting' approach for its central calculation. This works well and is efficient but is below the standard of other game engines which use Radiosity. For example, see this page under the heading 'Dynamic Lighting and Shadows' (http://developer.valvesoftware.com/wiki/Source_Engine_Features).

  3. While lighter2 is a single run, non-interactive component efficiency is still quite important. This is because during development of a game, static lighting needs to be recalculated every time the world is changed. This can be tedious if it takes more than a minute or two to give a result(and seconds would be even better).

  4. Conceptually, any light-mapping application can be thought of as a bootstrap. The rendering system will use the light maps to render the world but the light-mapping application needs a rendering system (or at least part of one) to construct the light maps. Therefore, lighter2 naturally depends on some components of the CS library (mostly viewing and projection calculations and geometry loading components).

    Some of the conceptual components of lighter2 (like the 'scene' and 'segment' classes) should be part of the CS library. I have not examined the library itself too deeply to see if it provides these components but Scott suggested that they are in fact copies of classes from the library. This is conceptually undesirable but there may be reasons for it. More discussion of this is in order.


  5. At the heart of the 'direct lighting' approach is a BRDF approximation used to calculate how much ambient/diffuse illumination each surface gives off for each light source. I have not yet identified where this calculation takes place but I'm operating on the assumption that this calculation is being done somewhere and is using a very simple BRDF model like the Blinn-Phong model.

What conclusions can be drawn:
From all of this I've identified some requirements for this project -

  1. New code should be easy to integrate (or already be integrated) into the CS library.

  2. The current 'lighter2' work flow (which will probably be more efficient than any new work flow) should be retained as a fallback for when quick calculations are important. This includes both the 'direct lighting' algorithm and the current BRDF model.

  3. We should consider re-writing lighter as a plugin. This is secondary to the main proposal objectives but if we are making enough changes to lighter this may happen anyways as a side-effect or as an add on at the end if there is extra time.

So what are the plans:
I'm going to start moving forward with changes now. Here's the initial proposal of work in the order it will be undertaken (this may change in a typical design-build fasion) -

  1. The direct lighting BRDF model will be upgraded to the Oren-Nayer model. This should be very easy and will satisfy part of the original proposal. If nothing else gets completed on this project at least this will be in place. It will also serve as a way to finish examining the details of lighter2 that will be more productive than just reading the source. Note that we may need to convert the Blinn-Phong parameters to Oren-Nayer parameters so that material properties do not need to be redesigned for every existing world to take advantage of this improved model.

  2. The Radiosity algorithm will be implemented as a CS plugin. I have implemented Radiosity before and believe this can be done relatively quickly given the tools that CS already has built-in. Implementing it as a plugin will make it available for use in lighter2 or even as its own internal step in the standard CS rendering pipeline. Here's a breakdown of how this will be undertaken -

    1. The most efficient approach to Radiosity that I know of is the hemi-cube method. This fits well in any scanline rendering system that can render-to-texture. We will start by developing a CS app that renders the scene from the point of view of the light sources to a texture map. This will then be integrated into a bigger radiosity plugin.

    2. In the radiosity algorithm all surface patches can be light sources. To avoid the need to supply seperate lights just for the radiosity system, existing light sources will have to be approximated with proxy geometry and special work may be required to support spot-lights and other non-area light sources. Point light source will need to be approximated with very small area light sources.

    3. The hemi-cube textures are used to compute form factors and fill in a large matrix that describes which surfaces can see what parts of which other surfaces. This is a straight-forward calculation.

    4. With the form factors calculated we need a large linear system solver that computes the equilibrium achieved by this world. This will initially be a standard Gauss-Seidel solver and can be upgraded to something fine-tuned to the radiosity problem at a later time.

    5. The solved system must be written back to the geometry by placing the computed colors into the mesh vertices which normally requires some type of interpolation. From here, we could further propagate this data out into textures which would then become the light maps for the scene.


At this point we will reevaluate and decide what is to be done next. Additional project tasks may include:

  • Improving radiosity with things like: a better linear system solver, automatic geometry or light map subdivision at high-frequency artifacts and support for more types of light sources.
  • Re-working of lighter2 as an internal dependency (see above)
  • Other changes to lighter2 to bring it up to speed with the CS library and make it more maintainable into the future.

Conclusions:
What's described here will constitute the bulk of this project and work will begin immediately. I intend to reevaluate progress as I go and learn more about CS and lighter2. All comments are welcome and encouraged as there are a plethora of assumptions underlying these ideas and any number of them could prove to be wrong. The collective knowledge of the CS community can do far better to identify these problems than I can digging through the mountains of code and documentation. My time is better served now making changes rather than fact-checking!

Thanks to all for reading this! I will post more as I go.

Seth

2009-06-10

Permalink 12:02:23, Categories: GSOC 2009  

Exams Over

Hello CrystalSpace,
So my exams finished on Friday past and I am now fully committed to the project. My work since then has focussed on reading, I have consumed everything I can find relevant to my project in the hope of solidifying my understanding of CS and CEL before I begin coding.

For anyone following my progress that is concerned about the issues I was having with merging with trunk and the black screen on walktut. These difficulties have been overcome. The merging problem was solved by using svnmerge.py instead of the windows executable provided by the same group. The black screen problems were then solved, with a correct merge to trunk, a fresh checkout of CrystalSpace and the latest (14.02) precompiled version of cswin32libs.

My intention over the next couple of days is to code a few minor self projects, to ensure I fully understand the SCF and current implementation of Quests.

Finally, as some of you will have noticed I have started to lurk on the irc channel whilst working. So if anyone has any questions or suggestions, please feel free to harass me on there. I am still fairly new to irc and not generally used to having message clients running, so I apologise if I am slow to reply but will be very grateful for your input.

Until Next Week, Sam

2009-06-03

Permalink 15:23:54, Categories: GSOC 2009  

Preliminary Work

Hello CrystalSpace Community,
As many of you will know the GSoC 2009 coding period has officially begun and whilst, due to my final exam commitments, I am unable to start full time just yet I have begun some preliminary work on formalising the deliverables for the Quest refactor and setting up my working environment from the CrystalSpace SVN trunk and my assigned CEL branch.

It is my intention to make this blog a weekly update, starting today and continuing every Wednesday throughout the development period to keep the community up to date with the work I am doing.

For now, if anyone has any comments on the existing Quest implementation be they positive or negative please contribute to the CEL mailing list conversation [Cel-main] Quest Refactor . The biggest current issue is to wether we should factor out sequences and instead implement them with a standardised start-finish protocol. Any opinions or comments on this suggestion are greatly appreciated.

I look forward to debating these issues further.
Sam.

June 2009
Mon Tue Wed Thu Fri Sat Sun
 << < Current> >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Blog All Title

This is the long description for the blog named 'Blog All'.

This blog (blog #1) is actually a very special blog! It automatically aggregates all posts from all other blogs. This allows you to easily track everything that is posted on this system. You can hide this blog from the public by unchecking 'Include in public blog list' in the blogs admin.

Search

Misc

XML Feeds

What is this?

powered by
b2evolution