Posts tagged ‘grasshopper’

gennaio 18, 2014

Colors/Groups Exchanger (add-on)

Working in parametric design with a particular focus on blender’s parametric features, and the possibilities to exchanging information from/to other softwares I started to develop this new add-on.

During last workshop adaptABILITY in Bratilsava, Andrea Graziano and me introduced participants to some strategies for connecting blender to grasshopper through informations stored in vertex colors that can be exported as .ply file without need of scripting.

In blender there are quite interesting tools for working with vertex colors and vertex groups (vertex weight) but there is no an easy way for create a connection between these two layers of information stored inside the vertices of the mesh.

The add-on that I prepared is called Colors/Groups Exchanger and it allows to use two different commands: Vertex Colors to Vertex Groups and Vertex Group to Vertex Colors.

Vertex Colors to Vertex Groups

Sometimes can be useful to use informations of vertex colors in order to control some modifiers, physics or the behaviour of shape-keys.

vertex_colors_to_vertex_groups_command

 

Using this command it is possible to store one or more colors channels inside vertex groups (gray, red, blue, green, inverted).

colors_to_weight_options

For instance vertex colors are pretty useful for creating a grayscale map containing informations about mesh curvature. This tool is called Dirty Vertex Colors:

 colors_to_weight_dirty

Or maybe you prefer to use light shading for parametrically control some particular effect on the surface of your geometry:

 colors_to_weight_light

Or simply use some colors information incoming from external softwares for interact with your geometry.

 

Vertex Group to Vertex Colors

The second command that I’m going to explain is Vertex Group to Vertex Colors. It allows to move information from vertex-weight groups to colors, maybe because you want to export these informations to external softwares or simply because you want to render vertex groups.

vertex_group_to_vertex_colors_command

 weight_to_colors_options

One of the coolest way to work with vertex weight is to use some dedicated modifiers, like for instance Vertex Weight Proximity:

 weight_to_colors

We are waiting to do a new workshop about Blender and Grasshopper in order to going deeper in this interesting topic. Check Co-de-iT website for updates, or tell us if you would like that we organize one in your city.

 Cheers

Alessandro

aprile 6, 2011

voxel analysis for implicit surfaces

This is my first test with implicit surfaces. I tried to voxelize a sort of rheotomic surface, defined by rules of iso-distance between nearest elements of two differtent groups (1 point+2 curves for first group and 2 points+1 curve for the second one).

In a first moment, I tested the brute-force samplyng method, in order to search for a way to sample points belonging to implicit surfaces. This expensive method consists of analyzing all possible solutions and the subsequent evaluation of results. In this case I needed to verify each point of my 3D grid and improving the resolution, i obtained  8^n points every n divisions of main domain.

A better solution consists in a progressive analysis: starting from a domain, and progressively dividing positive matched cubes (later I learned that this approach already exists with the name of Quadtree):

Sampling Scheme

Explanation of progressive sampling method.

Coding it with c# in grasshopper, I obtained a relatively complex point cloud:

Rheotomic surface_002

Point Cloud otup in grasshopper

This coarse approximation isn’t at the moment enough accurated for obtaining clean surfaces, however I tried to connect resulting point-cloud with MeshLab. After a quick editing in Blender, I rendered the output:

Rheotomic surface_001

Final Mesh

At the moment I’m working on the improvement of the quality of point-cloud and subsequent elegance of the resulting mesh.