[GSoC 2012] Off-Screen Particles project - continuation
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I'm continuing the same task as yesterday.
I should finish that today/tonight.
In the evening I'll have a train travel back to Gdańsk.
I should finish that today/tonight.
In the evening I'll have a train travel back to Gdańsk.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
When I was in train, I finally achieved modification of shaders input texture (other that pure View from camera) from level of application (modified "penguin" material - it is granted to third miniscreen and to penguin - displaying solid objects texture).
We can see also "regained" transparency thanks to mentioned advices that I'd like to improve (from level of script).
Here is picture of working concatenation that I finally have achieved:
It is material that uses "texture_unit" to define input textures.
From the level of application, texture units names (adctually something different: names of textures of texture_units) are updated back to the same names, however it reloads the pointer to texture.
I'm trying to take a picture that shows ALL importand issues that were to be achieved/mentioned.
We can see also "regained" transparency thanks to mentioned advices that I'd like to improve (from level of script).
Here is picture of working concatenation that I finally have achieved:
It is material that uses "texture_unit" to define input textures.
From the level of application, texture units names (adctually something different: names of textures of texture_units) are updated back to the same names, however it reloads the pointer to texture.
I'm trying to take a picture that shows ALL importand issues that were to be achieved/mentioned.
Last edited by Karol Badowski 1989 on Sat Jul 14, 2012 12:20 am, edited 2 times in total.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
Screenshot below presents all topics mentioned during last two days, about transparancy (proof - look at penguins feet. There also halo effects and sharp edges visible + taking a fraction of background color into particles colour (visilbe especially on penguin's jet flame edges that seem to be grey - i did not write it on picture, but it is noticeable).
What am I going to do tomorrow?
Strp by step replace modifications from level of application with my own compositors (that should prevent execution of unneeded calculations and fix the transparency issue).
There is a question:
Alternative way of work for tomorrow could be Sobel filter for preparing stencil map. What would You like to see first?
What am I going to do tomorrow?
Strp by step replace modifications from level of application with my own compositors (that should prevent execution of unneeded calculations and fix the transparency issue).
There is a question:
Alternative way of work for tomorrow could be Sobel filter for preparing stencil map. What would You like to see first?
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I'd like to make repository revision instantly.
At the moment I am going out, before students club is closed.
I'll look for that thing I lost last friday - perhaps I put it on a chair there.
When I come back in an hour or 2, I'll do next revision to repository (there is rather high amount of changes since last time - in compositors and in *.cpp file).
At the moment I am going out, before students club is closed.
I'll look for that thing I lost last friday - perhaps I put it on a chair there.
When I come back in an hour or 2, I'll do next revision to repository (there is rather high amount of changes since last time - in compositors and in *.cpp file).
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
A working compositor.Karol Badowski 1989 wrote: Alternative way of work for tomorrow could be Sobel filter for preparing stencil map. What would You like to see first?
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
Since 15:00 to 18:00 I'll be taking part in a charity event organised by students community on my university.
We are organising a trip for students who come to Poland on their abroad apprenticeship from other countries, showing them historical places.
Today I'll work in the evening and night. I am going to continue conversion of current commands from application level into a compositor chain.
We are organising a trip for students who come to Poland on their abroad apprenticeship from other countries, showing them historical places.
Today I'll work in the evening and night. I am going to continue conversion of current commands from application level into a compositor chain.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
OK. If you have any issue - post them here, it shouldn't be complicated.
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
Tonight I'll continue writing compositor.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
Can you post a status when you finish working today?
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I am still looking for a tricky bug in my previous compositor code from 8'th of July (I am comparing current version with last working one from repository to spot the difference) - I should find it soon.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
Today I am still continuing conversion to compositor with listeners.
Right now I use chain of compositors. Yesterday I managed to fix mentioned bug and make them run again (downsampling seems to run right way now).
Before final compositor is ready, I'll check depth testing (and soft particles) with solid objects set to unvisible and I'll use prepared constant depth map for tests.
Particles are textures faced to camera, so I think that best depth map to observe results is one that goes from maximum to minimum depth from left to right (for normalised float depth it would be 1.0f to 0.0f). It will give right amount of intersections.
When view swiches from visible solid to visible particles... I wonder if "scene_depth_range" changes. If it does, than I'll have to go back to "near_clip_distance" && "far_clip_distance" version.
Right now I use chain of compositors. Yesterday I managed to fix mentioned bug and make them run again (downsampling seems to run right way now).
Before final compositor is ready, I'll check depth testing (and soft particles) with solid objects set to unvisible and I'll use prepared constant depth map for tests.
Particles are textures faced to camera, so I think that best depth map to observe results is one that goes from maximum to minimum depth from left to right (for normalised float depth it would be 1.0f to 0.0f). It will give right amount of intersections.
When view swiches from visible solid to visible particles... I wonder if "scene_depth_range" changes. If it does, than I'll have to go back to "near_clip_distance" && "far_clip_distance" version.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
This is a screenshot from 8x8 downsampling:
This is debug view of downsampling of depth texture (it is only one channel, but debug compositor rewrites it to other channels).
In maximum of Depth technique, depth of multiple samples is compared - one thread achieves sample even from every pixel on a field it covers (it is not parallel) - it is still a better idea to take constant amount of samples (4 or 9 in one field).
However, an alternative extension for future is to drop from universal (squares/rectangles in two loops - for both dimensions) max of depth search and execute more parallel version with powers of 2 pixels in width and heigth of one sample (multiple executions of 2x2 downsampling shader can give us better - logarythmic - time) - in each of log4(x) iterations taking maximum value from 4 pixels.
This display shows debug of 8x8 downsample (in that debug I've been checking validity, but also the framerate change depending on how many samples I take to find maximum in an iteration - here it is 16 samples, each taken by operation "depthAtOffset = tex2D(depthTexture, offset).r" at different offsets).
What we see is normalised difference between maximum and minimum depth on one square (looks simmilar to Sobel filter, but it is something simpler).
For now I will leave adjustable amount of samples compared by one processing unit (but set to constant value) and come back again to converting the compositor.
This is debug view of downsampling of depth texture (it is only one channel, but debug compositor rewrites it to other channels).
In maximum of Depth technique, depth of multiple samples is compared - one thread achieves sample even from every pixel on a field it covers (it is not parallel) - it is still a better idea to take constant amount of samples (4 or 9 in one field).
However, an alternative extension for future is to drop from universal (squares/rectangles in two loops - for both dimensions) max of depth search and execute more parallel version with powers of 2 pixels in width and heigth of one sample (multiple executions of 2x2 downsampling shader can give us better - logarythmic - time) - in each of log4(x) iterations taking maximum value from 4 pixels.
This display shows debug of 8x8 downsample (in that debug I've been checking validity, but also the framerate change depending on how many samples I take to find maximum in an iteration - here it is 16 samples, each taken by operation "depthAtOffset = tex2D(depthTexture, offset).r" at different offsets).
What we see is normalised difference between maximum and minimum depth on one square (looks simmilar to Sobel filter, but it is something simpler).
For now I will leave adjustable amount of samples compared by one processing unit (but set to constant value) and come back again to converting the compositor.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I'm continuing work on compositor, but today I have to take a day off to prepare an actualisation of presentation for "WGK" game developement conference in Poland.
I got to know that proffesor from my university has sent a shortcut of documentation to physics engine that was created by me and my friend - it appears that it was initially accepted for game developement conference and that we have to prepare and send the actualisation of that presentation today.
Tomorrow I am comming back.
I got to know that proffesor from my university has sent a shortcut of documentation to physics engine that was created by me and my friend - it appears that it was initially accepted for game developement conference and that we have to prepare and send the actualisation of that presentation today.
Tomorrow I am comming back.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
What have you completed since your last update?
As you remember - we require daily updates...
As you remember - we require daily updates...
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
update us...
Watch out for my OGRE related tweets here.
-
- OGRE Retired Team Member
- Posts: 972
- Joined: Mon Jun 02, 2008 6:52 pm
- Location: Berlin
- x 65
Re: [GSoC 2012] Off-Screen Particles project
Karol must be one of the most busy persons I've ever "seen"
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I am still continuing conversion to compositor.
I've been trying to make selective rendering working these days (in the compositor version) - I still haven't finished it.
I'm sorry for lack of update on that recently (I thought several times that I'll finally post message "I finally finished selective rendering with use of compositor listeners" any hour).
I came back to figuring out again how is it done in Deferred shading and doing tests on simpler examples to find what is wrong there.
There were more tests and learning than progress.
In the morning I'll post update if I finally managed to achieve that tonight.
I should figure it out finally very soon (I think I'm very close to it).
I need that step to be finished so I could apply my version of joining particles and solid objects texture and check if alpha blending runs correctly (it is supposed to eliminate transparency problem of dark particle effects that was in the "application level" version - result will be visible only on joined textures).
When I achieve it, next step in chronological way are:
-applying alpha blending shader and testing if it works correctly (compositor version of what was done on application level will be finished on that level)
-modification ob binary depth test to soft particles
-run tests of MRT and two pass version.
MIXED RESOLUTION RENDERING:
-applying Sobel filter on particles texture to create mask for stenciling
-learn how stenciling is done in OGRE and apply it to second rendering pass with full resolution.
I've been trying to make selective rendering working these days (in the compositor version) - I still haven't finished it.
I'm sorry for lack of update on that recently (I thought several times that I'll finally post message "I finally finished selective rendering with use of compositor listeners" any hour).
I came back to figuring out again how is it done in Deferred shading and doing tests on simpler examples to find what is wrong there.
There were more tests and learning than progress.
In the morning I'll post update if I finally managed to achieve that tonight.
I should figure it out finally very soon (I think I'm very close to it).
I need that step to be finished so I could apply my version of joining particles and solid objects texture and check if alpha blending runs correctly (it is supposed to eliminate transparency problem of dark particle effects that was in the "application level" version - result will be visible only on joined textures).
When I achieve it, next step in chronological way are:
-applying alpha blending shader and testing if it works correctly (compositor version of what was done on application level will be finished on that level)
-modification ob binary depth test to soft particles
-run tests of MRT and two pass version.
MIXED RESOLUTION RENDERING:
-applying Sobel filter on particles texture to create mask for stenciling
-learn how stenciling is done in OGRE and apply it to second rendering pass with full resolution.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
OK, keep us updated every day, what you have done and what is the plan for the next day.
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I'm still doing selective rendering.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
What do you do there? Can you give out more details?
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I have divided targets to separate RenderQueueGroupID - it is easy to control order of their rendering now and control to which range of ID's each pass is applied.
I still give objects the material that has a defined pass which uses vertex program (that achieves depth information) and fragment program (that saves it into a texture).
In application version we used separate render passes to create colour texture (based on objects original material) and to create depth buffer.
Here I'm trying to modify original material (I want to preserve original way of achieving colour texture, because it could be different in any material and use various sources and various ways to achieve final result).
Is it a good way to create list of objects, iterate them all and for each add an additional pass that would save previous output to a texture and then calculate depth, saving it to additional texture?
Or is it better to try finding univerrsal way to achieve original sources and pass them to a shader that would calculate colour and depth in one pass?
I still give objects the material that has a defined pass which uses vertex program (that achieves depth information) and fragment program (that saves it into a texture).
In application version we used separate render passes to create colour texture (based on objects original material) and to create depth buffer.
Here I'm trying to modify original material (I want to preserve original way of achieving colour texture, because it could be different in any material and use various sources and various ways to achieve final result).
Is it a good way to create list of objects, iterate them all and for each add an additional pass that would save previous output to a texture and then calculate depth, saving it to additional texture?
Or is it better to try finding univerrsal way to achieve original sources and pass them to a shader that would calculate colour and depth in one pass?
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
Is all the code in the repo?
Watch out for my OGRE related tweets here.
-
- Google Summer of Code Student
- Posts: 185
- Joined: Fri Apr 06, 2012 3:04 pm
- x 18
Re: [GSoC 2012] Off-Screen Particles project
I'll upload it in 2 hours (I'll do some changes in it).
EDIT: (16:30, GMT+1)
I'll upload code this evening, I need to make few changes so it is less complicated.
Generally my question was about best tactic to inherit all properties of materials (to provide the same final colour of texture, no matter how complicated that material was, whether it used bump-mapping or not, etcetera) + run own additional shaders.
(Is it better to modify original materials of all objects and give another pass to each materials technique, or is it better to use some other tactic that would let us minimize number of passes).
EDIT: (16:30, GMT+1)
I'll upload code this evening, I need to make few changes so it is less complicated.
Generally my question was about best tactic to inherit all properties of materials (to provide the same final colour of texture, no matter how complicated that material was, whether it used bump-mapping or not, etcetera) + run own additional shaders.
(Is it better to modify original materials of all objects and give another pass to each materials technique, or is it better to use some other tactic that would let us minimize number of passes).
Last edited by Karol Badowski 1989 on Fri Jul 27, 2012 3:44 pm, edited 4 times in total.
Google Summer of Code 2012 Student
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Topic: "Implementation of Off-Screen Particles"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Off-Screen Particles project
Also post in more detail on the issues you are having? I am not sure how to help...
Watch out for my OGRE related tweets here.