Sculpting on deformed mesh

Hi everybody and I want to present next patch for sculpting on deformed meshes.

Now sculpting is not limited with armatured meshes only and any deformation modifiers are allowed.ย  Algorithms aren”t 100% mathematically correct (this would lead to real slowdown), so in some cases deformation could be a bit different than you expect it to be. But hope you”ll find it useful ๐Ÿ™‚

Implementation

Implementation is quite simple — if there”s any deformation modifier that doesn”t support deformMatricies method, use crazyspace correction like it was done for transformation module (this correction calculates rotation based on angle between tangent space angles calculated for base and deformed mesh).

All crazyspace stuff was moved from transform_conversions.c and DerivedMesh.c to crazyspace.c, so this corrections could also used in particles edit mode (which doesn”t work with deformed meshes, as I understood when was using it last time)

Limitations

There”s still limitation for constructive modifiers in general and for subdivision surface particularly. Still not sure it could be easily solved and still think better way is to introduce hotkey for switching between modes. This will keep sculpting behaviour expected. But maybe I”ve got some cool ideas and implement this ๐Ÿ™‚

One more limitation is symmetric sculpting. Current approach for symmetrical strokes wouldn”t work for deformed meshes — there should be another approach. The simplest approach is like x-mirror in edit mode, but it requires vertices from “other” side be in specific location (with some small delta) and otherwise x-mirror will do nothing. Don”t think it would be useful and current symmetric sculpting works fine even if mesh isn’t very symmetrical itself. There could be some kind of interpolation or so on, not sure yet but hope it’ll be solved ๐Ÿ™‚

-Sergey-

13 comments 2,680 Views
  1. what about determining symmetry on undeformed? something like:
    -reverse-transform or crazy-space transform sculpted area, to find he undeformed location;
    -find the x/y/z mirror on undeformed mesh the normal way
    -apply the sculpt mirror there

    alternatively, using topological symmetry could work? Ultimately I guess crazy space stuff cannot be perfect because the modifiers are not always linear transformations.

    • Thanks for comment. Yep, brush coord could be quite easily flipped in base nesh space, but brush stroke can’t be used to make deformation at that flipped coord (as it’s done for current symmetric). Existing symmetric approach deals quite well with asymmetric meshes, but maybe for first step it’ll be acceptable to use topological symmetry and implement some kind of interpolation in the future.

      And yep again, crazyspace isn’t perfect, but it gives quite acceptable results and other approaches seems to be much slower. So i think it’s still acceptable to have such implementation. Anyway, things are much better now that they were before this corrections, nope?

  2. Speaking about symmetry: will there be a support for symmetric painting/creating symmetric UV? When I import a symmetric mesh from Sculptris it comes with symmetric UV and I think it’s very useful.

    • Pardon for delay, was busy with other stuff.
      Not quite understood question. How sculpting could affect UV? Or you’re talking about different UV i think (UV for textures, no?)

      • Check this out for example: http://www.blendswap.com/3D-models/animals/hydra-2/

        Turn off the procedural texture (underneath is a symmetric one), and paint something on the mesh. (It came from Sculptris btw. as Scupltris will generate symmetric UV if symmetry is turned on.)

        The point is that mirrored triangles have the same UV coordinates, so there’s only one texture for both legs, and one texture for both hands, as there UV map overlap. Of course if you want to introduce assymmetry (e.g. for baked shading) you create a new UV layer in Blender , unwrap (this will create “assymetric” UV), and bake the old texture in the new.

      • “How sculpting could affect UV? Or youโ€™re talking about different UV i think (UV for textures, no?)”

        Yeah, I was speaking about textures. I just wrote here because the symmetry thing popped up.

  3. I did try to sculpt on a Multires Mesh also containing a Wave Modifier on Top. Works as long as you donร„t try to sculpt while playing the Anim with Alt-A…

    Carsten

    • Yep, there’s crush. But it’s not related to my changes — i’ve tried to sculpt on simple multires (without other modifiers) in all 2.5alpha0-2.56b and got crash in every version.
      Quick investigation gave no result. Will try to fix it tomorrow.

    • I hope fix is in svn. The problem is that we’ve got hardware problems at server, so svn wouldn’t be available for a while.

      Poke me if there would be another issues ๐Ÿ˜‰

  4. yes, for sure they are better ). and yes, there is no way to make perfect crazyspace, so the best is to hope for some kind of ‘fairly sane, most of the time’ness.
    Kudos for working on a difficult but very useful problem )

  5. I really dont understand many things you said, (im not a coder-one person)but i really pray to return the functionality for supporting mirror and subdiv modifiers! And… i want to say that i really enjoy the new sculpting on shapekeys abillity, but i want to be able to use subdiv and mirror while sculpting on shapekeys! thanks for your hard work, wish you succsess!

    • +1 for Mirror & SubD mods

      SERGY, I beg you, please put these features back into blender. It’s the single reason I still haven’t fully migrated from 2.49.

  6. Yet another great upgrade to working on deformed meshes without being(very) affected by crazyspace. Thans Sergey for your hard work on solving this issue.

  1. Leave a Reply

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

     

share this story on