Showing posts with label vertex group. Show all posts
Showing posts with label vertex group. Show all posts

Weightlifter add-on for Blender is now free

Weightlifter


In a previous article I mentioned that I stopped publishing add-ons on blender market because basically I was done with it it: I didn't earn enough to warrant the amount of effort that goes into maintaining and supporting add-ons.

However, there is still quite some interest in some of the add-ons, and so I decided to open source some of the add-ons and make them available for free. The first one was Snap! but now it is Weightlifters turn, my very first add-on published on BlenderMarket (now Superhive), back in 2014 (!)

Weightlifter is the Swiss army knife of recording mesh attributes to vertex weights or -colors. Anything from whether a vertex is visible from the camera to its slope or curvature can be converted to weight maps or vertex colors, and much more.

Technically Weightlifter already was open source, at least the source code was, but now I'm also open sourcing the manual, and that means that you can download both the source and the manual from this GitHub repository.


This repository is still a work in progress and the manual hasn't been updated for Blender 4.x yet, but the code is and will run on 4.4. For now, simple download weightlifter.py and use the install from filesystem in the add-ons section. Then read the manual!


To give you some idea of its capabilities, there is a video playlist on YouTube (but they show old versions of Blender).


New release of IDMapper

A new release of IDMapper is currently available on BlenderMarket
This new version is a bugfix release that besides minor fixes also fixes an error that might occur when trying to assign colors based on material ids. Furthermore the manual has been updated to reflect Blender 2.8x layouts and the add-on has been tested against Blender 2.81-beta.

New version of WeightLifter for Blender 2.80



A new version of WeightLifter (20190728) has been released on BlenderMarket.

I has some bug-fixes to keep it compatible to the latest release candidate but more importantly it sports an updated manual and a new feature to combine baked weight maps into one. This feature is useful if you use the maps as density maps in a particle instance and want to prevent frame-to-frame jittering for example. It is illustrated in this video


WeightLifter ported to Blender 2.80


WeightLifter has now been ported to Blender 2.80 and is available from BlenderMarket.
Porting this add-on was a bit more work than porting NodeSet Pro, so be aware that Blender 2.80 is still in beta and you might still encounter some difficulties!

New version of WeightLifter introduces baking and animation

A new version of WeightLifter is available on BlenderMarket.

WeightLifter is an add-on that can calculate all sorts of information and store this into vertex groups or vertex color layers. It can for example determine the visibility of vertices for a certain camera or the distance to some light source and much more, information that can for example be used as a density map in particle systems.

New features

The newest version introduces some new modes like calculating a flow map or the mesh deformation but the most exiting new feature is the ability to bake any weight map for each frame in an animation. This way can quickly regenerate a vertex group for each frame while rendering, effectively animating a weight map, something which is not possible otherwise.

To illustrate how to do this, I have created a short video that shows the workflow for creating an animated density map that lets the proximity to a lamp drive the emission of particles.

WeightLifter add-on: new features

A new version of the WeightLifter add-on (available on BlenderMarket) adds some functionality based on user feedback. Besides some bug fixes you can now:
  • use an arbitrary reference axis in Height en Slope modes,
  • restrict the range of calculated values interactively, and
  • control the size of the patches when assigning random values to faces.

A tutorial showing this new functionality is available on YouTube:

WeightLifter add-on: new feature

I extended the WeightLifter add-on with an extra operator in the Paint menu of the vertex paint mode: VertexColorCombine. It lets you combine color channels from different vertex color layers into a combined vertex color layer.

Combining this kind of information into a single vertex color layer might save considerable space when using large meshes. A small tutorial on a possible workflow to combine different attributes calculated with WeightLifter into a single vertex color layer is available on YouTube:

Blender Conference Discount


During the 2015 Blender Conference (from 23 to 25 October) many products at BlenderMarket will come with a 20% discount. Of course I will participate in that sale as well, so if you were thinking about purchasing either WeightLifter or Space Tree Pro, now is your chance to get an even better deal :-)

Now I wouldn't want to exclude my Open Shading Language for Blender E-book from the fun so even though it is not marketed by BlenderMarket it will carry the same 20% discount during the Blender conference. Get it on Smashwords and enter the coupon code EY53W on checkout.

WeightLifter add-on: new feature release

Version 20150501170240 adds two new modes: one that assigns values based on the average area of the faces sharing a vertex and another mode that assigns values based on the variance of the lengths of edges that share a vertex. The first one I find useful in creating materials on organic shapes that vary in a subtle but correlated manner while the latter offers a complement to the curvature mode, highlighting certain vertices in a different way. Of course you might find a completely different use for it, that's why I include it in the add-on :-)

