Skinning a single-shape character

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Skinning a single-shape character

Post by torncanvas »

I'm working on a Flash game and our company has chosen Anime Studio Pro for character animation. I've been trying to learn things as I go here, but I seem to be running into a problem. Our characters are crudely drawn dinosaurs like this:
Image

That means they're going to be one contiguous shape - at least for the limbs. Flexible binding is obviously out, but region binding seems to be causing quite a few problems, too. I've always been a big proponent of anatomically-correct skeletons, which means my knees and "elbow" joints are toward the side of each limb. This leads to skinning problems since the points on one side of a leg are often closer to the bone from the other leg. I've actually tried putting the bones in the middle of each limb, but that only makes things slightly less horrible. Here's an example:
Image

I've looked through the tutorials, and it seems like I can manually set points to certain bones, but doesn't that make them rigid bound?

Is there anything I can do to solve this problem with the type of single-shape characters we have?

I've found another post where someone was asking for a weight table, and the Lost Marble guy said you can't edit the weights manually like that. However, that was in 2004, and I wasn't sure if something has come along to do that since then. Would this be possible to do with a script? Any help would be greatly appreciated. :)
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

After some further research, it seems the solution is to create a bunch of floating bones parented to the bones that one would want to adjust the weights for.

Is this other people's experience? Is there a better way?
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I do this all the time. I hate to have separate shapes for arms and legs. Well actually I have "separate" shapes but they are part of one big shape so I can have a contiguous stroke but each limb is a separate filled shape. This might help you with these characters if you want a leg to be in front of another leg.

The key is bone offset on frame 0. Read about bones in the help and look at tutorial 3.4 specifically.

You can "stretch" or move the shapes for things like limbs away from the body so the bones are effecting only those areas. Then using bone offset put them back into position.

On frame 0 the characters will look very odd but on any other frame they use the bone offset and it looks correct.

-vern
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

Thanks for the reply.

Our workflow is Photoshop sketch to Illustrator vector to ASP. I guess I didn't realize that you could have compound shapes like Illustrator in ASP, though. How do you get two overlapping shapes to share an outline? Also, do the compound shapes import natively from Illustrator? Or can you only use compound shapes if you draw in ASP?

With the compound shapes, do you have troubles with points from separate shapes splitting apart or overlapping when you don't want them to?
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

The vectors and curves in AS are completely different than AI but actually they have some better features I wish AI had.

For instance the ability to connect the END point of a line to the middle of another line. In AI you would need twice as many paths to create a similar shape in AS. In AI you can't connect a single line's end points to the middle of another line. This to me is why I LOVE to draw in AS. I love being able to quickly and easily create complex shapes.

This is how you would create multiple "shapes" with contiguous strokes. For instance your dinosaur image. Connect a line across the base of the legs and you can then create a separate shape for the body and legs but the stroke around the outside is "contiguous". Those shapes share the same continuous spline.

You can use the "hide" stroke tool to hide the extra lines inside the mesh.

You are probably drawing more "shapes" than you need if you use AI. In AS you can connect "shapes" without the need for "duplicate" lines.

Compound shapes are simple. Draw the two meshes that would create a compound shape. With the create shape tool select both meshes and hit space... BINGO... compound shape. And yes I believe that compound shapes import from AI files.

Read the tutorials and help files on drawing in AS. They will explain with more detail and with pictures too! ;)

-vern
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

I've been looking around a bit, and you definitely seem to be the superman of the forums here when it comes to answering just about anyone's questions quickly, accurately, and in a friendly manner. Thanks. :)

Yeah, I've gone through the tuts a little, but it's hard to spend too much time in them and get stuff done at the same time...

I saw that you could connect to midpoints, which is pretty sweet. I figured that's what you were referring to earlier when you said compound shapes.

I didn't find a section in the manual yet about making official compound shapes, though. That's cool you can do that. And being able to import those from Illustrator is a big plus until we can discuss changing our workflow. Thanks for all the information!
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

