View Full Version : prob: rigging a tentacle in xsi
funnydoodle 07-02-2003, 10:31 AM i posted this in another forum..... please check it.
http://www.cgtalk.com/showthread.php?s=&threadid=73201
|
|
frumpy_bunyin
07-02-2003, 01:25 PM
I like to set up tenticles (or at least the ones I've set up) with 2 tenticle chains, a guide one and one for a result also with 2 bones seperate to the actual chain to drive the motion of the chain.
So the result chain gets the guide + the additional values from the controll chains -explained below.
Each subsequent bone in the chain gets an offset of 1 in time but multipled by a slider, this is used to get the time off set from the controlling bones. (one slider for each controller's off-set). With the slider you can increase or decrease the delay.
I also use the numbering of bones multipled a gamma function (controlled by another slider)to multiply the amount of rotation it takes from the controller.
This will get a nice wave through the object, that will get progressively larger along the chain, but the falloff of the increase in adjustable by the gamma, so you can move it all the way down to the tip.
The second controller does the same and is added to it also. Using the first controller for large low frequency sweeps, and the second for small high frequency waves got fantasic results. Add to this you can then bend your guide to have the tenticle where you want and then the waves work as an off set from there.
I had very nice results with no use of the guide. Ribbon like flags, and if the delay was reversed, a look of sniffing out something.
I scripted the creation of the expression up to work it's way around several chains, I've probably got it somewhere with the exact expression in it, but I'd have to hunt.
FB
GavinG
07-02-2003, 05:22 PM
Wow Frumpy, that's really helpful...i didn't even ask the question and it helped me out :)
Could you also use a chain from curve ? or will that limit the movement of the tenticle?
Gav
frumpy_bunyin
07-03-2003, 01:04 PM
Chain from curve would not make much difference as far as I can see.
Any constraint won't matter much as you're just referencing it's values. Where it may cause trouble is ever your joints flip which they will sometimes do in order to keep within 180 degrees of where it is. Plotting will generally prevent that.
I remember Kim making a tail plug in that made a basic tail. I can not recall if it was running a gamma function or not, I think it was just one using one control onject to put a wave through it.
may be worth a look i think it's the rat tail one.
http://www.aldis.org.uk/3DResources/Scripts.htm
FB
funnydoodle
07-04-2003, 04:38 AM
sounds interesting! would it be ok if u could upload a scene file for reference and a lil quick tutorial on how to set the rig up? cos i'm still new with expressions.... an animation would be great too.... i'll try the technic u've mentioned at the same time by myself..... thanx alot!
frumpy_bunyin
07-04-2003, 12:48 PM
I can post a snippet of the maths, but not a scene.
I'll try to remember when I go to work on monday.
FB
funnydoodle
07-04-2003, 01:29 PM
cool ur da man!
funnydoodle
07-04-2003, 01:30 PM
well if there's other ppl who knows how to rig a tentacle properly, please share it with everybody here..... tahnx
frumpy_bunyin
07-08-2003, 11:17 AM
Ok I found some of my old notes that I make while writing expressions and scripts.
######This is the Basic one.
(
( c_bone1.kine.local.rotz * r_root_c_bone_c.chain_blending.animated_tendril ) +
( c_bone_b1.kine.local.rotz * r_root_c_bone_c.chain_blending.dynamic_tendril )
) +
(
sin
(
(Fc +
( 7 * r_root_c_bone_c.chain_blending.delay )
)*
r_root_c_bone_c.chain_blending.wave_speed
) *
( r_root_c_bone_c.chain_blending.wave_bend +
( 7 * r_root_c_bone_c.chain_blending.wave_bend_taper )
)
)
######and the final expression this was for the first joint in a 50 joint chain.
######
#roty including secondary wave
######
(
( r_tendril_1_anim_1.kine.local.roty * c_tendril_sliders_1.tendril_1_mix_pannel.anim_tendril ) +
( r_tendril_1_dyn_1.kine.local.roty * c_tendril_sliders_1.tendril_1_mix_pannel.dynamic_tendril )
) +
( sin
(
( Fc * c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_speed +
( 1 * c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_freq )
)
) *
( c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_bend +
( pow
(
( 1 / 50 )
, c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_taper_gamma
) *
c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_taper_bend
)
)
)+
( sin
(
( Fc * c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_speed +
( 1 * c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_freq )
)
) *
( c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_bend +
( pow
(
( 1 / 50 )
, c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_taper_gamma
) *
c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_taper_bend
)
)
)
#### and the script to apply the expressions to the chain.
#### this should run fine if you make the chains it wants
#### and the property sliders it wants (if all named correctly)
for i = 1 to 50
SetExpr "d_tendril_"&i&".kine.local.rotz","(( r_tendril_1_anim_"&i&".kine.local.rotz * c_tendril_sliders_1.tendril_1_mix_pannel.anim_tendril ) +( r_tendril_1_dyn_"&i&".kine.local.rotz * c_tendril_sliders_1.tendril_1_mix_pannel.dynamic_tendril ) ) + ( sin(( Fc * c_tendril_sliders_1.tendril_1_mix_pannel.z_wave_speed + ( "&i&" * c_tendril_sliders_1.tendril_1_mix_pannel.z_wave_freq ) ) ) * ( c_tendril_sliders_1.tendril_1_mix_pannel.z_wave_bend + ( pow(( "&i&" / 50 ), c_tendril_sliders_1.tendril_1_mix_pannel.z_wave_taper_gamma) * c_tendril_sliders_1.tendril_1_mix_pannel.z_wave_taper_bend)))+( sin(( Fc * c_tendril_sliders_1.tendril_1_b_wave_pannel.z_b_wave_speed + ( "&i&" * c_tendril_sliders_1.tendril_1_b_wave_pannel.z_b_wave_freq ) ) ) * ( c_tendril_sliders_1.tendril_1_b_wave_pannel.z_b_wave_bend + ( pow(( "&i&" / 50 ), c_tendril_sliders_1.tendril_1_b_wave_pannel.z_b_wave_taper_gamma) * c_tendril_sliders_1.tendril_1_b_wave_pannel.z_b_wave_taper_bend)))"
next
for i = 1 to 50
SetExpr "d_tendril_"&i&".kine.local.roty","(( r_tendril_1_anim_"&i&".kine.local.roty * c_tendril_sliders_1.tendril_1_mix_pannel.anim_tendril ) +( r_tendril_1_dyn_"&i&".kine.local.roty * c_tendril_sliders_1.tendril_1_mix_pannel.dynamic_tendril ) ) + ( sin(( Fc * c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_speed + ( "&i&" * c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_freq ) ) ) * ( c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_bend + ( pow(( "&i&" / 50 ), c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_taper_gamma) * c_tendril_sliders_1.tendril_1_mix_pannel.y_wave_taper_bend)))+( sin(( Fc * c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_speed + ( "&i&" * c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_freq ) ) ) * ( c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_bend + ( pow(( "&i&" / 50 ), c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_taper_gamma) * c_tendril_sliders_1.tendril_1_b_wave_pannel.y_b_wave_taper_bend)))"
next
for i = 1 to 50
SetExpr "d_tendril_"&i&".kine.local.rotx","(( r_tendril_1_anim_"&i&".kine.local.rotx * c_tendril_sliders_1.tendril_1_mix_pannel.anim_tendril ) + ( r_tendril_1_dyn_"&i&".kine.local.rotx * c_tendril_sliders_1.tendril_1_mix_pannel.dynamic_tendril ) )"
next
#########
Hope this helps. -It's not all that complicated, just little bits repeted and expanded. -It's not the neatest thing, I'd only just started to look at scripting when I made this.
I'm too busy to provide a scene, I may get time to make a script to generate a scene that this would apply to, but I'd not hold my breath.
FB
frumpy_bunyin
07-08-2003, 11:20 AM
Oh wait, that's all based off of sin. Don't do that!
Just reference another chain for your initial motion, not the sin function. If you want a sine function just animate it to look like a sinewave. If you want to vary it more being able to animate the curve will be a boon.
FB
funnydoodle
07-18-2003, 12:42 PM
thanx 2 everyone who helped!! i appreciate it alot.... now that my character is done..... it's time for critiques.... for those who are interested, i've posted the pic and test animation in a new thread at the wip/critiques section..... the link is http://www.cgtalk.com/showthread.php?s=&threadid=76241
CGTalk Moderation
01-15-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.