bone-angle activated switches?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

bone-angle activated switches?

Post by BA »

ok, here's a long shot:

would it be within the realm of possible scripts to have a switch layer or action activated by a certain bone's angle?

ie, when bone A hits +15 degrees, switch A switches to 1, and when bone A rotates back to -15 switch A switches to 2 - - - etc...


feasible, or lunacy?
Create cartoon characters and comics in minutes: www.bitstrips.com
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

Post by BA »

ok, before anyone has a chance to reply, here's even more lunacy:

what if you could not only link certain switch-states to certain bone angles, but use bone rotation to interpolate between switches?

ie - i have a switch layer with a bone in it.
inside the switch layer are 3 sublayers, slight modifications of the same layer, set to interpolate.
if the bone angle is at 0, the switch layer is set to sublayer A.
if it's at 30 degrees, the switch is set to B.
and if it's at -30, it's set to C.

then, could rotating the bone somehow be linked numerically to the interpolation - ie, if the bone is at 15 degrees, it's interpolated halfway between A and B.

I wonder if this is possible... if it were, it would allow for a much more refined system of character rigging... i think..?
Create cartoon characters and comics in minutes: www.bitstrips.com
User avatar
x-vishon
Posts: 74
Joined: Sat Feb 18, 2006 5:52 pm

HELL Yes!

Post by x-vishon »

That would make it so good for doing Feet that show the bottem of the foot when in the back and the top when in front or little things like that. Further more you could use them for a walk in the front to make it have a layer with the foot towards the front of the caracter and then behind and use the bone floathing of to the side as a slider to swich them smoothly! :D
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

Post by BA »

I was just thinking of the simplest possible version of this, and wondering if it's possible...

what if you have a switch layer with 2 sublayers, A and B.

the switch layer has a bone in it.

if you rotate the bone clockwise, the switch is set to A.

if you rotate the bone counterclockwise, the switch is set to B.


Inconceivable? Easy?

If it WERE possible - it would open up some extreme puppetmaking possibilities, as x-vishon has hinted at...
Create cartoon characters and comics in minutes: www.bitstrips.com
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

BA wrote:what if you have a switch layer with 2 sublayers, A and B.
the switch layer has a bone in it.
if you rotate the bone clockwise, the switch is set to A.
if you rotate the bone counterclockwise, the switch is set to B.
Inconceivable? Easy?
I think it would be fairly easy to create a script for this. Make an embedded script that are attached to the master bone layer, make it keep track of the rotation of the bone (if it moves, is it > or < than the current value?)
and then make a certain switch layer change to the appropriate switch. (maybe have a menu where you can select which swicth layer you should command).
But then I'm no great scripter...
Last edited by rylleman on Sun May 21, 2006 9:24 am, edited 1 time in total.
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

Post by BA »

rylleman wrote: I think it would be faily easy to create a script fot this.
The controlling bone could even be in the switch layer itself, since switch layers have bones too!

Is anyone up to the challenge? God, I wish I knew how to write Lua scripts...
Create cartoon characters and comics in minutes: www.bitstrips.com
User avatar
Rai López
Posts: 2259
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Hummm... as you should know, I dislike (a little) the Switch way of work philisophy, nevertheless I've not been able avoid be thinking on thism proporsal, so... Do you think that could be like a good idea that the script could read sub-layer names to can assign a subffix to indicate on it the angle based on the Switch must change? Something like "RightFoot1_-45", "RightFoot2_0", "RightFoot3_45" ...Well, as I said I've been thinking and seems to me that something like that should be necessary to have some control, isn't? Well, I think that there is enough lines of code still writed by real scripters to get it "easily" for other joiner scripters so... Well, for now I'll continue thinking about all this and other possible aspects, CIAO!
Post Reply