Page 1 of 15

[GSoC 2012] Off-Screen Particles project - continuation

Posted: Tue Apr 10, 2012 3:07 am
by Karol Badowski 1989
Personal Details

Name: Karol Badowski
Email: karolbadowski@gmail.com
OGRE Forum username: Karol Badowski 1989
Skype ID: drewnianybadyl

Project Proposal


1. Prefered proposition from the ideas list:

Idea from webpage http://www.ogre3d.org/tikiwiki/Help+Requested: Off-Screen Particles

It is an idea to implement "GPU gems 3. Chapter 23. High-Speed, Off-Screen Particles".

Presented solutions are very interesting for me, because they include a lot of 3D and vector math. My experience in topic of optimalisation in particle simmulations is high (explained in point "Why You're The Person For This Project").

Presented experiences let me judge that I will cope with possibly large amount of proposed solutions implementation in one summer. It will take less time for me to get familiar with knowlege needed to succeed.

Thanks to this project Ogre users will benefit in faster computations of particle systems, so this is an important project. Hidden and off-screen particles will not be painted, so saved time will enable saving computational power for improvement of particle system granularity (for example).

Image
Classes diagram based on description: here
2. Own project idea:

Visualisation and physics of mass-spring models
(...)
Schedule

"Off-Screen Particles" project timeline:

Before May 21 - Reading documentation of OGRE engine, especially particle systems

before Jun 4 - communication with project supervisor about eventual difficulties or questions in understending of already implemented classes which will probably be used to communicate with implemented component.

Jun 20 - further communication, presentation of class diagrams, uml projects, proposed algorythms and solutions for further implementation.

July 15 - implementation of algorythms connected with depth testing and omitting unvisible particles + optimalisation of algorythms. Providing clear component structure of the code and providing documentation.

July 30 - implementation of algorythms connected with Alfa-blending + optimalisation of algorythms. Providing clear component structure of the code and providing documentation.

August 18 - implementation of algorythms connected with mixed - resolution rendering and edge detection + optimalisation of algorythms. Providing clear component structure of the code and providing documentation.
Own project proposition timeline:
(...)

Why You're The Person For This Project

Code: Select all

- My Engineer certificate work: "Physics of rigid body for three-dimensional computer games and simulations"
 (including 2 person team implementation of engine and game)
- For my "paralell algorythms" classes i have chosen project of graphic card computations for fluid particle simmulation
- I am familiar with CUDA and OpenCL programming and techniques of Single Process Multiple Data optimalisation solutions.
- I have implemented BSP trees (which includes implementation of lots of geometry intersections detection), Oct-Trees and
 other solution for optimalisation of my [u]own physics engine[/u].
- I am familiar with algorythms used in rendering thanks to 3D Graphics classes that included practical labratories with
 implementation (OpenGL and DirectX).
- participant of scientific clubs: "Vertex" ([u]computer graphics and game developement[/u]) and "Java Advanced Group" (Java technology)
- training in [u]component-based software engineering[/u] (usefull in this perticular project).
- familiar with[u] engines[/u] UDK, OGRE, IRRLICHT
- took classes from [u]game designing[/u]