You absolutely need to build separate legs! If you build your beast in just one shape, you can't have one leg go over another because the fill colour will vanish in the overlapping area.

Since your legs already are coloured differently from the body, it shouldn't be a problem to keep them separate. I don't see a problem with faking a contiguous outline. As you see in the example, you can switch the stroke on/off between two points (but not animate this!), I just animate the point where the stroke ends to adjust it to the outline of the body.

Image

By the way, you don't happen to need another animator in january?
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I just was crazy enough to try it myself. Here's the result:
http://www.slowtiger.de/examples/dino.mov

Building and rigging was fast, but the necessary point animation to get this "one line" look is much work. A character like this could much easier be animated bitmap-wise, re-drawn every frame, IMO.
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

Wow, you guys are a ton of help, thanks!

We haven't come to a final decision yet, but for now we were planning on having the legs never overlap. I'm not completely sure how it's going to look, though.

Nice animation. :) That's some initiative right there. I'm not exactly sure what our situation will be in January. Can you just drop us an e-mail? You can find it on the contact page of our website.

Thanks for the advice. I think we're going to try sticking with skeletal animation for now. It's possible in the future that we'd be using in-engine skeletal animation, so starting now would make the transition easier.

I've actually been sticking with the one-piece bronto and just using a bunch of floating bones. It works surprisingly well. Has anyone set up a rig and animated before this way?

Also, being able to set up a bone with more than one control bone would be nice. But you can only have one control bone, right?

I wasn't sure if any of Vern's scripts could handle that. I'm totally new to the whole scripting thing, though.
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

Yeah, I think you guys are right after all. The legs look totally webbed when they spread out. :P

Thanks again for your help.
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

If you still want that effect of the stroke without the legs overlapping I would suggest you put the stroke on the layer.

Use the shadow on the layer settings. Just don't set any blur or offset. You can fake a stroke.

Now you can have the legs as separate shapes if you like no strokes they blend right together. The stroke is only on the layer.

-vern
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

Oh, SNAP. Now that's a good tip. :) We used to do that in Photoshop to get a double outline.

I've been talking to our programmer, and we've been trying to figure out a way to procedurally apply the outline with ActionScript 3. That would allow us to dynamically play different facial animations without it affecting animations on the body. But the problem is that damn contiguous outline. So we need a way to create one in AS3, and I think we might be able to use some effect like your example to make it work.

woot.
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Hm ... it still would be faster to draw this by hand in Mirage ...
User avatar
torncanvas
Posts: 34
Joined: Wed Oct 31, 2007 12:22 am
Location: Des Moines, IA
Contact:

Post by torncanvas »

I found a solution. It's funny how the best solutions are often the easiest/hackiest. I'm simply going to put some shapes that are the same color as the body over the top of the separate shapes that have outlines, so that the outlines are covered up. Kinda like a mask.

slowtiger, yeah that could be. However, in addition to setting up the workflow for potential in-game skeletal animation down the road, we need to use it to attach things to the dinos procedurally in-game. For each new object we make to attach to the dino, we don't need to animate separately to match up with each animation for each dino. We just note the offset from whatever bone it will be attached to. Plus, once we have the offset, we can change the animation or add new animations. It gives you a much less destructive workflow and decreases file size since you have less baked animations. Since its non-destructive, we could be polishing the animations up until release without having to adjust the attached pieces.

This also has the side benefit of attaching limbs and the head procedurally, so that limb and facial animation can be done independently of body animation. This could allow us to do things like have the dino chewing on food the whole time while the player tells it to walk back and forth.

So in the end, skeletal animation is more flexible and will save us time, but at the penalty of being slower at first.
////////////////////
http://www.intuitiongames.com
http://blog.intuitiongames.com
////////////////////
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Of course a statement like "this way is faster" has to be put in context. How often will the character be used, is it a one-shot or a series, and so on.

I wonder about one thing: do you use Flash just as a production tool for doing the animation, or do you want to program the whole game in Flash, and will it be on CD or played in a web browser? (I'm working on a Flash game project myself which will be online in the near future.)
Post Reply