Category: GSoC


Well, this is it, my last report for GSoC 2012:

 

What did you do this week?

I cleaned up the Pre Z code a bit more. For now I’m only doing the Pre Z for GLSL Materials since the goal is to minimize time spent on fragment shaders. However, this means that Multitexture and Singletexture are working again when the patch is applied. I also got custom vertex shaders partially working; the problem is I need to figure out how/when to switch back to the Pre Z vertex shader after using a custom one. I have also been playing with GPU PerfStudio and APITrace to try and get some more info about the GPU. So far, I don’t have any new optimizations that give any noticeable results, but I believe the bottleneck is still in the fragment shaders.

Tracker stats:

New: 0
Closed: 1 (1 by me)
Net Change: -1
Current: 153

For those that are interested, in total, I have closed around 65 bug reports as part of this year’s summer of code.

What do you plan to do next week?
Next Monday is the pencils down date, so I’ll start getting some patches ready to send off to code review.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

Advertisements

What did you do this week?

While I fixed a couple of bugs, I spent way more time on optimizing this week. I spent some time with AMD’s GPU PerfStudio 2 on an AMD card. After a lot of profiling and toying around, I found that fragment shaders were really slowing down the Necrosys map. I did some research and decided to try implementing a depth pre-pass/Pre-Z pass to reduce overdraw and the amount of time needed to process fragments by culling them with a depth test. For more information on early depth testing, there is this article from AMD, which I found very helpful. This yielded a 60% increase in the fps of the Necrosys map (going from about 63fps to about 104fps) on my system. I started a thread on Blender Artists to try and collect more data on how this optimization affects other scenes.

I also implemented display lists for shadows, but this gave no noticeable performance difference since the bottleneck was not in transferring vertices.

Tracker stats:

New: 4
Closed: 2 (2 by me)
Net Change: +2
Current: 154

What do you plan to do next week?
Next Monday is the “suggested ‘pencils down’ date,” but I don’t think it affects my project a whole lot this year since most of what I’m doing is cleaning and scrubbing. I have some more test files that I will take a look at for optimization. Maybe I can also look into closing enough reports to get back down to three pages in the tracker.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

Recently I’ve been profiling the BGE’s VBO code, and I’ve been rather disappointed with it. Even after some cleanup/optimization (including a nice speedup to skinned meshes and other frequently updating meshes), I could not get VBOs as fast as vertex arrays with display lists. I’ve also come to find out that Nvidia has a particularly nice display list compiler, which will make it difficult to get Nvidia cards running faster with VBOs than with display lists. I was, however, hoping to at least get ATI and Intel cards to run faster. However, on those two cards, VBOs are still running slower than vertex arrays alone (no display lists!). I might try to get more gains out of VBOs, but I think I might want to start looking elsewhere.

Taking a look at components, I got the branch to compile again and I improved reloading of components; they now update properties instead of recreating (meaning you don’t lose your settings). While looking at the code, I realized that it had some style issues, so I cleaned it up to better match what I could remember from Blender’s style guide (C-style comments in C code, K&R bracing for loops and ifs).

As for the bug tracker, I managed to close the following bugs this week:

  • Action actuator doesn’t finish playing if frame rate drops {fixed r49349}
  • BGE Vertex deformer optimized method does not work properly {fixed r49371}
  • Character physics type colliding with sensor type {fixed r49373}

I also fixed a couple of bugs that were reported to me outside of the tracker:

  • Performance regression with 2D Filters {fixed r49326}
  • Restrict Animation Updates option not framerate independent {fixed r49732}

Tracker stats:

New: 6
Closed: 3 (3 by me)
Net Change: +3
Current: 152

And we’re back to four pages. 😦

What do you plan to do next week?
More optimizing and bug fixing, with more of an emphasis on optimizing.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

I managed to finally get Nvidia Nsight and started profiling some OpenGL usage. I cleaned up some of the BGE’s OpenGL usage (eliminated some glGet and glIsEnabled calls), which got me a few fps in the Necrosys map. I’m hoping for more gains, but I’m still learning how to best use the tool. I also managed to speed up loading on Dalai’s project by using glGenerateMipmap() instead of gluBuild2DMipmaps() on hardware that supports glGenerateMipmap(). This greatly reduced the delay from when you could start hearing sounds to when you could start seeing the level.

In an effort to start getting things merged into trunk (if I’m lucky for 2.64), I’ve submitted a patch with only my changes to Swiss for code review.

