Feed on
Posts
Comments

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.

As I’ve answered this question a number of times on the forums recently, I’m going to put up a definitive post here. Hopefully anyone who searches for something like “how to pick up and put down an object in Blender” will find this and save everyone the trouble of asking again.

It’s a common situation in animation — a character needs to pick something up, carry it around, then sit is down. There are a number of ways to do it, but here’s the most reliable way I’ve come across. There are a lot of steps, each one critical. Follow this recipe and you’ll be able to do it:

Setup
1. Place your object in its starting position.
2. Add a Child Of constraint to the object, targeting the main hand bone of your character.
3. Your object will “jump” when you attach it to the hand with this constraint, so press the Set Offset button on the constraint panel to fix it.
4. Set a LocRot key on the object. This fixes its starting position.
5. On the Constraint panel, set the Influence slider to 0.0 and press the Key button to record it.

The Grab
1. Animate the hand into place around the object
2. Back up one frame
3. On the Object’s Constraint panel, press the Key button to once again record an Influence 0.0 keyframe.
4. Advance one frame
5. Change the Influence slider to 1.0, and set another Key for it
6. The object jumps out of position. First press Clear Offset then Set Offset on the Constraint panel to fix it
7. The hand now has full control of the object. Animate the hand/body/etc. to do whatever you like.

If a pick up is all that is in your shot, you’re done. However, if you need to sit the object down…

The Drop
1. Animate the hand so that the object appears in it’s resting position, i.e. on the desk, shelf, etc.
2. Back up one frame
3. Set another Key for the Constraint Influence at 1.0
4. Set a LocRot key on the object
5. Advance one frame
6. Set a VisualLocRot key on the object
7. Move the Constraint Influence slider to 0.0 and set a Key

At this point, the display screws up. It shows the object moving back to its initial position. This is an animation display bug. Advance and Reverse the frame counter once and you’ll see that it is where it is supposed to be.

The hand and object are now free to move about independently. Congratulations — you can now do something in 3D in nineteens steps that even a one year old can do in real life!

« Newer Posts - Older Posts »