From BlenderWiki

Jump to: navigation, search

Weekly Reports

Week 17 - 17 Mar 2017

Worked on getting cloth code ready for the more tricky henchman simulations. So cloth should now be ready for all the sims. Besides that, ran tests on the more complicated simulations and they seem quite promising.

Cloth

  • Finished support for external basemesh object.
  • Implement animated cloth velocity initialization.
  • Ported Weight Keys to the cloth branch.
  • Implemented scaling for the rest planarity property.
  • Fixed critical collisions issues.
  • Implemented collision impulse clipping (improves complex collision stability).
  • Implemented instability detection and time step compensation.
  • Merged master into cloth (to get SDef and cloth in the same build).

Next Week

Next week will be a bit crazy with life stuff. But the plan is to get the cloth workflow all figured out together with the studio pipeline. And put whatever final touches become necessary in the cloth engine.

Week 16 - 10 Mar 2017

Worked on OpenGL again, but will now be focusing on getting cloth totally ready. I spent one day figuring out the best way to get cloth working well with the linked object workflow and running test simulations with the new henchman animations. Besides that, I'm working on implementing the last few cloth features necessary for the agent project.

Cloth Proposal

  • Implemented usage of object coordinates for SDef (355ad008a26f)
  • Mostly got external cloth basemesh object working (still chasing a weird bug).

OpenGL immediate mode

Next Week

Hopefully finish my list of cloth features for the agent project, and properly get the cloth simulation workflow going with the folks at BI.

Week 15 - 03 Mar 2017

Didn't work on imm conversions this week, as it turns out that all remaining files are already assigned. Now I'll wait to help out with the matrix conversions. Main work this week was implementing a brand new collision detection function, which actually ended up having me chase a sneaky bug for far too much time, though it worked out great in the end :)

Cloth Proposal

  • Committed SDef to master (yay!) (4fa4132e45c9).
  • Fixed little bugs in SDef (856077618a9d and 2089a17f7e69).
  • Started implementing object transformation for SDef bind today, but it got late...
  • Finished and submitted diff for animated cloth pins (D2535).
  • Implemented a new collision detection function (0607cd2e15cc) (this makes cloth collision pretty much awesome, and removes the Bullet dependency, hurray! :)

Next Week

Finish the SDef object transform thing, and I also want to implement scaling for the cloth planarity property, both of which should be quick. Will also start working on ogl matrix conversions as soon as that stuff is ready. Depending on the other stuff, I might finally start to work on the exciting cloth mass distribution!

Week 14 - 24 Feb 2017

Usual ogl stuff, and a little bit more of development and experimentation with cloth collision. Also did a little review.

Cloth Proposal

  • Minor update to SDef (D2462).
  • Partial implementation of the new tri/tri collision function.
  • Experimented with better collision convergence.

OpenGL immediate mode

Reviews

  • D2389: Add "Gravitation" option to "Force" type force fields (committed: 4c164487bc15)

Next Week

Usual stuff... Ogl conversions, finish cloth tri/tri collision...

Week 13 - 17 Feb 2017

This was the last week working full time on Blender, until April, while in the meantime I'll be working only part time. This week I did a good bit of gl conversions, updated several patches, and did some cloth refactoring and bug fixing. I also implemented cloth pin support for the new animatable combined vertex group feature. Lastly, did some more experimentation with collision response convergence, and bending derivs, but don't have anything concrete yet.

Cloth Proposal

  • Minor bug fix.
  • Refactored cloth pins and some general spring cleanup (D2514).
  • Updated weight keys (animation support) (D2407).
  • Implemented cloth pin support for "weight keys" (patch soon).
  • Little updates to SDef (D2462).

OpenGL immediate mode

Next Week

More imm stuff. Probably implement the new tri/tri collision detection function. And maybe some other little stuff. Also, hopefully will get henchman animations to do more cloth tests? :)

Week 12 - 10 Feb 2017

This was kind of a bad week, as I found many issues that delayed/hindered my work. I tried to implement render DM handling for SDef, to no avail. And also encountered issues regarding animation, with the RNA stuff in the Weight Keys implementation. However, I made some progress with the GL conversion. And only today I got to mess around with my bending derivatives idea, which I think seems reasonably promising so far :)

OpenGL immediate mode

Next Week

Other than the usual stuff, SDef will probably be getting into master this week, for broader testing. I want to fix the issues with Weight Keys. Finish the bending deriv idea. And if I find no major roadblocks like last week, I might be able to mess a bit with some other exciting stuff too, but let's see...