- I am a good student. Several times I was a winner of the scholarship for academic performance. I also study on [u]two
 faculties paralelly[/u]: Informatics on Gdańsk University of Technology [masters studies, totally 4'th year (one year to go)],
 and Bioinformatics on University of Gdańsk [2'nd year]. Studies of bioinformatics also mean that I have solid background at
 [u]Biophysics, which is very important in particle simmulations[/u] and in creating a physical angine of human tissue models.



[size=150][b]Other Achievements & usefull skills:[/b][/size]

- I have participated in student apprenticeship at ICM at University of Warsaw, carried out with the support of the „HPC
 Infrastructure for Grand Challenges of Science and Engineering” Project, co-financed by the European Regional Development
 Fund under the Innovative Economy Operational Programme. Project topic was [u]communication and visualisation of
 communication in distributed computations[/u].

- I speak [u]3 languages[/u]: Polish (native language), English (16 years of education, level C2 (PROFICIENCY) and German (7 years of education)
- participation in many [u]team projects[/u] during university education: ability to plan team projects, RUP, SCRUM, UML, repositories.
- president and co-founder of scientific club: "Tak Bots Club" (artificial inteligence) 
- 1 month summer internship for students in company "Wirtualna Polska".
- created tool supporting analysis of lung slices pictures
- project: website with use of PHP, XHTML, JavaScript, CSS, Silverlight and SQL
- data mining team projects with implementation of artificial intelligence algorythms

- created documentation and UML models during team project management classes: „IT system supporting a medical clinic”
- participation in contests: ITPW 2008 and XV Informatics Olympics
- took classes from mobile devices developement


[size=150][b]Knowledge of Programming languages:[/b][/size]

- parallel computing technologies: MPI, CUDA, CELL,
- platform .NET: C#, Silverlight, .NET WCF, Basic, MVC, Expression Blend
- Java platform: Java ME, Java , Jade, Java for Android, Jade
- C, C++, Pascal, Ada, Assembler
- Prolog, Lisp, OWL
- database languages: MySQL, SQL Lite, MS SQL, Oracle
- Technologies: XML, XHTML, CSS, Flash, Javascript, Ajax, PHP, CoffeeScript, ExtJS, JQuery
- OPEN GL, DirectX

- I know how to use [u]environments[/u]: Visual Studio 2005, 2008, 2010, Eclipse, Netbeans,  Matlab, Protege, VisualNC, GPS, TkEclipse, SWI-Prolog
3D modelling: Blender, CarraraStudio


Why OGRE?

I have had some experience with game and grapics engines. On meetings of students scientific club "vertex" we had possibility to learn basics of OGRE (students who prepared tutorials for us, are advanced OGRE users). I think that this product is very interesting. I am excited to use my skills for purpose of making Ogre even better.

I also hope that working for this organisation during Google Summer of Code would bring me significant experience and open a way to our further cooperation.


Contributor Agreement

I have no objections, I am aware that i will have to sign it.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed Apr 11, 2012 8:15 am
by Karol Badowski 1989
Update:

1). I have successfully compiled OGRE from the source.

2). At the moment I am trying to get familiar with OGRE documentation, especially topics: CompositorChain, Material, Shader, RenderTarget.

3). During this week I will spend some time on preparing my proposition of class dependancies and UML diagrams.

4) In the next step (after UML diagrams) I will update this topic with more detailed suggestions about algorythms I am going to use.
I have noticed that OGRE has already lots of them implemented, so I already am happy that this will give more time for implemenation of solutions specific for this perticular project, avoiding redundancy.

I will elaborete especially on solutions proposed in the article http://http.developer.nvidia.com/GPUGem ... _ch23.html, but I still will mention my own ideas, propositions of my own algorythms and solutions (or ideas for reduced versions of implemented ones) for acheving better efficiency.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed Apr 18, 2012 8:09 am
by Karol Badowski 1989
I have an initial version of classes diagram, today I will finish it and upload here.
For short preview, there are some crucial matters:

OffScreenParticles: (perhaps could be a CompositorChain)

Class controls appropriate direction of operations.
In the constructor, it transparently makes a choice of appropriate subclasses (for example subclass of DepthAcquisitioner with appropriate parameters).
It acquires input data, calls methods of following classes and propagates the output.

Even if initial choice of some used subclasses and their parameters is transparent, there are still getters and setters.

DepthAcquisitioner:

Class could be abstract (or even interface), because methods will vary depending on version of used RenderSystem and GPU series.
It would be comfrtable if choice of the subclass was automatic, transparent to the developer. Decision process will need to "ask" classes providing intel about Render System. It also could check whether Alpha channel is beeing used (semi-transparent solid objects).

Single-Pass:
-ZBuff_DepthAcquisitioner: Z-buffer
(provided in directX10)
-MRT_DepthAcquisitioner: Multiple Rendering Target
(if older than directX10 and we do not use MSAA - multisample AntiAliasing)
-Alpha_DepthAcquisitioner: depth saved in channel alfa
(if tranparency is not used and (we do not need MSAA or GPU series different than GeForce6 or GeForce7))
Two-Pass:
-TwoPass_DepthAcquisitioner: writing to single rendering target in extra pass
(if we do not use MRT, still have possibility of MSAA even in directx9, still have possibility to use alfa channel)

