Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Lights branch - half time!
- - By Newton [de] Date 2014-11-24 21:35 Edited 2014-12-21 11:28
I believe we have passed half-time of the project to reactivate development and finally merge the lights branch back to master. Let's take a break and reflect on what we have done so far since the lights branch has been reactivated.

What we achieved so far


* We untangled, documented and modernized the code, bringing it much closer to our coding guidelines and readability
* We refactored and simplified the code towards the usage of standard libraries and modern software architecture
* We solved all initially known major issues and most minor issues
* We solved most issues that surfaced during the refactoring phase
* We added light shading for mesh objects, sprite objects and PXS
* We added a smart solution for ambient lighting and adjusted it to work well together with the raytraced lighting
* We introduced shader slicing, making the shader coding more modular and having no code duplication in shader code
* We improved the raytraced lighting algorithm a bit

From the original plan, we completed step one and it looks like we are nearly done with step two and three. As always, the tasks grew of course - more bugs were found and the implementation for step 3 turned out to be more sophisticated that originally planned. But that's cool! I was mainly striving for the minimal solution because I did not count on people from the community to join this effort.

I am very glad the project turned out to be such a success. Most credit really goes to Clonk-Karl here, it is absolutely breathtaking to see at what speed and quality he tackled the remaining missing implementations. I claim that if he hadn't joined the effort, the project would have failed. Also, I was positively surprised that PeterW was so available to explain certain sections of his old code and published a documentation of his algorithms in the forum. Even more I am thrilled to see that we could even reactivate him to work with us on this project.
Finally, I am happy for PeterW to see it is within reach that his work finally sees the light of the day (a public release). And that not at all in the minimal solution I was imagining but in terms of the common sliced shader exactly how he envisioned it. (Well, he pushed it as well.)

But we are not done yet. So here is what is left to do until we can go master!

What must still be done before the merge


* Finish work on shader slices
* Add shading for particle rendering
* Issue #11, Issue #13

Doesn't look much. But we all know, that the last 10% of something take 90% of the time. New issues are sure to pop up.

And this really has time until after the merge


* Issues #4, #10, #12, #15
* Add a color for ambient light / replace SetGamma with shader code or ambient light color
* Colored light sources
* play around with fadeout and resolution of the ambient light map
* add glowing materials
* add normal maps for material textures using CrazyBump or similar
* "advertise" the new feature with videos and on the blog
Parent - - By Maikel Date 2014-11-25 09:28
It is indeed a pleasure to see the progress on this branch! I am not sure agree with the point at which to merge though. Please be reminded of the fact that on master the game should be in a playable state, especially the snapshots are often used to test new scenarios and objects. So before a merge I would insist on play testing a bit and see whether some of the scenarios are actually playable. Is there a reason why you want to merge as soon as possible?
Parent - - By Newton [de] Date 2014-11-25 12:34 Edited 2014-11-25 12:37
In my experience with the OpenClonk project, it is always better to bring it to the players as quickly as possible. Otherwise, there is the danger that the branch gets deserted for the lack of feedback. There must be a definition of done, an end within reach of every project, otherwise the motivation will go down quickly.
Also, there are issues that will only surface if there is a greater amount of people working and playing with it - such as graphics card specific problems.

Those people who try out the snapshots know what they get and I would even say they expect to see the newest development in those. So you read about those cool new lighting possibilites? You want to try them out! That is what the snapshots are for, nobody expects them to be stable. And one intention of having them is to broaden the spectrum of people who do betatest of new features for us.

For me, the requirement for a merge to master is that it is done in the sense that no part of the system is yet to be implemented and there are no major known issues left.
But I respect if you have higher standards. Would you like to take the role to preside over when the lights branch is ready to merge? So you can test whether your requirements are met and report if there are any more things that should block the merge.
Parent - By Sven2 Date 2014-11-25 12:53
I'd also vote for an early merge. The screenshots have been very teasing so far and I don't see any development in master that would be hindered by some graphics issues in the lights branch.
Parent - By Matthias [de] Date 2014-11-25 13:15 Edited 2014-11-25 13:44
.
Reply
Parent - By Maikel Date 2014-11-25 13:55
I think we should organize and test one or two rounds when the branch is merge ready. The least would be an option to disable it which is already a feature request. That would also be okay, if I need a fully visible scenario I can just turn off lights. What about the lightning in the global viewport and map screenshots btw?