Week 11 - 03 Feb 2017

This week I tried to really make a leap forwards with the collision system. I also focused on fixing some obvious performance issues, which I had actually started doing last week. This made simulation times go down by 20-40% in relation to the code before the optimizations, and made simulations about 3 times faster in relation to the simulator currently shipped with Blender. And as a bonus, also implemented adaptive time steps, which can bring simulation times down even further. Besides the exciting cloth stuff :) I also did more ogl imm conversions... Oh, and I managed to get one new cloth demo out (more to come over the weekend... probably).

Cloth Proposal

  • Cloth improvements (cloth-improvements branch):
    • Implemented a simple inertial solver to replace the full implicit pass before collision detection (this can cut simulation time nearly in half, and also makes collisions much more reliable and stable).
    • Implemented proper directional cluster based impulse pruning (improves multi-collision handling stability).
    • Implemented simultaneous multi-object collision handling, to replace the sequential system that was in place.
    • Implemented velocity and collision impulse based adaptive time step calculation (changes step size depending on cloth velocity and collision impact).
    • Also a bunch of other minor optimizations/improvements.

OpenGL immediate mode

  • Updated and committed stuff from last week.
  • space_graph.c 57ac20d5b72c
  • transform_snap.c and part of drawnode.c 47b21dd4c676
  • Did most of uvedit_draw.c

Next Week

Besides the usual cloth tests... ogl conversions... that sort of stuff... I want to experiment with an idea I had for approximated bending derivatives, that might just be the key to lowering the needed sub-steps when using high bending stiffness, without having to implement a new asymmetric-capable solver.

Week 10 - 27 Jan 2017

Updated the SDef patch. Converted a few files to the new imm mode ogl thingy... Other than that, I did some more minor improvements to the cloth collisions (which actually led me to find bigger issues :\), and experimented a bit with hair collisions. I also did some preliminary tests with replacing the pre-collision solver pass with a "fake solve" (i.e. reusing velocities from previous step), which doesn't seem to hinder the collisions, and should give about a 20-40% reduction in overall simulation time whenever collisions are used.

Cloth Proposal

  • Cloth improvements (cloth-improvements branch):
    • A bit more collision response stuff...
    • Started experimenting with hair collisions (video. Note that the jitter seen in that test has since been eliminated, new video coming soon).
    • Started experimenting with collision detection without the full implicit pre-collision solver pass (20-40% performance improvement, but needs more testing).
  • Surface Deform Modifier (surface-deform-modifier branch):

OpenGL immediate mode

Next Week

Will finish testing the collisions without the pre-solve, to see if it is indeed feasible. Will try to make time to implement cluster based collision impulse pruning (newly found pressing issue). I will likely help out a bit more with the ogl stuff. And I think I will finally be able to stop pushing this to the next week, and actually make new simulation demos.

Week 9 - 20 Jan 2017

Focused very much on collisions this week, to get the cloth code ready for the henchman simulations. While there is still a bit of room for improvement, collisions are now at a state where they are quite robust and stable, and definitely more than good enough for the henchman stuff (first collision video, more to come soon...). Other than that, I've worked a bit on getting hair to play nicely with the new physical model, as I had completely ignored that before, and also, review of SDef has started, so I've started working a little bit on getting an updated patch out next week.

Cloth Proposal

  • Cloth improvements (cloth-improvements branch):
    • Corrected all issues in the collision response:
      • Drastically improved collision responsiveness/robustness, now requiring far fewer subframes to get a reliable response.
      • Made collisions completely inelastic (wrong calculations were causing undesired collision elasticity).
      • Further improved resting stability.
    • Implemented normal based collisions, which enable collision recovery after penetration of the collision object.
    • Implemented a completely new self collision system, which is much more integrated with the object collision system, thus giving consistent and stable results.
    • Did a lot of collision code cleanup (among other things, reduced memory usage for contact points to 1/4).
    • Redesigned the collision UI, to be in line with the new system.
    • Started working on getting hair to work well with the new mass spring model (not much to do here actually).
  • Surface Deform Modifier (surface-deform-modifier branch):
    • Started review process...

Bug fixes

Still pending review on some earlier fixes...

Fixed: 0; Closed: 1;

Next Week

The plan is to put some little finishing touches on the collision stuff, get hair totally up to speed with the new physical model, and update the SDef patch. I'll also be helping out a bit with the openGL taskforce, and will do more cloth tests (potentially even new henchman simulations).