Furthermore, I’ve finally gotten around to recreating the ge_components branch with my component code. I haven’t done much testing with it, but I’d like to start poking around and seeing what needs to be done.

I also managed to close the following bugs this week:

  • Incorrect physics for LibLoaded dupligroups {fixed r49237}
  • SubSurf in BGE suggestion {rejected}
  • Action Actuator in Loop End stops updating the Frame Property after no longer receives positive signal {fixed r49189}
  • Unable to modify KX_LightObject in BGE {fixed r49154}
  • light distance not adressable in GE GLSL mode {fixed r49154}
  • Overlay scene gets transparent when motion blur is enabled {r49128}

Tracker stats:

New: 6
Closed: 6 (6 by me)
Net Change: +0
Current: 149

What do you plan to do next week?
Hopefully I can start getting some reviews from the code review. I will continue trying to make the Necrosys map run faster and fix more bug reports.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

I started off this week looking at multi-uv bugs to see which ones are actually fixed in Swiss. I’ve verified that bugs #18146 and #17927 are fixed in Swiss. #20281 and #37775 should be solved after I get a bit of clarification on some Blender code.

There are also a couple of bugs about changing light values in realtime not having any graphical effect. These bugs were fixed in Cucumber, so I’m going to see if I can bring that code over to Swiss or trunk.

Other than bugs, I managed to get lib loaded materials to not compile their shaders twice. This gets rid of an error message when using the async option, and it offers a small speed up. I have also gotten my Swiss code into a working copy of trunk to start looking at the possibility of merging with trunk.

Now time for some tracker stats:

New: 3
Closed: 1 (1 by me)
Net Change: +2
Current: 149

What do you plan to do next week?
Once Nvidia get’s their developer site back up, I’d like to try some of their programs to profile the BGE’s OpenGL usage to try and get the Necrosys map to run better. I finally got Dalai’s files working, so I can also start trying to optimize for those. Overall, a scene change spends about two seconds on scene conversion; hopefully I can get it down to around one second or better.  I’ll also see about the possibility of merging some of my Swiss changes into trunk so the multi-uv bug reports can be closed.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

This week was a rather slow week for me as I was busy with other things and waiting on files. However, I’ve fixed some memory leaks in both trunk and Swiss that I found using the handy Visual Leak Detector. I also wrote up a Game Engine release log for the 2.64 test builds release, and I’ve been monitoring response to the release in this BA thread to try and find any regressions. So far, the only regression I’ve confirmed is one involving DDS/DXT textures and needing to flip the compressed textures. This regression (as well as the reason for the regression and possible fixes) is noted in the release log.

Of the bugs I fixed, one notable one was a regression (found prior to the 2.64 release) caused by the character physics type which made Radar and Near sensors collide with objects. I say this is notable, because I think it was one of the few (if not the only) 2.64 BGE regressions in the tracker. Hopefully this means 2.64 won’t break too many 2.63 games. Another bug worth mentioning is enable/disable rigid body not working with Bullet. Now that I’ve fixed this, I don’t think there are any old features (i.e., Sumo features) laying around that do not work with Bullet.

Now time for some tracker stats:

New: 4
Closed: 11 (8 by me)
Net Change: -7
Current: 147

And we are down to three pages in the tracker!

What do you plan to do next week?
I got a map from the Necrosys guys that they are letting me profile, so I’m going to see what I can do with that. So far, it loads about 30% faster in Swiss. Dalai also has a game/walkthrough for me to profile, but we’re having issues running it on Windows. Once those get resolved, I’ll also profile that.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

I finally implemented an interface to work with asynchronous lib loading. I settled on a future object that can register callbacks as mentioned in this post on my feedback thread. As for the tracker, I managed to close eleven reports, but five new ones came in. The good news is we are now only four reports away from finally getting back to three pages.

Tracker stats:

New: 5
Closed: 11 (11 by me)
Net Change: -6
Current: 154

4 more to go until we’re back down to three pages!

What do you plan to do next week?
I should be able to get the tracker under three pages this next week. As for what non-bug-hunting task I will work on, I think I will need to consult Dalai. I might work on an actuator for LibLoad, but with the Hive GSoC, it might be better to wait on adding any new logic bricks. I could start looking at cleaning up components, or look into more converter optimizations.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are going smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

I’m still awaiting more feedback on the LibLoad thread to figure out which direction I want to go on the interface to asynchronous LibLoad (callback or future object).

