how? do you wrote the script already?slice11217 wrote:I've done this, successfully, using a separate bone for width scaling that's independent of the length scale. I agree with Vern though, it would be much better to have it all encompassed in one bone.
Scale bones on Y and X axis?
Moderators: Víctor Paredes, Belgarath, slowtiger
- Víctor Paredes
- Site Admin
- Posts: 5818
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
-
- Posts: 279
- Joined: Thu Mar 30, 2006 6:12 pm
- Location: Verona, New Jersey
Yes, that is what I've done as well.slice11217 wrote:No script, just add a bone to a parent bone and attach the desired points to it. Then scale it as needed. It's not the best in the world, but it is an effective workaround.selgin wrote:how? do you wrote the script already?
In my imaginary script the "second" bone "theoretically" wouldn't have any influence on points. The script would actually get the points controlled by the primary bone and scale the points. Since I haven't actually tried this yet I don't know exactly how well this would work.
The other problem is that the bone being "scaled" wouldn't actually scale on the X axis since AS doesn't support this. If it has child bones they wouldn't move as if the bone is scaling which could be a problem.
-----
Holy cow had another epiphany! When a bone is scaled "down" on the Y axis it gets "fat" by proportion. I might be able to calculate the LENGTH of the bone based on both scale percentages, scale the bone down/up and increase/decrease the length.
Let you know if I come up with anything.
-vern
- Víctor Paredes
- Site Admin
- Posts: 5818
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
vern, I was thinking in the bus and have an idea. what if you name some bones with an extension (.sca o whatever), and a layer script recognize them and when one of them is scaled, the script scale the points in x axis too, but inverted (I mean, if height increase, width decrease).
Is that possible?
ok, you hadn't much control over the x scale, but it would be enough useful for squash and stretch.
Is that possible?
ok, you hadn't much control over the x scale, but it would be enough useful for squash and stretch.
Yes that would be a piece of cake. Any time you base one value on the opposite or the same as another value it's easy to do. However, there is the issue of child bones. If you scale the X axis of points controlled by one bone it SHOULD push child bones "away" on the X just as it does with normal Y scaling.selgin wrote:vern, I was thinking in the bus and have an idea. what if you name some bones with an extension (.sca o whatever), and a layer script recognize them and when one of them is scaled, the script scale the points in x axis too, but inverted (I mean, if height increase, width decrease).
Is that possible?
ok, you hadn't much control over the x scale, but it would be enough useful for squash and stretch.
That is the one little tricky part that might be an issue. I'll try to do a quick sample to test this out.
-vern
- Víctor Paredes
- Site Admin
- Posts: 5818
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Vernheyvern wrote:Yes that would be a piece of cake. Any time you base one value on the opposite or the same as another value it's easy to do. However, there is the issue of child bones. If you scale the X axis of points controlled by one bone it SHOULD push child bones "away" on the X just as it does with normal Y scaling.
That is the one little tricky part that might be an issue. I'll try to do a quick sample to test this out.

is it really possible?
Been busy lately. Haven't had time for scripting. I am getting withdrawal symptoms so I might be jumping back in soon. This should be my first choice because it is fairly simple and could be very useful.
I still get frustrated with layer scripts... with only one per layer it's so limiting.
p.s.
The storm on Tuesday that suspended game 5 of the world series knocked down a tree in my back yard... which hit the neighbor's fence... and made a mess. A big dead tree. The tree split, half in my yard, half in the neighbors. Not much damage really but I will be out there with a chain saw for a little while.
-vern
I still get frustrated with layer scripts... with only one per layer it's so limiting.
p.s.
The storm on Tuesday that suspended game 5 of the world series knocked down a tree in my back yard... which hit the neighbor's fence... and made a mess. A big dead tree. The tree split, half in my yard, half in the neighbors. Not much damage really but I will be out there with a chain saw for a little while.

-vern
Well... I tried... but I can't figure out easily, how to select the points controlled by a bone. I can select the points if there is BINDING but I can't figure out the fPtMatrix in the script ref to determine which points are effected.
The fPtMatrix is the "grid" of influence of a bone over the points. This is the "matrix" that determines which points get moved by a bone based on region or flexible binding. Then you add in things like binding and points that are "released" and that just makes it more confusing.
I am pretty sure it can be done, but it's not as easy as I thought originally. I think what needs to be done is to duplicate and "rotate" that matrix as an "imaginary" extra bone and "add" that influence to the original bone. All the code is there. Adding, multiplying, subtracting of matrices is in the script interface. It's just a matter of figuring it out. I worked with AS/lua matrices while working with Genete on his 3D bone rig and also working on my bone group scripts and I did exactly what I described.
I hope those brain cells are still in there. I may have put them in the back somewhere when I started watching reruns of "The Love Boat" on the internet and needed more space.

-vern
The fPtMatrix is the "grid" of influence of a bone over the points. This is the "matrix" that determines which points get moved by a bone based on region or flexible binding. Then you add in things like binding and points that are "released" and that just makes it more confusing.
I am pretty sure it can be done, but it's not as easy as I thought originally. I think what needs to be done is to duplicate and "rotate" that matrix as an "imaginary" extra bone and "add" that influence to the original bone. All the code is there. Adding, multiplying, subtracting of matrices is in the script interface. It's just a matter of figuring it out. I worked with AS/lua matrices while working with Genete on his 3D bone rig and also working on my bone group scripts and I did exactly what I described.
I hope those brain cells are still in there. I may have put them in the back somewhere when I started watching reruns of "The Love Boat" on the internet and needed more space.

-vern
- Víctor Paredes
- Site Admin
- Posts: 5818
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact: