Hi there,
I try to figure out if there is a way to non-uniformly scale bones. I need a
Squeeze and Stretch effect on mesh. Or ist there a better way to achive this.
any advice is appreciated,
Thanks
how to non-uniformly scale bones (Squeeze and Stretch )?
2937 8 1- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- Offline
- edward
- Member
- 7721 posts
- Joined: 7月 2005
- Online
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- Offline
Thanks Edward!!!
It works somehow….
Are there any rules or good ways to connect all those relationships together?
I used an if expression so far. But I noticed that the expression seems not to work after I reload the hip file, and needs to be reactivated manually. It all seem not to be very robost by now.
Do you have any suggestions on this?
Enclosed a hip file
It works somehow….
Are there any rules or good ways to connect all those relationships together?
I used an if expression so far. But I noticed that the expression seems not to work after I reload the hip file, and needs to be reactivated manually. It all seem not to be very robost by now.
Do you have any suggestions on this?
Enclosed a hip file
- edward
- Member
- 7721 posts
- Joined: 7月 2005
- Online
There are some inefficiencies in your .hip file but the main mistake is that you're doing a ch() expression to a point() expression which uses $PT. But $PT only exists during cooking so that can't work. Given your set up, it's simple to just replace $PT with 0 to have it work consistently.
So some of the things which I think can be improved are:
- No need to use AttribPromote from Primitive to Point just to use the point() expression. Instead, just use prim() expression directly. Again use 0 because you only have a single primitive.
- Better yet, don't use SOPs to calculate the distance between two object nodes. You can directly use vlength(vtorigin(“/obj/chain_root1”, “/obj/chain_goal1”)). If you're worried about recalculating it all the time, then you can put it directly into an AttribCreate.
I've attached my modified .hip file by directly using vlength(vtorigin()).
So some of the things which I think can be improved are:
- No need to use AttribPromote from Primitive to Point just to use the point() expression. Instead, just use prim() expression directly. Again use 0 because you only have a single primitive.
- Better yet, don't use SOPs to calculate the distance between two object nodes. You can directly use vlength(vtorigin(“/obj/chain_root1”, “/obj/chain_goal1”)). If you're worried about recalculating it all the time, then you can put it directly into an AttribCreate.
I've attached my modified .hip file by directly using vlength(vtorigin()).
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- Offline
Thanks Edward!!!
Everything works great now. The only thing I dont get is why replacing “$PR” with “0”works fine. Does the reading of one prim need no cooking although its still a sop based point() or prim() expression. Why?
It distroys my little logic construction
Cant find that in the documentation.
Thanks Edward.
Everything works great now. The only thing I dont get is why replacing “$PR” with “0”works fine. Does the reading of one prim need no cooking although its still a sop based point() or prim() expression. Why?
It distroys my little logic construction
Cant find that in the documentation.
Thanks Edward.
- edward
- Member
- 7721 posts
- Joined: 7月 2005
- Online
$PT and $PR are called “local variables”. Local variables like $PT work in the Point SOP like this:
- The SOP cooks
- For each point, the node evaluates the parameter
- When the parameter evaluates and it sees $PT, the current point number is substituted (eg. 0, then 1, then 2, etc.)
In your case, the SOP is *not* cooking at all, the *OBJECT* is cooking. So $PT can't be evaluated.
- The SOP cooks
- For each point, the node evaluates the parameter
- When the parameter evaluates and it sees $PT, the current point number is substituted (eg. 0, then 1, then 2, etc.)
In your case, the SOP is *not* cooking at all, the *OBJECT* is cooking. So $PT can't be evaluated.
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- Offline
- edward
- Member
- 7721 posts
- Joined: 7月 2005
- Online
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- Offline
-
- Quick Links