Change the radius and type of metaball elements

A couple days ago I published a tiny add-on to manipulate the attributes of all meta elements inside a metaball. Because it can be helpful to change the radius of an individual element after is is created I added a small panel that lets you do that (because it is currently only exposed in a Panel in the Ctrl-N sidebar which is not logical).

I have submitted a patch that is now included in the master and 2.8 branches but for now I keep this extra panel in for people who are not able to use the latest built.

The Panel looks like this:

That might not be the prettiest way to do it but it gets the job done. Note that it will change the radius of the active metaelement (just like the other attributes), not of the selected element(s). This is inconsistent with editing regular meshes but unfortunately not something I can change.

Metaelement type

In some situations it might be useful to change the type of all metaelements as well, so I added that option to the operator:
Not that we also have a 'Keep´ option (the default) that will let you scale just the other attributes without changing the element type.

Code availability

The updated add-on is available from my GitHub repository.

Blender addon: scale attributes of metaball elements

Blender has had some support for metaballs since ages yet the amount of development love they get is not much: some attributes of the individual metaball elements are not exposed to the Python API (like select) and/or are not exposed in the interface. It is for example not possible to change the initial radius of an element once created and it is also not possible to change the stiffness or size attributes for any element but the active one (the S key scales the position of the elements).

This is quite annoying because for some voxel based visualizations metaballs are actually quite nice and the implementation in Blender is reasonably fast too. In order to remedy some of the missing featues I created a small add-on that allows you to scale the radius, stiffness and size attributes of all elements of a selected metaball.

Example

Once installed the operator is available in edit mode under the Metaballs menu. When selected it offers the attributes in the operator panel in your 3d-view toolbaar (press ctrl-T if the toolbar is not visible)

Note that scaling any of those attributes will affect all elements in the metaball object because as explained earlier the select status of individual elements is not exposed to the Python API so unfortunately we have no way of limiting the activity.

Code availability

The code is available on my GitHub repository (you might need to right-click and select File->Save As ... or equivalent depending on your browser)

Extended Voronoi Texture support in Blender

A long time a go I reported on my efforts to get a more versatile Voronoi texture node in Blender but this effort never led to actual inclusion of the code.

But all of a sudden there has been some interest again and now we have extended Voronoi functionality in the Voronoi texture node! And of course Pablo in his unique enthusiastic style did a nice demo of it as well check out the video.

The new functionality is available in the latest build of 2.79 and presumably in the 2.8 branch too. Note that in my original patch I included Voronoi crackle as well, but that is not available in the new node itself. However since Voronoi crackle is simply the difference between the distance to the 2nd closest and the 1st closest point, this popular pattern is super easy to implement now with the following noodle:


Finally an easy way to generate lizard scales :-)


Blender Market 2018 fall sale

Blender Market will feature a sale from September 19 - saturday September 22. Many products will be 25% off, including of course all my add-ons ;-)
So if you were thinking about TextureWatch, NodeSet Pro, Ortho, IDMapper, WeightLifter or even SpaceTree Pro, this will be your change to get them at a nice discount in my BlenderMarket shop.
Many other creators of add-ons as well as models, shaders etc. will participate so be sure to visit BlenderMarket's home page as well.

Add-on: export a mesh as an OpenGL display list

Ok, I know this will only benefit very few people but that doesn't stop me from sharing :-)

A cloud of OpenGL Suzannes

What is it?

A tiny add-on that exports a small Python file containing OpenGL code to display a mesh.

What is it good for?

Blender has OpenGL bindings available for use in Python scripts. You can use these OpenGL drawing commands to display for example overlays over your 3D view with a draw handler.
If you would want to draw some sort of complex object you would have to recreate it using glVertex3f() calls which is a lot of work as soon as the model is more than a few vertices. This add-on generates the code for you in the form of a function that creates a display list.

How does it work?

When you select File -> Export -> Export mesh as OpenGL snippet it will open a file dialog and then it will write Python code to the selected file.
It will write the vertex coordinates (in object space) and the vertex normals of the active object. It will triangulate the mesh internally before writing it. There is currently no check if there is an active object or that the active object is a mesh.