The new version is of course available free of charge to people who have already purchased the add-on. Check the BlenderMarket page for more details.

Transfer vertex weights to vertex colors and vice versa

In a previous article I mentioned that my WeightLifter addon was updated and could now (besides many other things) transfer vertex weights to vertex colors and vice versa. Because this might be of use to many people I decided to split off this specific functionality into a separate addon and provide it for free.

After installing the addon in the usual manner you get two new menu options: one in the Weights menu in Weight Paint mode called VertexColorsToWeights and a corresponding one in the Paint menu in Vertex Paint mode.


Weight paint mode

In weight paint mode clicking on Weights -> VertexColorToWeight will transfer a color from the active vertex color layer to the active vertex group. If there is no vertex color layer present a will cretae a new one. You have an option to choose which color channel to use as weight or to combine all colors.

Vertex paint mode

In vertex paint mode clicking on Paint -> WeightToVertexColor will transfer the weights from the active vertex group to the active vertex color layer. if there is no veretx group present it will create a new one. You have again an option to transfer the weights to a single color channel or to all color channels.

Code Availability

The code can be downloaded from my GitHub repository.

WeightLifter add-on: user feedback release

Version 20150222 incorporates a lot of features based on user feedback, including an invert option, a new mode (that measures distances to selected vertices), auto update of particles systems that use a a vertex group and extra operators/menu options to transfer values between vertex groups and vertex color layers. The new version is available free of charge to people who have already purchased the add-on. Check the BlenderMarket page for more details.

Distance to selected verts

The new mode Distance to selected verts lets you for example create vertex groups that might be used to control the distribution of particle systems based on the distance to a wall:

Auto update of particle systems

If a vertex group is updated by WeightLifter it now takes care to trigger an update on any associated particle system that uses the vertex group. This way you can get immediat efeedback on the effects of your WeightLifter actions.

Transfer weights to vertex colors (and vice versa)

Sometimes it might be useful to transfer the weights of vertex group to a vertex color layer or the other way around. This might be useful in other contexts beside WeightLifter too, so this functionality is implemented as two separate operators that are available from the Weights menu in vertex weight mode and from the Paint menu in vertex color mode. There are installed automatically with WeightLifter/

WeightLifter add-on: minor bugfix release

A new version of my commercial WeightLifter add-on is now available. Version 20150214 fixes a small bug where you would get an error in slope mode with the 3D cursor as a reference if the 3D cursor was at the center of the world.

Using vertex colors to color hair in Cycles

I got a question related to my WeightLifter Addon asking whether is was possible to use the addon to control hair particles. The addon itself does of course not control any particles but the vertex groups and vertex colors it creates can be used by any particle system to control the distribution and coloring of the the particles or hairs strands as shown in this example:

For this image WeightLifter was used to create a vertex group with more weight on horizontal surface:

Then this vertex group was used to control the distribution of the hairs by selecting the gruop in the particle system settings:

In the same manner WeightLifter was used to create vertex colors that change colors from left to right:

A Cycles material was then created to use these vertex colors (via the Attribute node) to color the hairs

WeightLifter - Vertex Group Tool, bugfix release

Recently I published my first commercial addon on BlenderMarket and I am very pleased with the reactions I got so far. A big thank you to all those people who purchased the addon!

Of course, no serious piece of software is completely without bugs so I updated the addon a few hours ago. Version 20141018 contains a few small bugfixes and removes a limitation that could lead to crashes when assigning random weights to groups of connected vertices on large meshes (Thank you Wybren for reporting this).

WeightLifter - My first BlenderMarket addon

I am quite proud to announce my first addon that's available on BlenderMarket!

The addon combines a lot functionality in a single comprehensive addon. There's a tutorial online as well, demoing the most eyecatching features and I hope it will be useful to not just ArchViz people!

Update: there is now an update available that fixes a crash that could happen when assiging random weights to groups of connected vertices in large meshes.

Height to vertex weights, a Blender addon

In a previous article I presented a small script that could create a vertex group or vertex color layer with values representing the slope of faces in a mesh. The script in this article is its companion: it creates a vertex group with values representing the height (sorry no vertex color equivalent yet). I decided to make it a separate addon to keep code maintenance a bit simpler.

version 0.0.2 is now available and gives you the same possibilities as vertex colors instead of vertex weights. If you have installed the script you can find this new functionality under Paint->Height.

Terrain modelling

