PDA

View Full Version : How to work with Strength Maps and Bones


halfworld
08-12-2008, 08:45 PM
Hi everyone,

So, here is a small 'EITG explanation' of how skinning works. In fact, it's really only about one detail that's the source of many misunderstandings. There is a video tutorial at the bottom that will explain how to add a strength map with correct falloff. I realise this isn't a discussion of new features, I'm just adding some clarification.

We start with the very basics, you can either read this or skip to the video, but, please read the summery at the bottom.

1. Bones

Let's consider the simplest example with only 2 bones

http://homepage.mac.com/cake_or_death/wmaps/0.jpg

This red cylinder is how the left bone has transformed the original

http://homepage.mac.com/cake_or_death/wmaps/1.jpg

And the blue cylinder is the right bone transform (in this case unchanged).

http://homepage.mac.com/cake_or_death/wmaps/2.jpg

Think of it like this: each bone creates a "target" that's finally mixed together to get a skinned model. Ok, here's the little but important thing:

We can mix (like morphing) the red and blue cylinders in many ways. We can affect this mix by bone strength, length, falloff and weight maps. Doing all this changes the weights of the "targets". The targets themselves (the red and blue cylinders above) are deformed/moved only by bone transformations.

In other words, the skinning engine does NOT do any mixing between the "fully skinned" skin and the "original" group. It's technically correct, and it shouldn't do that. That is the cause of numerous misunderstandings. The video below explains this difficult part.

2. Weight Maps

Ok, now let's apply this basic rule to a solid practical task:

- The same weight map is applied to all bones. Why doesn't the map have any effect?

It shouldn't. The weight of each "morph target" is multiplied by same value (of the weight map). So, the final averaged result remains same. The solution - different maps for different bones.

- When I paint a map fully black, the skin breaks....

If it's a single map applied to all the bones - yes, it will. The situation in which the "weight of all targets = 0" is undefined and has no rational solution. Really, what should we do with a vertex that's not affected by any bone? Thus user is responsible for the fact that all parts of a skin should be affected at least by one bone.

3. Video

So, that's quite technical, and I've no doubt that many of you, like me, were wondering, so how are we supposed to use this system?

http://homepage.mac.com/cake_or_death/wmaps/wmap-crash-course.mov (22megs)

Take a look at this short video, it will show you how to use wmaps.

4. Summary