I did manage to get some speed ups in the converter for loading non-power-of-two textures by avoiding scaling the textures to powers of two if the hardware has NPOT support. Non-power-of-two textures took about four times as long to load than power-of-two textures, now the times are about equal. However, I haven’t yet committed the change since I haven’t decided if I want to put it in trunk or Swiss.

As for the tracker, with some help from Daniel, I managed to get all of the open bugs organized into the new categories. In the process, I also managed to close 18 bugs this week. One that might be of interest to people is:

[#23375] texture2D in custom 2D filters can get texture outside of game, resulting in ugliness

Essentially, this means you won’t be grabbing the Blender UI in 2D filters anymore.

Tracker stats:

New: 2
Closed: 18 (18 by me)
Net Change: -16
Current: 162

12 more to go until we’re back down to three pages!

What do you plan to do next week?
I would like to get down to three pages in the tracker, which will require me closing 12 more reports. I will also come to a decision this week on how I want async LibLoad to look and implement it.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are starting to go smoothly.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

I finally got some time to dig into the converter code, and I managed to get around a 35% speed improvement on scenes with lots of polygons. Here is the commit log:

Some refactoring of the Mesh conversion code to make things easier to read. Material conversions are now also cached so they do not have to be redone per face. This results in about a 35% improvement in conversion time in scenes with a lot of faces. I’m keeping the old mesh conversion code around as BL_ConvertMesh_old() for further benchmarking/comparisons. It will need to be removed prior to being merged into trunk.

As for the tracker:
[#28842] Ping Pong mode not working well in 2.60 + backcomp. problem (Fixed)
[#30410] not full conversion IPO Actuator in Action Actuator (Closed)
[#28831] Hitting P key to start GameEngine can crash blender (Not closed by me, but my prompting lead to it being closed)
[#31396] bge.logic.LibLoad fails to import text blocks (Fixed)
[#31792] Character Physics type not detected by near sensor (Fixed)
[#29037] logicbrick relation-lines dont get highlighted on mouseover (Closed/Already Fixed)
[#30726] Runtime memory leak (Rejected)
[#30558] bge.texture doesn’t work (no errors caught) (Closed/Already Fixed)

Tracker stats:
New: 2
Closed: 8 (7.5 by me)
Net Change: -6
Current: 178

What do you plan to do next week?
Based on the discussion of this BlenderArtists thread, I’d like to get the interface to the async LibLoading to work better. I also talked with Dalai, and we agreed that the BGE tracker could use new categories. I will get a list of potential new categories to the mailing list and work with Nathan to get the new categories in place. Then I’ll go through the tracker and get each bug into it’s appropriate category.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

Nope, things are starting to go smoothly now.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri

What did you do this week?

More of my time got eaten up this week than I had expected. As a result, I wasn’t able to get a large enough chunk of time to dig into the converter code. However, with what bits of time I did have, I continued to poke around in the tracker. I managed to close the following bugs:

  • [#30888] animation blending problem (Rejected/Possible Duplicate)
  • [#31813] bge.types.KX_RadarSensor incorrect attributes (Fixed)
  • [#31276] Action Actuator, Priorities higher than 1 break Playback (Fixed)
  • [#31468] Game Physics incorrect on Motion Rotation (Duplicate/Alread Fixed)
  • [#27472] preserve volume for armature modifier does not work (Fix with code found in the report)
  • [#31671] Keyboard Sensor blocks Quit Game Key Binding (Fixed with a patch from Jay Parker)

I also have a new fix for the issue involving LibLoad and text datablocks. I think it is a lot cleaner than my previous attempt, and I’m currently waiting on review/confirmation from Campbell before committing it.

Tracker stats:
New: 12
Closed: 7 (6 by me)
Net Change: +5
Current: 184

What do you plan to do next week?
I’ve wrapped up all my school obligations and the other stuff that was taking up my time. Therefor I will  be in the clear next week to do some serious catch-up work. I’ll try again to play with some converter optimizations I have in mind. I’ll probably also have the LibLoading text blocks bug resolved by my next report. There is a problem with pulse mode on the Action Actuator that seems to be generating a lot of bug reports, so I’d also like to get that fixed next week as well.

Are there any problems that will require extra attention and what impact will they have on your proposed schedule?

I cannot build Swiss at the moment, but I’ll talk to the other members of Swiss in the next couple of days to get that sorted out.

Are there any builds available?

There are some on GraphicAll.

Cheers,
Moguri