Class should also provide a method to read acquired depth data transparently, no matter which subclass was used.

DepthDownsampler:

Class used when there is need for downsampling of the depth buffer.
It is not obligatory when we use Two-Pass Depth Acquisitioner.
Provides fields and setters allowing to change these fields:
Especially scale of downsampling.

Could be expanded and have a subclass providing downsampling that is not proportional to the powers of 2 or not square. It could provide rectangular fields, that requires additional field. Subclass: RectDepthDownsampler

OffScreenRenderer:

Abstract Class.
Important abstract method: silhouette().
I will provide support at least for two overrides (suggested in the article), that use private methods:

-pointSamplingDepth(): creates halo
-maximumOfDepthSamples(): minor halo artifacts reduced after linear blending
(Game developers can provide own impementations of silhouette() method, for example: Median, Average, depending on derivative, how rapid depth changes, other...)

RenderTargetMerger:

Abstract Class.
Class merges data from MRT, preparing final output.

Most important abstract method is concatenate().

Class should support the usage of some already implemented PixelShaders and their concatenations, user defined application-dependant PixelShaders.

Method alfaBlending() that uses zShade() abstract method.

I will provide the implementation of overrides for zShade(), using:
-binaryDepthTestShade():
-softParticlesShade():

If a specified particle effect does not support transparency, we can use only zShade() without alfaBlending().

ResolutionMixer

It is class not mandatory to use. Game developer can define in the constructor of OffScreenParticles class whether to use it or not.

It provides edge detection method...
-detectEdges(): provides Laplace or Sobel edge detection matrix filter

...and second pass of depth acquisition with full resolution
-stencileEdgesPerticularisation(): fraction of pixels repeat the process without downsampling
(acquisition dependant on DepthAcquisitioner subclass, second pass of depth acquisition with full resolution)

Re: [GSoC 2012] Off-Screen Particles project

Posted: Fri Apr 20, 2012 6:20 pm
by Karol Badowski 1989
I have updated The proposal with initial class diagram proposition.

Does it need any changes?

Re: [GSoC 2012] Off-Screen Particles project

Posted: Mon Apr 23, 2012 9:32 pm
by Assaf Raman
Congratulation :D
I will be your mentor and help you out along the project.
We will make the design together before you start - so don't worry.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Mon Apr 23, 2012 10:33 pm
by scrawl
Cool project, and good luck!

Will it be possible to integrate this with other compositors that require depth render (SSAO, DoF etc)?

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed Apr 25, 2012 7:37 am
by Karol Badowski 1989
Thank You very much.

I will expand this initial project to fit expectations, so any requests & advices are very useful.
For now my class diagram is very initial, general idea and it will transform for sure.

1 - the more documentation I read, the more i know about OGRE components and how they can communicate - any links to interesting publications and tutorials are always appreciated
2 - requests from community give me a good clue what topics should I analyze


Till now I got advice to support:
  • - backward compatibility with user-written effects and compositors (possibility of choice whether "of-screen particles" feature is included), for example I should learn whether it could be a Compositor(/Chain)
    - if it would be a Compositor(/Chain) (still to determine), it should be possible to integrate it with other compositors

Soon, in the foot of first post, there will be a summary of requests that I will try to analyse, learn about, discuss with mentor and finally include in final project requirements specification.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed Apr 25, 2012 12:40 pm
by Assaf Raman
The project as I see it will be a new demo\sample in the sample browser at the first stage, later if we can move the relevant classes to the core if we like to.

See the guide here by Mattan and create a fork and such: http://www.ogre3d.org/forums/viewtopic. ... 60#p456560

Re: [GSoC 2012] Off-Screen Particles project

Posted: Thu Apr 26, 2012 3:18 pm
by spacegaier

Re: [GSoC 2012] Off-Screen Particles project

Posted: Fri Apr 27, 2012 8:14 am
by Karol Badowski 1989
I will create fork and follow tasks from the topic under the link above tonight (between Friday afternoon and Saturday morning).

EDIT:
Created fork:
https://bitbucket.org/KarolBadowski/ogr ... nparticles