The script was created with terrain modelling in mind. You might for example want to distribute plants based on the height of a landscape mesh as shown in the (rather crude I admit) image below:

The image was created with a mesh from the ANT landscape generator to which a vertex group was added with the height addon (in weight paint mode, in the 3dview with Weights->Height). The result was this weight map:

Because i wanted the grass particles to be more dense at lower altitudes, I tweaked the weights in the resulting vertex group with a vertex weight edit modifier with the following settings:

The resulting map (shown below) was then used a density map for my particle system:

Options

The scripts replaces the weights in the active vertex group to weights that represent the height or creates a new vertex group is necessary. After installation it is available in the 3dview in weight paint mode under Weights->Height It maps the chosen coordinate (x, y or z-axis) to a weight, which will be 1.0 for the largest value encountered and 0.0 for the smallest. These coordinate values are interpreted in either object (local) space or world (global) space. If the the Absolute checkbox is checked negative coordinates will be treated as positive. The mapping from [minimum,maximum] coordinate to [0,1] weight is normally linear, but may be influenced with the Power property. After mapping any values less dan Low will be set to 0, any values larger dan High will be set to 1

Code availability

All functionality of this add-on plus a lot more is now available as a convenient all-in-one add-on on BlenderMarket. It comes with an extensive PDF manual and your purchase will encourage me to develop new Blender add-ons.

The simple script shown in this article is available from GitHub and has an entry in Blenders upload tracker. There is also a BlenderArtists thread for discussing it.

Slope to vertex weights, a Blender addon part II

The addon's functionality was enhanced with a mirror option, to treat 'negative slopes', like those on the underside of a sphere in the same manner as positive slopes. This makes it for example possible to grow stuff on flat parts on the underside of an object while still not growing anything on the steep side as shown in the image of Suzanne (Rock material by Rasmus Seerup). Note that the default Suzanne has a ninety degree rotated mesh, so I had to rotate her in edit mode to get the slope information I needed)

The vertex paint variant was enhanced with the option to map the calculated slope through the brush curve. This allows you the ultimate control of the weights assigned to the slope values. (Note that have to click Paint -> Slope everytime you alter the brush curve, I haven't found a way to give immediate feedback. Also the weight paint variant of this addon (which produces vertex weights instead of vertex colors and is available in weight paint mode from Weights -> Slope) does not offer this functionality itself because it is already possible to add a Bevel Weight Edit Modifier to modify vertex weights).

Code availability

All functionality of this add-on plus a lot more is now available as a convenient all-in-one add-on on BlenderMarket. It comes with an extensive PDF manual and your purchase will encourage me to develop new Blender add-ons.

The simple code shown in this article is available from GitHub snd discussed on this BlenderArtists thread. It is also followed in the Blender upload tracker. The brush curve functionality is only available for builds >= 60054 so you will have to wait for a new Blender release or build your own/download the daily build if you want to use it. The script checks for the release number so it won't crash if you have an older release.

Slope to vertex weights, a Blender addon

As usual I enjoyed Andrew Price's tutorial on creating a cliff side quite a bit. Andrew is gifted when it comes to creating interesting Blender tutorials. However, he's first and foremost an artist. That is not meant to sound negative in any way but I observed that his solution to distributing grass along the cliff face's less steep parts was a laborious affair. Each suitable spot needed to be painted by hand.

Now this gives you ultimate control over the placement of grass tufts but wouldn't it be easier to just generate weights for a vertex group with a single clip? Of course it would and the end result can always be tweaked in weight paint mode if you would like to do so. So I wrote a small script.


The grass was done with a simple particle system that has its density set to a vertex group generated with the script.

It very much resembles my random vertex colors script so most of the work was copy and paste except for the few lines in the execute function.

The workflow is simple: after you have installed the script in the usual way, select your object and make sure you are in object mode. Then in the 3d view select Slope to vertex group from the object menu and your done.

The result is that the weights of the active vertex group have been replaced with a value representing the slope (or to be more precise the angle between the vertex normal and the object z-axis). A weight of one will be equal to a flat portion, while 0.5 will equal to a perfectly vertical part. Zero is a flat portion that is upside down. (I might change this behavior and add some options to influence the mapping range)

Code availability and discussion

All functionality of this add-on plus a lot more is now available as a convenient all-in-one add-on on BlenderMarket. It comes with an extensive PDF manual and your purchase will encourage me to develop new Blender add-ons.

The simple code shown in this article is available on GitHub and has it's own entry in Blenders upload tracker. Any comments are welcome, you might prefer this Blenderartists thread instead of this blog.