The skinning engine drives the WHOLE group (that's intended). EVERYTHING (each vertex) should be affected at least by one bone. You should NOT have any "orphaned" vertices, their behaviour wont be correct. A "mix" between "skin" and the "original group" is NOT the task of the skinning engine - it only mixes between bone transforms.

Brian and Alonzo have pointed out much of this in their very helpful videos.

5. Bugs

Post your bug projects. We will endeavour to fix any bugs we can reproduce. Please post a bug project, with a report (listing steps to reproduce the problem). We are taking a fresh look at all of this.

Look for news late this week/ early next week regarding EIAS.

Best,
Ian

halfworld
08-12-2008, 08:53 PM
Here's an example of some Strength Maps that we shouldn't expect to work:

http://homepage.mac.com/cake_or_death/wmaps/project.png

This is the bone hierarchy. Each bone has a weight map (nothing bad in that). Here are the maps.

http://homepage.mac.com/cake_or_death/wmaps/s1.jpghttp://homepage.mac.com/cake_or_death/wmaps/s2.jpghttp://homepage.mac.com/cake_or_death/wmaps/s3.jpg

Having read my previous post you should spot what's wrong here. There is no 'free' bone here to pick up any left over vertices that are unpainted (remember the 'free' bone in the project in my video).

Look what the maps looks like when added together.

http://homepage.mac.com/cake_or_death/wmaps/together.jpg

As you see there are some areas that are black even when all three maps are taken into account - so what bone effects the vertices in these black areas? There is no bone to affect these areas, thus, the result will be irrational. As Brian has said, the result of combined maps needs to be 1 for every vertex. Here, most vertices are receiving a 0 value.

I do not intent to say our system is perfect, just, this is how to use it (for now ;),
Ian

Vizfizz
08-13-2008, 02:42 AM
Hi Ian,

Technically accurate, but functionally awkward. The workflow in EI is counter intuitive from the standard weight map system we find in most applications. (And I'll explain why) Although the movie you've created shows proof that grayscales are at least functional, they do not operate (or look) as one would expect. I am preparing another video to demostrate the difference between EI's solution and Maya's.

Vizfizz
08-13-2008, 08:32 AM
Hi Ian,

Ok..while creating this video I've come to some new conclusions.

1. Electric Image creates an initial weighted bind state that is invisible to the user.
2. The initial bind state is only directly modifyable by some select tools. They are:
- Weight Min
- Falloff
- Bone Max
3. Additional bone tools allow for further modification to the intital bind state:
- Range Limits
- Strength by length
- Magnets(?)

Other than with these tools, the user is incapble of directly altering what the base skinner provides. Knowing this would not be enough, the original programmer provided us with Strength Maps. These strength maps do not operate like traditional weight maps they seem to act "on top" of the initial bind state. Plus EI weight maps do not portray the original binding solution in the map. The lack of accurate visual representation of the total solution confuses the user.

Most traditional applications do not distinguish a difference between the initial bind state and a weight map. (Per se). Maya simply calculates a solution for each bone and generates an individual weight map for each that is accessible by the user. Its skinner will redistribute the solution if the user alters the number of max influences or redistributes the solution though the paint weights tool.

In EI, the Strength map is not visably combined with the initial bind state solution and the user is left having to tweak the combined solution with two totally different sets of tools, but only being able to see one of them. The automatic solution (powers, bone max, weight min, and so on) and a manual solution (painting). Either we get a means to see the total solution in the paint window, or we find a way to convert the automatic solution into a total "painted" manual solution.

I have even greater concern as to how EI's skinner redistributes vertex weights especially when the user can't even see the total solution to make informed decisions in the first place. You're almost left swinging in the dark. Additionally, I suspect the skinner is accidentally making some calculations that zero out weights for verts and the result is verts completely loosing their binding to the skeleton.

I chose the wrong set of words when I said we need an autoweight map tool...what I mean is the user simply needs visual and editable access, through the paint tool, to modify the intial binding solution directly. The users have made a logical disconnect as to what they're are painting and what they are seeing happen to their meshes.

Here is a video of what's going on:

http://www.paralumino.com/CG_Talk/Strengthmap2.mov

If the video fails to load its because its still uploading. Its 1:30 am here in CA and I've been staying up way too long doing these videos the past several days. If you're clicking the link right now...you've got about 20 minutes until the upload is complete.

halfworld
08-13-2008, 02:27 PM
Hi Ian,

Technically accurate, but functionally awkward.

Hi Brian,

My goal here was not to comment on the system, just explain how it works.

Your ideas are very interesting however. I will discuss these with you off the board.
Best,
Ian

Vizfizz
08-13-2008, 03:51 PM
Hi Ian,

Didn't mean to sound insulting. I guess my goal is to point out the primary disconnect users are experiencing with the tool.

FelixCat
08-13-2008, 05:01 PM
Brian, Ian, both are the biggest assets that our CA dreams have. Thanks a lot for your efford. I´m reading all of your posts (and seeing the videos) with the greatest attention. Hope somebody, inside the high ranks of EiAS, is doing the same.
Great work!

FelixCat

ediris
08-13-2008, 05:23 PM
I just realize now after seeing your videos what i was doing right and wrong.
Exporting as FBX my object from C4D is broken, Weight Maps are way off is not saving the skinning.

Convrting them to bones it exports them in the right pplace but it doesnt give me the advantage of FBX which is wighted maps. It gives me out a list of the various bones as in the video but when i select the bones it just gives me some wird results. ;)

Hey guys please fix these feauture in EI seems like weight painted in Maya works for all the users. But not for C4D users.

If we had a decent Skinning system i wil not have to go thru all these hustle.

Thanks
Edgard

halfworld
08-13-2008, 05:34 PM
Hey guys please fix these feauture in EI seems like weight painted in Maya works for all the users. But not for C4D users.


Hi Edgard,

I don't understand the problem, send me an FBX file with a list of steps to reproduce the problem and I'll do some tests. The issue could be with C4D FBX export, or EI FBX import.

Best,
Ian

bearthw
08-13-2008, 06:25 PM
So I took my test project (which looks much like the examples here! :) ) and added another bone - essentially a holder bone - attached it to the mesh, make a strength map that was full strength over the entire mesh, and voila! it works.

After Brian's videos, I suspected that was the case, and Ian confirms it here.

I will have to stand by Brian's assessments that there are workflow and expectation problems here, and I think the best would be giving users access to the strength maps that are there by default, and allow us to paint from there, instead of starting from scratch.

Anyway, good follow up guys.

--Bear

Vizfizz
08-13-2008, 08:05 PM
Users are stating there is an audio problem in the last few minutes of the video. Will reupload when I get back home.

ediris
08-13-2008, 08:43 PM
You can skin your FBX file and than export from your modeler another copy of the same modle as OBJ or FACT. And have the same skinning apply to the surface, but it looses its abilities to show them in the Strength tab. Isnt it something.

For Maya guys it does work maybe is there something with C4D not being able to freeze the bones, if you convert joints into bones it just the same thing than doĦing it from scratch inside animator.

halfworld
08-13-2008, 09:08 PM
Anyway, good follow up guys.

--Bear

Hi Bear,

I'm really glad you got there, the 'stabiliser' bone thing is really the crux of the matter.

Yes, we used your project as the base for all our tests on the beta server, without it, I'm sure I'd still be asking for explanations! Many thanks to you and the other users for pointing all this out in a way that we could understand. We are now aware of the next steps to take with CA.

Best,
Ian

Vizfizz
08-14-2008, 01:34 AM
Here's a mathematical solution to the weight map equation:

Initial Bind (100%) + (Number of weight maps equaling 100%) / 2 = 100%

So if we have 4 weight maps the equation would look like this:

100% + (25% + 25% +25% + 25%) / 2 = 100% solution

If the painted weight maps doesn't add up to 100% then there will be orphaned verts. Which could result in those verts obtaining a solution of Zero and thus loosing the bind.

Vizfizz
08-14-2008, 01:47 AM
Some method is needed to ensure that the painted weight maps add up to 100% without having to dump a full strength map into a spare bone. Sure, that may be a quick fix, but its messy.

The answer is simple. Allow the user editable & visible access to the initial bind state immediately and use the paint paradigm to redistribute the solution throughout the number of influences derived in the Bone Max setting.

If that is not possible... then something else will have to determine, either through visual feedback or something that the painted solution has reached 100% and can now be effectively combined with the initial bind state.

Vizfizz
08-14-2008, 04:23 AM
Yup.. problems with the audio. Will fix and upload.

Vizfizz
08-14-2008, 05:44 AM
Some new tests are showing my "math" theory may be wrong. Wow.. this thing is a puzzle.

Still testing.

AVTPro
08-14-2008, 07:01 AM
Some new tests are showing my "math" theory may be wrong. Wow.. this thing is a puzzle.

Still testing.


Was I right? I think the InitBind is hogging the 100%. Only when you cancel it does it have values for the manual map. I don't think it combines or reaverages values correctly. It's 100+100 and kicks out the extra 100% because it first 100 is occupied. It set priority on a first come basis and ignores the user defined maps...which is what we see. Only when you invert, setting the default Bind to zero, does the manual bind values come into play. It's like you a full glass of water, and you have to pour water out to put more in.

I don't think it matters how it arrives at the problem, just how to fix it.

We need to see the default bind maps, then I don't think we will ever need user defined wmps. I actually think the whole strength map is based on an old paradigm of multiple bone per one map. This all should have been ripped out when FBX changed the strength map model to One map per bone.

I don't think Maya allows the user to add arbitrary maps, just arbitrary bones and the maps is always generate for that bone once it's attached to the skin.

If we leave arbitrary map generation then it a bone has to be manually assigned to it which is redundant if we can see the edited bind. I think this is the problem or confusion before to the pre-FBX and the post FBX methods. Pre FBX needed manual weight maps, Post FBX already comes with visible maps.

Strength Maps are obsolete.

The purpose of adding a strength map is to reassign weighting values to a new bone. Why would you need to add a strength map unless you were adding a bone? If you are adding a bone, and the bone generates and recalculate it's on map by default into the skin, would you manually need to add a independent strength map? You wouldn't need strength maps.

Again I'm not debating which is better, One map per bone vs. Multiple bone per one map.

I'm saying this is way it use to work and why it doesn't work now. Strength maps and attaching bones to the map is unnecessary if the initial bind is visible and editable.

1. Just show the default bind maps, edit map
2. New bone are added and the skin is recalculated. edit the map.

halfworld
08-14-2008, 07:45 AM
Hi Alonzo,

From everything I have seen, the EI skinning system is designed to work - 1 map for 1 bone.

Of course, visualising the initial bind is possible at some point (it adds no functionality, but, can make working with the current functionality much easier). Once people are settled that this is the way forward, the development team will discuss the idea thoroughly.

Best,
Ian

AVTPro
08-14-2008, 08:07 AM
Hi Alonzo,

From everything I have seen, the EI skinning system is designed to work - 1 map for 1 bone.

Of course, visualising the initial bind is possible at some point (it adds no functionality, but, can make working with the current functionality much easier). Once people are settled that this is the way forward, the development team will discuss the idea thoroughly.

Best,
Ian


Then you haven't seen everything.
Pre-FBX/Post-FBX Strength Maps (http://homepage.mac.com/avtpro5/.cv/avtpro5/Sites/.Public/NoStrength.mov-zip.zip)

:banghead: http://forums.cgsociety.org/showthread.php?f=186&t=662219&page=1

AVTPro
08-14-2008, 04:42 PM
Got some rest. I'm a bit less stressed.

My point was not to debate what works better. My point is: ChangedStrength (http://homepage.mac.com/avtpro5/.cv/avtpro5/Sites/.Public/NoStrength.mov-zip.zip)

1. Strength maps use to be "multple bones per one map". (maybe I'm a dino but that's how it use to be)
2. Strength maps use to be necessary to design weights over mutiple bones.
3. Strength maps are an old method of dealing with skinning for mulitple bones.
4. Strength maps have been changed to one bone per weight when EI implemented FBX.
5. I first mentioned 1 map per bone due to my FBX experience so I am not debating it.
6. When 1 map per bone was implemented stength maps became a hinderance to good skinning.
7. If strength maps hinder the direct use of skinning systems, it's a bug. If the grayscale works yet the skinning does not skin correctly EI skinning is malfunctioning.

I'm not the most experienced EI CA but even I recall the multiple map per one bone system. Look at the old Fred Merlo CATs. I have few project done that way that out perform the current demos I present of one map per bone.

I don't mean to hammer you Ian...but "easier"? Several "PRO/Premier" Users have left because of this INSUFFERABLE PROBLEM! :banghead:

EI SKINNING IS NOT FUNCTIONING PROPERLY!

EI needs to be FORTHCOMING with their awareness of the problem. OK back to work before my client hammers me.

CGTalk Moderation
08-14-2008, 04:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.