Showing posts with label maxscript. Show all posts

Fields part II: Morpher/BlendShapes

Saturday, January 28, 2012 § 3

Morphing, is the technique where a transition between two images is achieved seamlessly. The technique was (of course) developed initially for cinematographic purposes. As we read on filmsite.org, the first time it was used extensively was in the movie the willow, in 1988. One of the most impressive early movie examples was in Terminator 2: the judgment day. There the T-1000 cyborg terminator was equipped with the ability to morph into any kind of object (it was actually supposed to be made out of a morphing metal); the running time of the morphing scenes are counting up to 16mins (again according to filmsite.org). A very interestin example in the arts is the work of Daniel Lee and more specifically his 1993 manimal series (from these series Ben van Berkel and Caroline Bos are using the "year of the ox" in order to explain their 'hybrid building' concept). Of course, 3D motion effects could not stay out of the game in such a case. Most 3D packages today include tools able to transform seamlessly one piece of geometry into another (morphing or blend shapes). 3D morphing is based on the position of vertices of the objects. There is a base object (the one being animated) and one or several targets. The vertices of the base object are interpolated on paths created between the initial position of the vertices in the base object and the position of the vertices in the target objects.

The base concept behind 3D morphing however, while applied extensively in computer animation, is not that new. In ~1480, painter Piero della Francesca publishes his third book De Prospectiva Pingendi where he deals with the 3-dimentional representation of objects. As we read on this article, the book is composed out of three chapters: The first deals with the projection of 2-dimentional shapes and the second extends that to the projection of 3-dimentional shapes. The third chapter however appears to be the most interesting: there he describes what he calls 'The other method'. This 'other method' (meaning 'not Alberti's perspective method') is illustrated through drawings that are explaining how it can be used in order to represent a human head: First he draws cross-sections from top to bottom and then axial sections from the center of the head. The intersection of the two sets of sections, gave him 128 points positioned around the human head. All this process is already amazing considering the time that it was made, but the really amazing part comes next: Piero della Francesca was able to use those points and their relations in order to rearrange them and subsequently in order to be able to draw any other posture of the human head, in essence achieving auxiliary projection some hundreds of years before that was actually invented by Gaspard Monge. On a first note this is a great example of how one can shift from a representational method to a generative one. The representation of the intersection points of the two sets of sections, becomes a generative tool that allows the creation of any other position of the head.

Images of human head with orthographic projections & Head rotated from Piero della Francesca's, De prospectiva pingendi, Book 3, figures lxiv & lxvii. (Casa Editrice Le Lettere, source: http://www.thelancet.com)


Considering the relation with morphing, while Piero della Francesca's 'other method' is not exactly the same as contemporary morphing techniques, the similarities are nevertheless still striking: both methods are using points (the intersection points in the first case, the vertices in the second) strategically positioned on a surface that through their relative positions can be used in order to represent several other 'incarnations' of the surface.

When coming to initial contemporary practices in 'digital' architecture, morphing had a critical role. One of the main reasons was that morphing made possible explorations of the topological transformations of an object. Now, topology is a rather over - and extensively mis - used term in architectural cycles. It was used heavily in order to denote any kind of computer generated, curved form, the same way 'blobs' were used before that and 'parametric' is used now. We all have heard more than enough times how topology is an alternative to Euclidian geometry, meaning in essence curved forms vs rectilinear forms. For better or for worst though, topology has nothing against Euclidian geometry, since topology is not a different geometry at all (at least not in the sense that Riemannian geometry for example is); on the contrary, most topological studies remain within the Euclidian 'field'. Euclidian - or for that matter any kind of - geometry is studying the state of an object. Topology however is concerned with the transformations of an object. In other words, there is no such thing as a topological surface or object. The only thing that can be topological is a transformation. If we were to over-simplify, geometry is quantitative - the sizes of an object is what matters - topology is qualitative - it is connectivity, continuity and convergence that matters -. In short, the topology of an object is preserved when that object goes through continuous deformations. On the other hand the topology of an object changes if for example a new hole is introduced to it. Therefore, morphing is concerned exactly with that aspect: the way an object is transformed continually, moving from one geometrical shape to another while keeping its topology the same.

And this is the point where topology becomes a very useful concept in architecture today, and morphing a very useful tool that helps to study that concept. Because, if we were to abstract the principles of topological thinking, we could see that is not the state of an object that matters but the transformations that it goes through. Or, if we were to take that in a more philosophical level, we don't care so much about the being of an object, or whatever it is that we are studying, but we focus instead on the becoming of an object. If we consider the classic example of a cube morphed into a sphere, it is not really the sphere or the cube that we care about; it is the cube becoming a sphere - or the sphere becoming a cube - that is of interest (as in Terminator 2: it is not T-1000 as a human or T-1000 as a small lake of liquid metal that has an impact on us; it is the small lake of metal in a state of becoming human that is the most frightening). Consequently, identity is defined through difference: it is not what something is, but what something is in the process of becoming that matters, and therefore the differences between the stages of the transformation are the ones that are helping us identify it as the same object. On a different level, topology can help us understand a little better - or see from a different view - the difference between constants and variables; what are the things that have to remain the same and what are the things that can change values, in order for something to keep its identity.

During the last six years I have been working quite a lot with blend shapes and morphers, as a useful tool to study the above, and therefore developed several simple tools to help me deal with morphing. My main aim was to have tools that would allow me to use the different (but topologically equal) version of an object all at the same time, in the context of a field (see this post for more on fields). The concept for all of them is simple: an array of one object that gets locally differentiated according to specific factors. As a side note, all of them are more like a base to expand upon than fully developed tools.
1. surfaceBlendShapeField.ghx: this is a grasshopper definition that takes the idea of a blend shape and distributes it in a field. The local differentiation is based on the distance of each element from point or/and curve attractors. Quite primitive in relation to the next ones, but it can be easily expanded.
2. morphField_v1.ms: This is the same idea implemented in maxscript and it is much more robust than the rest. It is installing expressions that are controlling the value of a morphed target in all the objects of the field.

3. blendShapeFieldWithAttractors_v1.mel: this is the exactly the same as the above, only that it is implemented in mel for maya. Also, it is a little bit less user-friendly than the maxscript version - as is always the case with maxscript vs mel for me.

4. fluidsToBlendShapes.mel: This is a similar idea, implemented in mel, only that it is not using points to drive the blendShapes, but the density of maya fluids, which can give some very interesting results. Both mel scripts were initially written for the SKG in flux workshop that took place in 2009 with some minor updates added to them later. This an animation produced with the last script during the workshop:

Fields part I: Orientation

Wednesday, December 1, 2010 § 3

Fields have been an issue in architectural discourse, at least for the last 25 years. Stan Allen in his – now classic – text “from object to field” specifies some of the properties of a field. One is multiplicity. Fields are always multiple, since they are made out of a large number of individual elements, but most importantly because they allow multiple connections/relations between those elements. Then, they have a non-hierarchical character. Each element of the field is equal to all others, and gets differentiated from them due to local conditions. Also fields are inherently expandable (Allen uses the example of the Cordoba Mosque to illustrate that): A field can be expanded, virtually to infinity, without changing its inherent rules and syntax.


Computation added the tools necessary in order to study such field conditions. The element of a field is in its essence – no matter what its visual representation is – a vector. A vector has – at least in Euclidean space – a length (or magnitude) and a direction. Therefore a field of vectors becomes the ideal tool to represent, to study or to create flows (of energy, of matter, of information). And it is as such that the field has been used most successfully in computational experiments in architecture. Object-e has been involved in several such experiments during the last 5 years, which resulted in several (projects) but also in several tools created in order to extend the functionality of existing software in such directions. So this post is one of a series that will present some of those (simple but sometimes useful) tools and make them available for download (provided that I find the time to sort and clean those scripts a little bit…)


Orientation_field.ms is a script of this kind that does what the name implies: alters the orientation of a field of objects based on the distance of each object from several attractor points. Therefore focuses on one of the properties of the vector (direction) and it does so quite literally. The script is simple enough, but it serves as a good base in order to expand it more and enrich it with more functionality (and meaning). An earlier and even more primitive version of that script was used for Axi:Omes’ Digital Fabrication Lab project, 3 years ago. Of course the really fun part was actually (and manually) building that nice and clean digital model, which meant cutting, bending, sanding, drilling, threading and putting in place hundreds of steel bars, each one of different size and rotation. I think that it was all that work that gave meaning to the project. I miss those days…

CA Landscapes pt. I

Friday, November 5, 2010 § 2


Two abstract landscapes, exploring the notion of vertical algorithmic growth. A CA is the basic algorithm, and it then gets interpreted into geometry. Those two images are actually early sketches. Hopefully more will follow in that direction.
Also, I am afraid that I drove my pc to its limits with this model counting 7.870.016 polygons. Somehow you always seem to need more computational power...

Glowing Cloud - Parametric Model

Saturday, July 3, 2010 § 6



more on the project here.

Glowing Cloud

Friday, July 2, 2010 § 0




Glowing Cloud is a proposal for the open space between the existing building of the Hellenic World Foundation, in Athens, Greece. The canopy structure has been generated through an attractor field that encodes information regarding lighting conditions and possible movements. More information for the project here.

Sphere Packing vs Sphere Growth

Friday, November 27, 2009 § 2

According to wikipedia, sphere packing “concerns arrangements of non-overlapping identical spheres which fill a space”. A classic problem in mathematics and computational geometry, sphere packing can be regular (where the centers of the spheres form a symmetrical lattice) or aperiodic. While regular packing can be of some interest, aperiodic configurations can yield some extremely complex and interesting results, that are worth studying…



You can find a simple sphere packing algorithm implemented in maxscript here. However, in my way to create the algorithm, I made a small mistake; I forgot the obvious: to check that the created sphere was actually inside the volume that I was trying to pack. Which gave some very interesting result, as seen in the second image, that resemble a ‘sphere growth process’. Mistakes in scripting are usually annoying (especially if you can not find them) but sometimes are the best way to discover new directions. This second version of the script is here. The two versions of the code are almost identical; one conditional less for the ‘growth’ option. The last two images show triangles created between the centers of the spheres.

Fields of noise

Tuesday, July 28, 2009 § 5

Noise is an unwanted random addition to a wanted signal [...] In Information Theory, however, noise is still considered to be information... (from wikipedia.org)

I would add, that sometime noise is the information. In these images an array/field of boxes is created, using the noise3, noise 4 and fractalNoise functions that MaxScript provides. The function is affecting each time the scale of the boxes.


More CA...

Monday, July 13, 2009 § 0

I was playing with MaxScript, trying to see how I can rewrite the .mel ca script and at the end I came up with a much more elaborate version for 3ds max, that implements 18 different sets of rules.
CA are quite critical for what I am researching right now (self-organization that is...). It is really impressive how different classes of rules produce different results, from quickly normalized ones to totally chaotic (rule 30).
The script is available for downloading at the tools section.

1D CA examples

interactive wall

Thursday, January 10, 2008 § 1



A study for an interactive wall, developed together with Fotis Vasilakis. The idea was that a tiled surface will react to the presence of people close to it, which will cause the tiles to rotate around their vertical axis, locally. Obviously an idea like this has to be based on sensors in order to operate, however is still in a very primitive stage.
This study was implemented using expressions and wire parameters in 3dstudio max.