It seems like I have done it yesterday... ok. I meant GMT+1 Daylight Saving Time.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sat Apr 28, 2012 10:20 am
by Karol Badowski 1989
Primary version of milestones and issues have been added to the repository fork.
I have set the configuration of access for OGRE developers, mentor and student (me).
Should there be any changes in configuration, please do not hesitate to inform me.

Right now I am going back to reading OGRE documentation & tutorials.
I have updated my GPU drivers this week, so today I'll also chceck if everything still compiles and runs ok.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sat Apr 28, 2012 11:45 am
by Assaf Raman
ok

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sun Apr 29, 2012 5:54 pm
by spacegaier
Hi Karol, I created an empty wiki page for your project:
http://www.ogre3d.org/tikiwiki/SoC2012+ ... evelopment

Please use that to present your project, keep some sort of change log / updates and draft versions of any sort of documentation needed for the community to keep track of your work and test it. Thanks!

PS: For ideas / examples compare the wiki pages of previous GSoC projects.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sun Apr 29, 2012 9:27 pm
by Karol Badowski 1989
Thanks to Assaf Raman, I have compiled code from the trunk again, succesfully (I had some new issues that did not show up 2 weeks ago) - everything is correct again.

I think I'll update wiki, starting with links to project description, original article and repository fork.
(EDIT: It will be edited, tagged and updated as soon as I read tutorial http://www.ogre3d.org/tikiwiki/Ogre+Wiki+Help)


Here is a little technical question, about GSoC:
Should I change the proposal in melange system (timeline, or underlining fact that from two proposed projects: Off-screen particles was chosen)?
There are also some forms to fill out similar to proposal form (perhaps for update).
Those are formal matters that will be important in the future during mid-term and final evaluation, but right now in melange GSoC system it is not precisely defined, that we will do just the Off-screen particles project. Maybe proposal should stay the same and this new form should be about everything that was decided after selection of project... I feel that it would be secure to ask just in case ;).
Also I do not know yet whether timeline could/should change after final actualisation of milestones (in case if promotor and student decide to change order of tasks and goals for more efficient work).

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sun Apr 29, 2012 9:39 pm
by Assaf Raman
The wiki page should include all the information about the project.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 4:32 pm
by Assaf Raman
I updated your signature - so when you post in the forum - the community will be able to identify you, please don't change your signature until the end of the project.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 4:35 pm
by Assaf Raman
Good work.
Can you add to the wiki a list of tasks for the project? Have the following columns - ID, Title, State (declared, active, done, canceled), Time estimate in hours (min and max hours estimate to complete the task), actual hours you worked on the task(add the hours every day at the end of the day to the tasks you worked on), IDs of other dependance tasks.
Try to order the list based on the order you think you will do the tasks.

This will be a good way for me to follow your progress.
At the end of every work day - post a small summary on this thread that will include what you did that day and what you have planed for the next day. If you need to take time off (weekend, party, exam, etc) - that is fine, but post about it - and when you are going to continue the work. If you have open issues, or need help - write it also there. The community and I will follow you and try to guide and help you as much as we can.

You can always contact me privately if needed, the reason for the daily public thread update is that this is the common way we update each other on projects progress in the community.

Is the task list idea and daily progress in the forum thread acceptable by you or you want do things in a different way?

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 9:25 pm
by Karol Badowski 1989
Regular reports are very good idea for effective work.
Generally because it helps AVOIDING this effect :) :
Image
At previous summer internship I've attended (it lasted 2 months), we had reports every week with number of hours spent each day on tasks, meetings and presentations of progress.
I still think it is for sure even better idea to do it more regularry.

