Initial push of updated dyntopo undo code

As mentioned last week, I’m working on a different approach to handling undo in dyntopo. The new code is up in the usual place on a branch called dyntopo-slim.

The dyntopo branch has 36 commits touching 107 files with 7406 insertion and 624 deletions. The dyntopo-slim branch has only 25 commits and touches 51 files with 5377 insertions and 258 deletions.

The latter set of numbers will no doubt increase, but it should be clear that the new method is much less intrusive. It’ll be quicker to review and easier to maintain. Further, it should be more memory efficient.

The new code is not yet complete; it won’t work with the symmetrize operator (which is temporarily disabled), it’s leaking memory sometimes, and it’s leaving more loose edges lying around. (Dealing with loose edges is a general todo that needs solving in dyntopo.)

If you’re feeling brave, give the new branch a try. If you find crashes with undo/redo let me know, and I’m also curious to hear how memory usage compares.

30 thoughts on “Initial push of updated dyntopo undo code”

  1. The new undo update push is appreciated! We’re looking forward to the symmetry & loose edges making it into this new “slim” branch. Thank you for not forgetting about this GREAT branch!

  2. So far the “Enable Dynamic” seems to happen faster, but I can’t sculpt long enough to get the memory up to a comparable state. It SegFaults with the Grab brush randomly, it seems to be the Grab brush specifically (more testing needed) and I think it might have something to do with using either the Inflate or SnakeHook brush before Grab. I’m not sure exactly because it’s not easily repeatable, but it’s only happened with Grab so far.

    Also, so far I’ve always had “auto reduce” on when it happened.

    1. Ah, now that you mention it I’m pretty sure I failed to finish some changes related to the grab brush (and related ones like rotate.) Will look into this tomorrow.

      Thanks for the bug report.

        1. Nice progress, grab brush doesn’t consistently segfault anymore, but it still segfaults on one of these two conditions (I’m not sure exactly which one yet, but I’m leaning towards number 2):

          1. after I use the Snake Hook brush, then sculpt for a bit.

          2. after I turn on collapse edges, then sculpt for a bit.

          So far, it’s crashed on both Smooth and Clay brushes. All four times it happened after I used the Snake Hook, then turned on Auto-Collapse. Basically, I snake hook something, and need to expand the volute a bit, but the polygons are kinda messy with after the snake-hook, so I turn on auto collapse and inflate the “extruded” volume. Usually that works fine for a minute, then it randomly dies on a some brush, and It usually happens right as I change brushes (press ‘c’ for clay, begin stoke, instant fail; press ‘shift’ for smooth, begin stroke, instant fail) it’s never just failed in the “middle” of a brush stroke.

          Hope that helps.

        2. Okay, another report. It consistency (as in always) segfaults when enabling Smooth Shading, then trying to sculpt. Crashes a soon as I try to lay a brush stroke.

          On a side note, and this is completely unrelated, why doe the Smooth brush run waay slower when the Grab/Snake-Hook brush is active? It seem kinda odd that simply having one brush selected would effect the performance of another.

          1. Okay, looks like the recent git pushes to Dyntopo-slim have fixed my two problems above. Everything’s working nice and fast now. I’ll continue to test and report any bugs. Thanks!

        1. Try switching to a different branch and deleting the one you are updating. For example:
          git checkout trunk
          git branch -D dyntopo-slim
          git fetch
          git checkout dyntopo-slim

          There might be a more efficient way to do this, but that should fix the need to re-clone at least.

          1. thanks a bunch! that saves me lots of time!
            It seems i can’t build x86 dyntopo branch, though i successfully build x64, as well as slim branch x86 and x64
            here is the backtrace:
            http://www.pasteall.org/36285/dos

            i assume that could be my internal problem, can you propose the direction to fix this?

          2. The dyntopo branch is deprecated now, all development is happening in the dyntopo-slim branch.

  3. Hi Nicholas.

    Testing vitos1k’s windows x64 build (last commit: f94e1570dfac6fc2e1397c1c2d4541015cafb905), there’s a pretty inconvenient crasher. If you save your file while in dyntopo mode, Blender will crash on the next stroke.

  4. Suggestion for feature: Incorporate the functionality of the Simplify Brush into the Mask Brush while Dyntopo is enabled. Since the Mask brush is directly linked to the density of your mesh it defeats the key benefit of Dyntopo to have to increase the density of your mesh to get any sort of precision while using the Mask brush. That being said, if it were possible to Simplify then Mask in one stroke.. well that would be pretty darn useful!

    1. The code for paint overlay is in limbo right now. It doesn’t make a great deal of sense for Blender’s current vpaint mode (as vpaint is usually low-density.) It would work much better with Ptex paint, but Ptex is on hold pending support in Cycles (or BI.) It would also work well in texture paint, but I am not familiar enough with texpaint to implement it there.

  5. [21:37] Denis Gradenko: TY. I was write to Nicholas Bishop 5 minute ago
    [21:38] OhMy Shalala: I would love to get an update if yu hear from him
    [21:39] Denis Gradenko: ok. i will bring links for this group, if i get it
    [21:46] Songu Leissa: yay!

  6. Hi Nicholas, Im downloading the files from github, but when i build blender on OSX using the terminal it builds the regular blender and not the dyntopo silm branch. I dont know what am I doing wrong, thanks

    1. After cloning the repository, you need to switch to the dyntopo-slim branch with this command: “git checkout dyntopo-slim”.

  7. hi,
    i want to try dyntopo and have managed to download blender-dyntopo-9//
    how do i install it into my existing blender 2.63

    i know its a noob question, but i havnt been able to find any installation document which would help.

    1. Dyntopo is in trunk now. You can use pretty much any recent Mac build, no need for a special dyntopo build.

Leave a Reply

Your email address will not be published. Required fields are marked *