Feed on
Posts
Comments

If you’ve been following this blog, you saw my proposal and skeleton code for a surface deform modifier that would allow you to, for example, do cloth sim on a basic shirt form, then use that to deform a more complex shirt model. I had proposed it to utilize the shrink wrap code for initial pinning, and the internals of the old-style hook code for actual deformation.

The other day, Brecht committed an addition to the Cage Deform modifier which performs this same task. I believe it uses the heat weighting algorithm for pinning, followed by the cage deform method of deformation. I haven’t tried it yet, but it sounds like it will do exactly what was needed!

In the end, I had absolutely nothing to do with it. I’m just happy that there’s now a way to pin one entire mesh’s surface to that of another.

If you want to do camera mapping in Blender, you have two choices: Sticky coordinates or the UV Project modifier. Sticky coordinates are easy to generate, but they tend to fall apart at the slightest provocation. In theory, you just drop into a camera view, put up your background image, line up your objects and make Sticky coords. They are a special kind of vertex-based uv coordinate. The problem with them is that if you move the camera in any useful fashion, they go crazy, making the stuff you’d normally like to do with camera projection not very do-able. The old solution was to use a script that baked the Sticky coords to standard UV coordinates.

I’m working on the surfacing chapter of my book, and needed to use camera projection. Sticky coordinates were not back in Blender 2.5, so I reattached them to an operator. Sticky worked again, but the old grief remained. I’ve tried the UV Project modifier, and did the tutorials, etc., again but still I just didn’t like the work flow. I’ve heard from people who certainly know better that it’s great, works right, yes yes. However, nothing is quite as intuitive to me as lining your objects up in camera view.

So, after some feedback from Brecht and Matt Ebb, I wrote a new UV unwrap type: Project from Camera. Basically, it works the way that Stickies do. Camera view + background image + tweak your objects right there in perspective. Now, instead of adding stickies, you unwrap the mesh using Project from Camera. That’s it! Now you have a UV unwrap that you can tweak if you need to, and we can get rid of stickies forever!

If you’re interested in trying it out before it’s in trunk (hopefully), bop on over to:

http://projects.blender.org/tracker/?func=detail&aid=19862

I’ve added a patch to the tracker. It’s the superstructure for a new modifier, in case some kind soul with a bug up their butt for the functionality previously described wants to show up, write only the hardcore code (the bind and deform) and take all the glory. Let me just say that this modifier will be used constantly, by everyone. Maybe even the Pope. So you’ll have that going for you.

But really, who am I kidding? I’m going to end up fighting with this all weekend and into next week when I should be writing my book.

Tracker link: Similar Surface modifier patch

With Durian in progress, I wanted to share a thought I’d had with both the artistic and development teams. Having tried to use the cloth sim a number of times in a production capacity, one of the critical shortcomings I’ve identified (and one that I’m sure they’ll run into) is the deficiencies the system has with complex clothing designs. I don’t mean high poly counts, but places where in an actual piece of clothing the fabric is layered: cuffs, the doubled ridge of cloth that runs down the front of an Oxford, pockets, lapels, etc.

Obviously, there are workarounds, but I have a solution that I’m not going to have time to implement myself. I built the modifier structure and basics, but once I realized I’d never coded with the modifier system or dealt with mesh data directly I understood that it would require more time than I had, and would be fairly easily accomplished by someone already familiar with it.

I think a good solution to this problem would be a “Similar Surface” (name for artists) or a “Hook Web” (name for devs) modifier. Simply put, the modifier is a “bind” type one, a la the cage deformer. The user creates a fairly simple structure upon which to run a cloth sim (or any other deform technique, actually). Then, the user creates their “high res” clothing, which includes all the nice things like buttons, epaulets, cuffs, pockets, layering, etc. Clearly that would never survive an actual cloth sim. When the user BINDS the high res clothing to the sim’ed simpler one, the following happens:

1. For each vert in the high res, a virtual hook is created. Within the modifier, it would be an array of hook objects (obHook). The hook data structure is deprecated in favor of the hook modifier, but the DNA is still there.
2. Where does the virtual hook attach? The shrink wrap “nearest point on mesh” procedure is used to identify. Then, the verts that make up the identified face of the underlying mesh become the vertex parents of the virtual hook.

That’s it. This would allow complex, multi-layered clothing to be driven by an underlying cloth simulation.

From reading the DNA and modifier code, it appears that everything is already there. We need someone who is familiar with mesh coding and modifiers to put it together. Unless I miss my guess, the Durian team WILL be asking for something like this in the near future.

« Newer Posts - Older Posts »