My proposition is to report every 3 days till the end of university lessons and every day after that (I'll be able to concentrate 100% of focus on our project).

There is only one month of university lessons left in my country (mainly university team projects, some exams, seminaries, labratories etc.). This year we are finishing university lessons earlier than usual in Poland (thanks to Euro 2012) - that is good, because I will be able to report every day then.

Till now I have presented the general order of milestones and listed what tasks they consist of. However, I still have to prepare the detailed order of those detailed tasks.


For the next 3 weeks I will mainly read OGRE tutorials and documentation to prepare myself as good as I can - I really would appreciate community advices in that process to improve my effectiveness - so I'm going to report what I am reading or what tutorials am I doing (from writing simple examples, through modiffication of existing smoke particle system example for game developers, to modiffications on the level of core).

Training part should prefferably bring some progress to the actual project, so while learning I'll create a representative example that would allow observation of following tasks effects.
I.a. a scene with contrasting colours of background, particle effects, stable solid environment and moving solid objects) - we would like to observe very clearly the effectivenes of downsampling, halo effects, any artifacts that show up only when objects edges are in motion...

Next, the most interesting part will come - actual, direct implementation of the project.
a) Logical part (implementation of algorythms) is not a problem for me, It is even considered by me as enjoyable activity.
b) The most time consuming part is of course learning "what/where" in the field of communication with existing modules.

I will think about apriori estimation of hours I'm about to spend on each task. It will be just an estimation (especially in b) part). It will become easier every week to estimate it more accurately.

My proposition of a document that I can prepare soon is a graph of tasks that shows the order dependencies (which tasks have to be completed in sequence / paralelly).
Image

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 9:30 pm
by Assaf Raman
What happened to the signature I made for you?

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 9:35 pm
by Karol Badowski 1989
I do not know...
I haven't changed anything since 3 weeks ago.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 02, 2012 9:56 pm
by Assaf Raman
No worry, I will re add it.

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sun May 20, 2012 3:18 am
by ahmedismaiel
i added soft particles support to our game a few month back based on the paper you are working from.it is far from the sophisticated proposal in this thread but it works, hope it helps

Compositor:
https://github.com/stuntrally/stuntrall ... tparticles
Code:
https://github.com/stuntrally/stuntrall ... terial.cpp

sorry the screens are old ,they are a bit improved in the released version http://sourceforge.net/projects/stuntrally/files/1.6/
Regular Particles:
Image
Soft Particles:
Image

best of luck!

Re: [GSoC 2012] Off-Screen Particles project

Posted: Sun May 20, 2012 11:45 am
by Karol Badowski 1989
ahmedismaiel wrote:i added soft particles support to our game a few month back based on the paper you are working from.it is far from the sophisticated proposal in this thread but it works, hope it helps

Compositor:
https://github.com/stuntrally/stuntrall ... tparticles
Code:
https://github.com/stuntrally/stuntrall ... terial.cpp

sorry the screens are old ,they are a bit improved in the released version http://sourceforge.net/projects/stuntrally/files/1.6/
(...)
best of luck!
Thank You very much, ahmedismaiel.
That is really impressive and it helps me a lot.

I have to admit:
Your code is perfect: clear and easy to read even for a new OGRE developer like me.
I've red it like a book.

I am still reading OGRE developement tutorials a the moment and it was also a great tutorial for me.

EDIT:
Wow, your game has even Polish language version :).

Re: [GSoC 2012] Off-Screen Particles project

Posted: Tue May 22, 2012 7:05 pm
by Assaf Raman
Karol - can you give me a status update?

Re: [GSoC 2012] Off-Screen Particles project

Posted: Wed May 23, 2012 6:34 am
by Karol Badowski 1989
EDIT (i am sorry, i had another exam, there is still a little bit to add to the project before upload):
- I'll put here and on WIKI new diagram (it is the one I have mentioned previously).
- After exams I should finish a tutorial, which output will be an example scene with particle effect and meshes, that could be used as a representative example for tests.


University activities status:
I am having right now last week of niversity lessons before session (EDIT: right now it is session) (it is always the most sleepless time of the year), so there was huge amount of projects deadlines almost every day during last 2 weeks (3 exams, 3 projects and 4 presentations in previous week).
Tomorrow i have last of the university team projects deadlines (the hugest one: mass-spring simmulation of tissues in human breast model + parametrised realistic distribution of specified tissues + interaction with a virtual scalpel moved by microscribe + visualisation - this is a simmulation intended for surgeons who deal with breast crancer).


EDIT2:
4.06 is last day of exams session on my university (3 exams, 4 projects deadline)..

EDIT3:
Session on my second faculty finishes. I'm finally able to spend full time on the GSoC project.