What does the resulting Python code look like?

The export for a plain Suzanne mesh looks like this:

import bgl

def Suzanne():
 shapelist = bgl.glGenLists(1)
 bgl.glNewList(shapelist, bgl.GL_COMPILE)
 bgl.glBegin(bgl.GL_TRIANGLES)
 bgl.glNormal3f(0.9693,-0.245565,-0.011830)
 bgl.glVertex3f(0.4688,-0.757812,0.242188)
 bgl.glNormal3f(0.6076,-0.608505,-0.510393)
 bgl.glVertex3f(0.5000,-0.687500,0.093750)
 bgl.glNormal3f(0.8001,-0.599853,-0.002850)
        ... lots of calls omitted ...
 bgl.glVertex3f(-0.5938,0.164062,-0.125000)
 bgl.glEnd()
 bgl.glEndList()
 return shapelist

That code is so old fashioned, why?

If you ask any questions on forums like stack-overflow about older versions of OpenGL (and old in this context essentially means anything before OpenGL 3.0) you will be told over and over again that you shouldn't use it and that investing time in it is wasteful or even stupid.
You will have to live with that :-)
The fact is that even though Blender certainly runs on newer versions of OpenGL, the Python bindings it provides are based on version 2.1 and I am not sure when that will change. And yes, even 2.1 supports stuff like vertex arrays but those are quite cumbersome to use, not documented in the Blender Python API any in many situations overkill and not really a speed improvement: If all you want is some fancy overlay, using a compiled display list is pretty fast.

Where can I download it?

The add-on is available on GitHub.

Blender add-on: TextureWatch

I am happy to announce that yesterday I published my new TextureWatch add-on on Blendermarket.

As illustrated in the video, TextureWatch is a small add-on to automatically synchronize textures used in your .blend file if they change on disk. This simplifies working with external programs like Gimp or Substance Painter because TextureWatch can automatically update those textures when you save your files without the need to go through all images inside Blender one by one and selecting reload. This saves time as well as guarantees consistency.


If you find this useful you might want to take a look at my BlenderMarket store.

Graswald vs. Grass Essentials

I recently bought the Graswald add-on because the sample images looked really good and the collection of plant species, variations and leaf debris on offer was quite extensive.

A couple of years ago I also bought Grass Essentials and although that was (and is) is fine collection of grasses and weeds too, I always found it rather difficult to get naturalistic looks. Both products have options to change things like the patchiness or wetness of the plants but I feel that Graswald, being an add-on*) with all the configurable options in a toolbar panel is far easier to work with and offers some extra possibilities, like integration with weight painting for distribution and length as well as aging a percentage of the plants .

*) It is also available as an asset library without the add-on at a slightly lower price.

Example


To show you what I mean I spent some time trying to recreate a patchy grass field consisting mainly of Kentucky Rye grass sprinkled with lots of dandelions. It took me about 10 minutes to set up the Grasswald patch on the left and although the time it took to set up the Grass Essentials patch on the right was about the same, I lost some time because although Grass Essentials does have dandelion flowers and seed-heads, it does not have a particle system to represent the actual dandelion plant leaves, so I finally substituted those with plantain to get at least some leaves showing.

(click to enlarge. Image rendered in Cycles with 1000 samples, filmic color management at medium high contrast and lit by a single HDRI backplate from HDRI Haven. The ground texture barely visible below the plants was a simple dirt texture created in Substance Painter. Note that Grass Essentials bundles several good dirt textures as well.)

Conclusion


Now everybody knows I not much of an artist and probably with some extra time the Grass Essentials version could be made to look more varied and patchy but for me the ease of use and the quality of the end result speaks for itself. Given this quality and ease of use combined with the slightly lower price, Graswald easily wins out on value for money.

[These opinions are my own. I am no way affiliated with either Graswald or Grass Essentials and did pay for both products myself.]