Apart from this issue I agree that it is vital to get feedback as soon as possible, but if it turns out that scenarios are unplayable (because it might be too dark) you won't get any good feedback from snapshot players.
Parent - - By Marky [de] Date 2014-11-25 10:03
What does the light look like on sprite objects?
Parent - By Clonk-Karl [us] Date 2014-11-25 14:25
For standard sprites it's like all normals are directed toward the screen. However, you can have a normal map with the same dimensions as the Graphics.png, and then the normals are taken from there. I think this still needs to go into the documentation. Here is a screenshot from an earlier development state (note the firestone has a normal map and the loam doesn't). I plan to create normal maps for all resource objects with sprites.
Reply
Parent - By Clonkonaut [de] Date 2014-11-25 11:53
Great work!
Reply
Parent - By Clonk-Karl [us] Date 2014-11-25 17:47

> all the praise for PeterW and myself


Well, let's not forget yourself here, you kickstarted the whole process! :) It's really useful to have someone who has an overview of what needs to get done and gets some structure into a project like this. Much appreciated.

> * Add shading for particle rendering


Done!
Reply
Parent - - By Maikel Date 2014-11-26 19:10
What did you have in mind for the video? I think a cool video might be 4 players finding their way through the now dark Maze scenario and all players can then be shown split screen in a video (with speedup).
Parent - - By Sven2 Date 2014-11-26 20:46
I don't think Maze is a good setting, because there's so little player interaction and the map is rather uniform.

I think it should be a landscape that has narrow caves, overground and underground areas, things like an underground lava lake and ideally another light source like e.g. a burning fire or another player walking in the cave.

Volcano Escape EXTREME could work, but might need a few more large caves.
Parent - By Newton [de] Date 2014-12-07 00:29
I once made a small overhaul regarding the  creation of the tunnels. It should look more dynamic now.
Does the bug that player 1? sprays earth still exist?
Parent - - By Maikel Date 2014-11-26 21:30
The global viewport in the editor mode should not have shadows imo.
Parent - By PeterW [de] Date 2014-11-27 12:51
We probably don't want to completely disable it - then we wouldn't have normal mapping either. Maybe we should use a special shader variant where the minimal darkness level is 50%?
Parent - By Sven2 Date 2014-11-27 12:58
It would be helpful if there were light objects you can move in the global viewport (to test how far you can see in adventures, etc.).
Parent - By Marky [de] Date 2014-11-27 13:08
Also, we should have an option to turn off lights/shadows for specific scenarios: http://bugs.openclonk.org/view.php?id=1178
Parent - By Clonk-Karl [us] Date 2014-12-14 17:22

> Finish work on shader slices


I have started to also turn the mesh rendering to the shader slices, but as far as I am concerned this would not have to block merging lights into master.

> Issue #13


I think Sven's latest commits in master fix this issue.

I think what we really need to do before the merge would be to do some playtesting of some rounds, to see how the lights system feels in real (melee and cooperative) gameplay. Maybe we can try to organize something over the holidays. I can provide snapshots of the current lights branch for that.
Reply
Parent - - By Sven2 [de] Date 2014-12-14 18:14
Since the issues are going into the double digits now, maybe they should go into the bug tracker?
Parent - By Newton [de] Date 2014-12-15 00:05
As long as this is not in master, I'd like to keep them here for better overview.
Parent - By Clonk-Karl [de] Date 2014-12-22 23:10

> Finish work on shader slices


I have now changed all our shader code (Landscape, Particles, Sprites, Meshes) to use C4Shader and the shader slice system. I would suppose that's good enough for a merge, also if PeterW has some more plans for this system.

I'll now concentrate on the bugs in the bugtracker concerning the lights branch and the "GL error 1282" spamming.
Reply
Up Topic Development / Developer's Corner / Lights branch - half time!

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill