I've recently started to use transform constraints with better success than before, and I love them. However, I've been unable to do one little thing...
This is my torso setup...:
It supports scaling the whole thing -25/+25% fairly well, so I won't need to deal with multiple images for different cup sizes, which will be a HUGE time saver.
However, I have a little problem with the bra lower control bone. I've used a transform constraint, configured like this...:
That is, it's influenced by the position of the first chain bone on the breast. However, after some testing it's not going up and down too accurately when downscaling...:
So, I had the idea of using a path, parented to the main torso bone, and I constrained the control bone to it, like this:
Now, by changing its position value in the path, I get better results...:
Then I expected (maybe too naively) that using both path and transform constraints would make the bone move its vertical position on the path, following the target, but also staying in the path line, without going outside horizontally.
However, this is what it actually happens when downscaling...:
It's there, fixed in its manually set position.
And if I change the order of the constraints, I just get the control bone following the target bone, as before, completely disregarding the path.
So, my main question is if there is some way that a bone could travel along a path, following a transform target.
And if that's not possible, do you think this would be a useful feature to have?
If not, because there is another way of doing what I intend, could you pretty please enlighten me or point me to the right documentation?
I've seen this kind of setup before. Let's shift the question. Do you actually need to complicate things so much? Chests can be successfully animated, readapted and scaled using just the torso bone, and one bone for the chest. Since they are round, and anything round ends up being a nightmare to rig, the simpler you can get, the better. One bone placed in the middle of the circumference allows you to scale it down or up, rotate it, shear it, and translate it, so complete artistic freedom is ensured. If you want to get fancy you could have a skin constraint to influence the baseline scale of the bone, readapting all animations that involve the chest bone pretty quickly.
Don't forget a well structured mesh with proper weights can get you a long way and make additional skin customization far easier to implement later.
Here's two tips examples that show a similar principle to the ones I mentioned.
You can animate a bone for the maximum movement, then adjust a transform constraint's mix (in the editor or at runtime!) to control how much that aspect of the animation is applied.
Thanks for your response. I really appreciate the effort. I humbly think, however, that we're diverting from the main issue, but I'll bite for the sake of interesting brainstorming.
In my experience, I need to use four separate bones plus the nipple one, at a minimum, to have full control in every (character) angle. Sorry for being so crude, but boobs don't move like cartoon hats. I usually give less range of movement to the lower bones, to simulate that area is "more attached" to the torso than the upper/front ones. Also, I need multiple bones to offset them, so the secondary motion is more believable (and fan-serviceable).
I'd show you my work to illustrate what I mean, but I don't think you guys would appreciate that... :giggle:
That said... yes, I actually was doing good enough without paths in my previous game. I only used those five bones, without the extra path constrained bones, and nobody complained.
Then I saw a colleague using them, and although I agree with you it's unnecessary to just animate the breast, what I've found is that they excel in maintaining perfect alignment with the underlying layer (the torso in this case) because both ends of the path are fixed in their torso positions.
This means I can downscale and upscale with complete guarantee the upper part of the breast will follow the chest line (torso and breast are different images). So, I switched to this just because of that. I know I could create a torso-parented bone for just that, not a whole chain, and then fine-tune weights so I get the same alignment... but that takes me to the real reason I'm doing this...: I don't want to fine-tune weights.
And that's because of the impossibility of linking meshes outside their original slots, which I ranted about in another post for a long time. Nate said it might be a feature before this year's fall, and I'm really hyped at hearing that! But, in the meantime, if I want to add tight-fitting clothes on top of "flesh" parts, it's a nightmare to re-duplicate and re-assign all of them, just because I decide to re-tune some vertices a bit on the original mesh (the breast in this case).
The thing is, the breast you're seeing in my example is actually two images: the breast proper and the bra covering it. They both need to be weighted exactly the same to avoid texture popping. Now add the rest of the wardrobe and you'll have your personal Hell served.
"So, why don't you merge them?" Because I'll have multiple skin tones, and just imagine the combinations of dozens of clothing type+colors, plus five planned (if not more) skin tones.
No, I definitely need to avoid tuning meshes. At least in this critical area.
I know this is expensive performance-wise but I'm just an amateur making adult 2D games for a living and I also code myself, so I don't expect the programmer complaining. :bigeye: My main focus is avoiding micro-management, well over performance.
Now, returning to my real question... :p
I was actually asking about the bra on the torso. It's a different image and my issue is that it's not following the torso line accurately when I downscale the whole thing.
That's why I made a path parented to the torso. In my mind is the most straightforward way to make sure the bra front is always where it should be: the limit of the torso image.
But if the position of a bone in a path can't be influenced (or offset) by a transform constraint (which is my wish), then I won't be able to do what I intend, which is the bra follows the breast along the torso when the former is scaled, without me doing anything more rigging-wise. The main goal is that I later make animations that look well in any breast size.
I know we could debate endlessly about what road to take to go to Rome, and I'm not claiming I know everything there is to know. You'll probably do a better job with my setup, even with these technical requirements.
But now I'm really curious about my question because I humbly think it would be very useful from a generic standpoint, don't you think? :think:
If you guys don't think is a viable and/or desirable feature, no problem, but I'd need to clear this up now.
Thanks for reading the wall of text. :grinteeth:
Edit: Just to clarify (much) better what is my final goal, what I'd like is this happening...:
That the lower bone moves with the upper bone locally.
However, I can't make that work with a transform constraint, for the life of me.
Then I've searched the forum and found some posts mentioning how useful it would be to have X and Y separated, so we could make constraints that only affect one axis...
Is this what Spine needs to be added so I can do that? Is there no other way to do it in the current version? :rolleyes:
My bad, I was initially focusing on the chest rig, and didn't notice the real issue, which you are right, is much clearer in the video you posted as I had been looking at the wrong thing the whole time.
Abelius wrote
I'd show you my work to illustrate what I mean, but I don't think you guys would appreciate that...
We should really consider adding a spoiler tag to protect the eyes of the children but still appreciate such rigs!
Abelius wrote
what I've found is that they excel in maintaining perfect alignment with the underlying layer (the torso in this case) because both ends of the path are fixed in their torso positions.
Interesting, I guess it's not so easy to appreciate without seeing them in action so I'll trust you on it.
Abelius wrote
I don't want to fine-tune weights.
Ah, that explains the main question I was pondering on! I personally find it enjoyable since I use very little vertices and it's possible to copy and paste their positions across meshes making our lives easier, but I get it that it's not everybody's piece of bread.
Ah, so you're fine-tuning meshes after, I get this too. Although I think I'd personally have two linked meshes - one for the skin and one for the bra, and fine tune these two, but in a perfect world I'd totally consider having a single convenient linked mesh structure as well (after all, the different skin tones can reuse the same linked mesh already!)
Abelius wrote
I was actually asking about the bra on the torso. It's a different image and my issue is that it's not following the torso line accurately when I downscale the whole thing.
That's why I made a path parented to the torso. In my mind is the most straightforward way to make sure the bra front is always where it should be: the limit of the torso image.
But if the position of a bone in a path can't be influenced (or offset) by a transform constraint (which is my wish), then I won't be able to do what I intend, which is the bra follows the breast along the torso when the former is scaled, without me doing anything more rigging-wise. The main goal is that I later make animations that look well in any breast size.
I now understand the issue.
The first usual answer is: This may be a problem of constraints order: Constraints: Order
You mentioned you already took care of it, so perhaps other orders need to be tested, or we have to ditch this particular setup.
I think I may have a different solution to offer but I'd need to check if I can actually apply it to your case, are you perhaps able to share your rig so I could do some tests? I just need the torso image and the pesky bra part, everything else can be deleted.
In case you can't, here's a minimal project that reproduces the idea of having a constraint only influence one direction (X or Y) but not the other. I tested it in several directions and it might just do the job. You'd have to add a child bone that doesn't inherit scale and the parent bone scaled to 0 for it to work properly, but it should work!
What do you think? Could this be a feasable solution?
I'm not sure it will work in this case, but I'll have fun finding out, lol. I'll experiment a bit and return to you.
I have no problem with sharing my project, even less when it's for receiving help, but I need to do my homework first.
Thank you!
Edit: Okay, I give up. :p
Well, actually I almost managed to make it work, as the second example of the project you sent. After some adjustments and a huge offset (because they're actually at 1500 pixels of height), it was traveling the torso line perfectly.
However, I also needed to parent or constrain the scale modifier to the torso bone. Otherwise, the child would stay in place when bending the body.
So I did it, and yes, the scaler travels with the torso edge... but the child does a very weird "up and down" effect when bending right or left. In fact, if you do a full 360º rotation, the motion it does reminds me of Earth's magnetic field, lol.
Also, the lack of fine control makes the bra overreaching hard when bending the torso, regardless of the previous issue.
In short, I don't think I'll be able to use this solution for something so dynamic as a human body. If it was some mechanical contraption, maybe.
I'm grateful for your help and suggestion, but to be honest, I think what I proposed in a previous post would be much better for this case: use a transform constraint to influence or offset the position of a path constrained bone or bone chain on a given path.
I can think of several advantages to this approach...:
A path can begin and end on two specific points, making it possible to set limits to how far the bone goes.
It could be non-linear, using Bezier curves (good for round body parts).
It could be editable and deformed as needed in animations.
All the bells and whistles of path constraints (which are many).
In this case in particular I would just create a short path from the point where the breast is at 75% to the point where it's 125%. I would curve the thing so the bra looks good in all its "travel", and then set the control bra bone at position 50.
The "only" thing missing in that simple setup is the possibility of automatically add or subtract from the position value, according to the position of another bone.
But you must be wondering why I need this to happen automatically, right? Well, it's because the world position of that "influencer" bone won't be actually moved on purpose, but by the effect of having a parent bone scaled up or down. That master breast bone scale is the one that I'll modify in Unity, according to how... ahem, developed a female character is.
Anyway, even if you people were to add this thing on a future update, I couldn't wait for it. :p
So, I'll better not use a breast slider, lol. I'll just use preset constraints for a limited number of cup sizes. That should be enough for my players.
Thank you so much for your assistance! :grinteeth:
Did you consider to weight the path extremes to a bone/two bones that is/are constrained to the aforementioned structure you had? Perhaps this may be the perfect solution for your case! I did a similar setup to have a thunder connect several parts of a rig no matter where they were, so maybe this may help?
You relocate the bones, then bind the path so that the bone constrained to the path always stays within the limits you set.
Let me know if this idea may work better for your case!
Sorry for the late reply. I've been working on those "fixed size" constraints for a while, and they turned to be good for now, so I semi-forgot about your kind suggestion.
I think I tried to weigh a path at first, yes. But I'll admit I gave up fast, after the first issue. Now that you mention it again, yes, I'll give it a try, thanks.