Week 8 - 13 Jan 2017

I have written the user documentation for SDef, and have submitted a diff for review. I have also already started actually merging some library additions/changes required by SDef. Other than that, I have continued working on cloth, tackling some little issues, and started to make improvements to collisions. I have also fixed a few bugs from the tracker, but they are not listed below, as they are pending review.

Cloth Proposal

  • Cloth improvements (cloth-improvements branch):
    • Improved the cloth caching logic, fixing a few existing issues, and a few that are related to new cloth additions.
    • Made some improvements to collision response, fixing an issue that made cloth move faster when colliding, and slightly improving resting contact stability (at the cost of slightly more sub-steps).
  • Surface Deform Modifier (surface-deform-modifier branch):


Next Week

I'll continue working on collisions, mostly collision detection stuff this week I think. Other than that, I have some stuff to fix/update on SDef. And I'll also do the simulation demos which I didn't end up being able to do this week.

Week 7 - 06 Jan 2017

Development has picked up nicely again. I managed to finish the SDef interpolation rewrite, which is now pushed to the Blender repo, and ready for testing. But the bulk of my work this week has been on getting cloth ready for prime-time, and it is now also probably at a good state for some serious testing, as I have basically wrapped up all the work on cloth dynamics and UI. Other than that, I have started to pick up some bug work again, and also started to look more deeply into the cloth collision code.

Cloth Proposal

  • Cloth improvements (cloth-improvements branch):
    • Implemented a mathematically correct time-based plasticity model.
    • Added angular bending support for dynamic mesh.
    • Refactored/optimized spring management, which has resulted much more manageable code, and a nice 40-50% reduction in memory usage for spring storage.
    • Implemented a new "rest planarity" feature, which allows one to control how flat the cloth should tend to be, despite of how deformed the original model might be.
    • Implemented the UI design proposal from T49145, adapting it for all the new features/changes added since then.
    • Made several smallish fixes and some little code cleanup stuff.
  • Surface Deform Modifier (surface-deform-modifier branch):
    • Finished interpolation, which has now been pushed to Blender repo, and is ready for testing.
  • Did some more minor fixes and additions to the math library (in my branches).

Bug fixes

Fixed: 0; Closed: 2;

Next Week

I guess it is onto collisions now... And the usual bug stuff. I might also do some more cloth demos (bending, plasticity...)

Week 6 - 30 Dec 2016

Slow week again, because apparently there's some kind of holiday stuff... hehe. I did however finish tweaking the SDef interpolation algorithm, which though not perfect, is probably in the best state it can get with the 3d proximity bind method (interpolation should be better with the 2d UV projection based bind, once I implement it...). I'm also about midway through the SDef rewrite now.

Cloth Proposal

Next Week

Still pretty much the same stuff from last week...

Week 5 - 23 Dec 2016

This week I spent a lot of time with test simulations, so it was a bit slow code-wise, however, luckily I won't need to do many test sims in the coming weeks, so I can focus on coding. Though I was still able to get a first implementation of SDef interpolation working, and am now doing some final tweaks to the algorithm and the smoothing functions.

Cloth Proposal

  • Surface Deform Modifier (surface-deform-modifier branch):
    • Got an initial implementation of Surface Deform interpolation in place (not yet pushed to Blender repo).
  • Added some more new functions to the math lib (not yet committed).
  • Updated the "Weight Keys" patch, fixing some issues (D2407).

Reviews

  • D2389: Force Field power falloff function not accurate

Fixed: 0; Closed: 0; Reviewed: 1;

Next Week

Coding should be back on track next week. I'll rewrite the SDef interpolation code (or at least start to). I found some minor issues in my cloth code, so I'll fix those, and try to start submitting patches for inclusion in master, for whatever changes keep compatibility. Other than that, I think weight keys are now ready for master, so I'll commit that whenever I get green light, and then will implement that functionality for cloth pinning.

Week 4 - 16 Dec 2016

This week I focused my work much more on the SDef interpolation. I discovered that the interpolation algorithm I had previously come up with was not totally satisfactory, so most of my time was used developing a new improved algorithm. Other than that, I continued work on cloth, and some bug tracker stuff. Also did some new cloth sim tests, now that plasticity is implemented.

Cloth Proposal

Bug fixes

  • T50216: Using Weight trasfer from an object without faces crash blender

Reviews

  • D2389: Force Field power falloff function not accurate

Fixed: 1; Closed: 4; Reviewed: 1;

Next week

