Is there a way to create bones from a vector curve? I mean, create bones on the spaces between two points.
I need to make complex paths of bones to work with techniques similar to the snake creeping.
If it would be possible, another sub idea: can the created chain of bones be controlled (moved, rotated and scaled) by moving the points of the curve?
Create bones from a vector curve?
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:
It will be a little complicated.
The bones are in a bone layer and the points are in a vector layer. So there are two kind of layers involved.
If the question is CREATE bones based on a vector path, the bone layer must be the parent of the vector layer (not a problem). The second issue is that the selected points effectively define a curve. Remember that the points are not ordered in the vector layer so you can accidentally select some points that are in different curves. How to know the right order? The points in a curve, I think, can be accessed ordered but when you have the curve selected. But how to select a curve? only the create shape tool has this feature AFAIK.
The second question: influence bones according to points movements. You can effectively "link" a point to a bone using the bind point value. a point can have a single vector as "binder" so the point -> bone is solved. Other issue is calculate the transformation of the point in the global coordinates to the scale/rotate/translate of the bone that is binded to. Remember that position and angle are relative to the parent and the scale affects to the lenght relative to the initial length.
It would be so cool but a bit complicated. I bet that the second one can be easier.
-G
The bones are in a bone layer and the points are in a vector layer. So there are two kind of layers involved.
If the question is CREATE bones based on a vector path, the bone layer must be the parent of the vector layer (not a problem). The second issue is that the selected points effectively define a curve. Remember that the points are not ordered in the vector layer so you can accidentally select some points that are in different curves. How to know the right order? The points in a curve, I think, can be accessed ordered but when you have the curve selected. But how to select a curve? only the create shape tool has this feature AFAIK.
The second question: influence bones according to points movements. You can effectively "link" a point to a bone using the bind point value. a point can have a single vector as "binder" so the point -> bone is solved. Other issue is calculate the transformation of the point in the global coordinates to the scale/rotate/translate of the bone that is binded to. Remember that position and angle are relative to the parent and the scale affects to the lenght relative to the initial length.
It would be so cool but a bit complicated. I bet that the second one can be easier.
-G
- Víctor Paredes
- Site Admin
- Posts: 5818
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
I mean, two points makes just one bone, so a bone would use the place between two points, not more or less. My idea is to have several points. The curve is not relevant (can have smart corners or not), but the points position is.
I'm thinking and testing and this seems to be no problem for paths.
But I don't know any of scripting, and it's difficult to understand all the issues form me.
what if all bones be root bones? would it make it easier?Remember that position and angle are relative to the parent and the scale affects to the lenght relative to the initial length.
I'm thinking and testing and this seems to be no problem for paths.
But I don't know any of scripting, and it's difficult to understand all the issues form me.
I'm having trouble following the process so I'm going to write it out as I understand it so far...
This process would be based on a single non closed "path" drawn specifically to work with the scripts.
1. Create a bone layer with one vector child layer
1. Create a path on the vector layer
3. Run a script to "auto generate" between each point along the path.
4. Layer script added to the vector layer to control the "matching" bones in the parent layer.
Each point of the path would be a named group. Each bone would be named to match the point group. This would be done by the script.
The point order problem can easily be solved by having the user (you) create the path "in order". You have to make sure you add the points in the order of the chain you need. This could be a problem if you need to edit the points in the path later. I don't see a way around it unless the script evaluates the positions of the points on the path to determine some sort of "logical" order. Or a simpler way might be to find the START point of a curve and then just access the next point along the curve (I think that is in the script reference).
Moving bones to follow a point is easy. I did that with my "joint" script. Bone parenting is an issue as Genete mentioned but that also could be figured out if needed.
My thought would be that the chain of bones could be children of ONE other bone rather than a chain connected to each other.
Would rotation of the bone need to be considered? Would the bone need to rotate to follow the direction of the path? This could also be calculated using the "vector" to the next bone (my "aim bone" script uses that).
I have not tested any of these details so can't say for sure they will work but it sounds like it would.
-vern
This process would be based on a single non closed "path" drawn specifically to work with the scripts.
1. Create a bone layer with one vector child layer
1. Create a path on the vector layer
3. Run a script to "auto generate" between each point along the path.
4. Layer script added to the vector layer to control the "matching" bones in the parent layer.
Each point of the path would be a named group. Each bone would be named to match the point group. This would be done by the script.
The point order problem can easily be solved by having the user (you) create the path "in order". You have to make sure you add the points in the order of the chain you need. This could be a problem if you need to edit the points in the path later. I don't see a way around it unless the script evaluates the positions of the points on the path to determine some sort of "logical" order. Or a simpler way might be to find the START point of a curve and then just access the next point along the curve (I think that is in the script reference).
Moving bones to follow a point is easy. I did that with my "joint" script. Bone parenting is an issue as Genete mentioned but that also could be figured out if needed.
My thought would be that the chain of bones could be children of ONE other bone rather than a chain connected to each other.
Would rotation of the bone need to be considered? Would the bone need to rotate to follow the direction of the path? This could also be calculated using the "vector" to the next bone (my "aim bone" script uses that).
I have not tested any of these details so can't say for sure they will work but it sounds like it would.
-vern