New: Cage Deform Modifier

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
wavez
Posts: 0
Joined: Mon Sep 26, 2005 10:48 am

New: Cage Deform Modifier

Post by wavez »

I'd like someone to code a new modifier: Cage Deform. It would use a mesh object to deform other mesh objects. The advantage is that mesh objects are a lot more flexible and freeform than lattice objects. Lattice objects always cubes by default, and have tons of verts on the inside of them. Lattice objects are perfect for creating spacial distortions, but terrible for more intricate deformation animation.

The way the Cage Modifier would work, is it would use the base RVK shape of a mesh as the 'rest' shape. Any shape of that mesh other than the base shape would be a deformed version and would deform the mesh that the modifier belongs to.

Koba
Posts: 0
Joined: Thu Apr 15, 2004 9:48 am

Post by Koba »

Hmmm..

Well, harkyman suggested exactly the same thing ages ago and I've been supporting this idea - it really would make softbodies so much easier. Lattices now have weights for softbodies but a cage deformer would be better (and useful for loads of things anyway). Here are harkyman's original posts.


http://blender.org/forum/viewtopic.php? ... highlight=

And on elysiun:

http://www.elysiun.com/forum/viewtopic. ... highlight=

Koba

Eternl_Knight
Posts: 0
Joined: Mon Dec 06, 2004 2:22 am

Post by Eternl_Knight »

Could you give me more examples as to what you are after in this cage deformer, as there are two ways of doing it.

First there is what Maya calls the "wrap deformer". What this does is use the "cage" mesh as a kind of proxy. Each point on the "deformed" mesh is weighted to the faces of the "deformer" mesh and the deformation is based on this. In other words the deformation is intuitively controlled by the POLYGONS that make up the controlling mesh. I already have C++ code for this for a minor project of mine.

Of note, is that in this method - the vertices of the deformed mesh do not need to be "contained" by the volume of the cage mesh, but best results are obtained when using a cage mesh with polygons proximal to the deformed mesh. That is you get good results deforming a high-poly human mesh using a low-poly human mesh scaled and tweaked to cover the same space. However, that same hi-poly human mesh would not deform as well if the low-poply mesh were a cube or cylinder only.

The second is where the cage mesh used is actually defining a "volume" of space. The deformed mesh is embedded completely within this volume (in the same fashion as one would use a lattice), and deforming the points on the cage mesh would deform the vertices of the contained mesh via their placement in this volume. That is, the deformation is intuitively controlled by the VOLuME of the cage mesh (rather than just the polygons that make it up). In this case, using a cube or cylinder as a cage mesh would result in more pleasing deformations on the human mesh.

The drawbacks to the second solution are three-fold.

Firstly (and this one is not a REAL problem), the deformed mesh must be contained completely within the deforming cage. the "wrap deformer" style one has added flexibility in that the low-poly control cage mesh can approximate the high-poly one, whereas the "volume method" must completely encapsulate the high-poly mesh.

The second problem is in the complexity of the "cage" mesh. In the "volume" method - the cage mesh is actually made up of volumetric "cells". These cells, can of course, be calculated automatically but (like all things automatic) this can result in a loss of control over the deformation. As such, most animators needing the best control will want to setup their "volumes" by hand (or vai tools needing development in blender). The "wrap/surface" deformer method can use arbitrary manifold meshes as the cage without any other setup required.

The final problem of the volume method is computational complexity. The volume method requires subdividing the "volume" mesh several times (resulting in a large memory hit) for clean results. The subdivided volume also needs to be recalculated everytime the user wants to apply the deformation - meaning the absence of "realtime" deformation.

I have no problems supplying my code for the "wrap/surface" deformer, but it IS in C++ and would need to be converted to using Blender's internal data-structures & API. The "volume" deformer I have created makes heavy use of templates and is unlikely to be easily converted (hell, I wouldn't do it!).

--EK

wavez
Posts: 0
Joined: Mon Sep 26, 2005 10:48 am

Post by wavez »

EK: I think the first method is a better choice. I know there are others who would like to use the deformer without encasing the deformed mesh inside the deformer. Besides that, I just think the first one sounds like a better approach overall, considering the pros and cons that you have described.

Here are pictures of a character I am working on, and I have been using lattices, but I think I am pushing their limitations for this use, and it is more time consuming, and frustrating at times as well.

http://www.exenex.com/wavez/
Last edited by wavez on Fri May 05, 2006 9:21 am, edited 1 time in total.

wavez
Posts: 0
Joined: Mon Sep 26, 2005 10:48 am

Post by wavez »

:BUMP:

I've used the Cage Deformer in XSI, and I was very disapointed. Lattice objects have the advantage of precision. I've written a proposal for a feature that I think would fill the role just fine. The only thing I would add, is that I think we could use a second kind of lattice shape, a ring shape. Not having round cross-sections, like a donut, but having square or rectangular cross-sections, more like a ring. Combined with the ability to edit the base shape, as I've described here:
http://mediawiki.blender.org/index.php/ ... Characters
I think the user would have a great deal more of flexibility.

nemyax
Posts: 0
Joined: Mon May 31, 2004 12:34 pm

Post by nemyax »

A vote for a wrap deformer-style modifier.

Post Reply