I think I'm finally going to be able to finish the SDef interpolation, as I don't expect any more major algorithm changes at this point. I'll also try to get weight keys merged, so I can implement that for cloth pinning. Other than that, I might start looking at collisions, as those are really a high priority, and are at this point the main issue stopping cloth from being "production ready".

Week 3 - 09 Dec 2016

This week I mostly worked on the mass-spring model, but also implemented the proposed "Weight Keys", and started the actual work on SDef interpolation. I also did some new cloth sim tests and a bit of profiling, and experimented a bit with multi-threading spring force and derivative calculations, but discovered that it wouldn't be quite so easily achievable with the current data structure, though it is not totally off the table.

Cloth Proposal

  • Mass-spring model (cloth-improvements branch):
    • Implemented angular bending spring and damping forces (No derivatives for these yet, though the cloth is already surprisingly stable even without the derivatives).
    • Implemented a better (more stable) model for compression springs than what I had implemented before (I'm now using the Choi and Ko bending model, but for compression springs instead, which works incredibly well).
    • Fixed shear spring assignment to work with ngons (It was previously assumed that all polygons would have 3 or 4 vertices, as cloth was implemented before ngons existed in Blender).
    • Further, I just did some minor code cleanup, added some more comments, and tweaked the default values for the cloth properties, to work better with the new mass-spring model.
  • Surface Deform Modifier (surface-deform-modifier branch):
    • Nothing new committed here, though I have started working on interpolation.
  • Fully implemented the proposed "Weight Keys" concept (D2407).

Bug fixes

  • T50141: ForceField Texture not working for hair particles in 2.78a

Fixed: 1; Closed: 2;

Next week

The Surface Deform Modifier has been a bit neglected lately, as it is just so awesome to work on the cloth simulator code itself :) But I'll try to give some love to the SDef Modifier this week. Other than that, I'll see if I can get the derivatives for the angular springs to work, and perhaps pick up a new item on the cloth improvement checklist. I also have some more bug tracker work to do.

Week 2 - 02 Dec 2016

Plans changed a bit, and I ended up starting to work on the mass-spring model before implementing interpolation in the Surface Deform Modifier. I also did many cloth simulation tests and analysis. Unfortunately I was only able to look at the bug tracker yesterday evening, so I don't have anything new in that area just yet...

Cloth Proposal

  • Surface Deform Modifier (surface-deform-modifier branch):
    • Implemented ngon handling, and three different bind methods for handling special cases, partly in preparation for interpolation.
    • Rewrote the whole Surface Deform logic, to have some nice and clean code to do further work on.
  • Mass-spring model:
    • Fixed a little issue with spring length handling (requires some further work after the mass distribution implementation).
    • Adapted structural springs to work for compression in addition to just extension.
    • Componentized structural forces (and damping forces), into separate "tension", "compression" and "shear" components, for maximum control of the cloth properties and behavior.

Next week

I'll continue working in parallel on the Surface Deform Modifier (interpolation) and on the mass-spring model (angular bending springs). I'm glad to say that the angular springs are the final part of the mass-spring model renovation, although they are also the most difficult part... Lastly, I have picked up some work in the bug tracker, so that will be part of the coming week's work as well.

Week 1 - 25 Nov 2016

First week working full time on Blender :)

Did a little bit of work in the bug tracker, but my main focus was working on the cloth proposal (which incidentally made me find some more bugs...). It's my first time implementing a modifier, so I spent some time getting familiar with general modifier code (also looking through the math library). Most of the time was spent with the actual Surface Deform implementation and some further research on interpolation (mostly for proper smooth ngon handling).

Cloth Proposal

  • Developed a first basic implementation of the Surface Deform Modifier (still missing edge and vertex interpolation, for continuity).
  • Ended up making some improvements to Blender's math library, as a consequence of my Modifier work.

Bug Fixes

  • T50078: Vertex Groups not copied over when making proxy
  • T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush
  • T49718: "Make duplicates real" on dupliverts doesn't keep hierarchy
  • Unreported: looptri array not being recalculated in ccgDM and emDM (D2375 not yet commited, pending approval)

Fixed: 3; Unreported fixes: 1; Closed: 6;

Next week

I'll work on getting interpolation working properly for the Surface Deform Modifier, and hopfully get to a close-to-finished state. If I manage to finish the interpolation stuff, I'll remove the bending springs from the cloth simulator, and start working on fixing the structural springs. And of course, I'll try to give some much needed help in the bug tracker.