If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Note : Cavity and Edge Masking is computationally heavy. If your sculpt vertex count is greater than 100k make sure to save your work before using it. Also wait for blender to finish it can take up to 10-15 seconds for 600 k - 800 k meshes.

Its in view3d > tool panel > sculpting

There are 3 buttons for converting masks to vertex groups; 3 buttons for converting vertex groups to masks.

Mask To VGroup :

Create Vgroup: Creates a new vgroup and assigns the mask.

Vgroup Add : If a vgroup is selected, adds the current mask to it.

Vgroup Remove : If a vgroup is selected, removes the current mask from it.

VGroup To Mask :

Create Mask: If a vgroup is selected, creates a mask from it. Deleting existing mask

Mask Add : If a vgroup is selected, adds the selected vgroup to the mask.

Mask Remove : If a vgroup is selected, removes the selected vgroup from the mask.

Installation Note : Please use " Install from file" option in preferences/addons.
If you are doing manual install make sure you extract all files together to the addons folder (they need to be together).

Note: This addon will only work for dynatopo sculpts, multi-res won't work.

@yii7: hey bro, have you streamlined the code with the new way of getting mask data in phyton?, if so do i have your permission to vulture some of the codes?, i have a great idea for an addon that will make the Dyntopo Sculpture Club very happy.

@yii7: hey bro, have you streamlined the code with the new way of getting mask data in phyton?, if so do i have your permission to vulture some of the codes?, i have a great idea for an addon that will make the Dyntopo Sculpture Club very happy.

Nope its not new way. I do check the commit logs every other day ( might have missed it dunno ?). This still uses the hacky way...

Yea you can help yourself with whatever is in the python files ( as long as its free and open-source ).

remember StanPancakes sample code for converting mask to vgroups using the new python exposing the mask layer? that's it, i was hoping you incorporated that.

Yeah I remember, his code accessed vertex custom data layer (which holds the mask info per vertex). That needs to be committed to trunk so that I can implement something similar; as far as I know that patch is still not in trunk.

I'd mask off something in Sculpt Mode. Then I'd invert the mask selection and hide the selected, I'd immediately go into Edit Mode and highlight the vertices and assign/save those as a vertex group. Then I go back into Sculpt Mode and un-hide the selection.

I could go back and re-call that vertex group in Edit Mode, invert the selection and hide other vertices, go into Sculpt Mode and Mask that visible piece of geometry, and then go back to Edit Mode to un-hide the rest of the mesh.

This was my original way of "saving" masks and turning masks into vertex groups. A rather arduous process, esp. when you've got to do it a lot. It seems this addon pretty achieve much the same effect, but in a far more workflow-friendly way. This addon is a godsend!

This will save me so much time, allow greater freedom in recalling masking groups, in converting masked regions into vertex groups, and hopefully, serve as a foundation to future masking improvements in Blender (such as coupling the Dirty VertexColor tool or the AO node in Cycles with Sculpt Mode's masking ability to get a Masking by AO selection feature.

Or perhaps borrowing the 3D Printing Toolbox's ability to select certain kinds of surface conditions such as Volume and Overhang, and coupling it with Sculpt Mode's masking to get Mask by Volume/Mask by Overhang, etc.) The new cavity painting feature could be re-purposed in Sculpt Mode for a Mask by Cavity feature. There's so much potential for this kind of thing!

We might can better use the Sculpt Tools addon with this addon, to allow you to use saved masks for mesh extractions (á la ZBrush's Mesh Extraction). Hopefully, this would all lead to adding mesh management ("Subtools" as ZBrush calls it) in Blender's Sculpt Mode, along with some layer management functionality, to truly bring masking in Blender sculpting to fuller life.

Then, other stuff like rigging up "Insert Brushes"-like brushes that insert instances of a mesh along a curve (converted Grease Pencil or precise-control curves) using the Array Modifier, but all ready within Sculpt Mode. Man, there's just so much re-using existing Blender features to make Sculpt Mode (and Texture Paint Mode) fill out well. And MiraTools only add to the fun! I think such potential starts with small steps at a time, such as this kind of Mask Tools addon.

Anyways, I realize this stuff takes time, I don't want to undermine this useful addon (to which I am thankful), and Blender development all depends on the priorities/abilities/free time of generous developers, but maybe this kind of thing will motivate and lead to some future focus for Blender development.

Of course, I don't think Blender will ever become a "free version of ZBrush" or anything that ambitious for a 3D package, but it could become something of a pretty respectful alternative. Maybe the next Blender project will give some more love to the Sculpt/Texture Paint Modes. One can dream!

Anyways, thanks, yii7 and Psy-fi!

Edited: The ""Insert Brushes"-like brushes that insert instances of a mesh along a curve (converted Grease Pencil or precise-control curves) using the Array Modifier" part? Already in progress.

I have tried your addon and i like, but i think would be more useful if works with multires modifier.
i had another idea to implement,
i hope you have something like that on your plans.

Nice idea too ; forgot about this i will add it to future feature list. Thanks.

Ps: Multi-res system is completely different and as far as I know we can't edit the multi-res subdivision layers from outside C code. I guess multi-res keeps the subdvision on a cache (on the disk or memory). To save a mask we either need to access the cache and edit it (read/write) or make some kind of projection ; and for that python api needs access to this multi - res layers

@ Crocadillian : Yea the API update opened the way for better implementations and possible other uses, I started updating the script, the mask to vertex group and vertexgroup to mask with blending is done, but still need to finish the add remove part for vgroup to mask (hopefully soon). Then some tests and addon will be updated after 2.75 relase.

It seems someone changed the name of the " customdata_clear_mask " to " customdata_mask_clear " that is causing the issue.

The addon should work with 2.74 official release, but it won't work on 2.75, I have to ask if this is going to change or not and depending on the answer update the add-on. It something trivial really you can make a fix by editing the python file if its urgent. Just change line 33 in vgroupToMask.py > bpy.ops.mesh.customdata_clear_mask.poll() > to > bpy.ops.mesh.customdata_mask_clear.poll()

Or you can use the official 2.74 build until I make the changes official. Cheers

EDIT : There were 2 lines that needed changing so I made a 2.75 compatible version.Adding the link to the original post and this post.

It seems someone changed the name of the " customdata_clear_mask " to " customdata_mask_clear " that is causing the issue.

The addon should work with 2.74 official release, but it won't work on 2.75, I have to ask if this is going to change or not and depending on the answer update the add-on. It something trivial really you can make a fix by editing the python file if its urgent. Just change line 33 in vgroupToMask.py > bpy.ops.mesh.customdata_clear_mask.poll() > to > bpy.ops.mesh.customdata_mask_clear.poll()

Or you can use the official 2.74 build until I make the changes official. Cheers

EDIT : There were 2 lines that needed changing so I made a 2.75 compatible version.Adding the link to the original post and this post.