mulitple shapkeys with the action actuaor in the bge

核心提示:教育上的过失有时会立竿见影地得到体现,有些则要日后才会慢慢表现出来,如对孩子过分溺爱就属于后者。以下三个提示,帮助父母把爱控制在合适的范围之内。 www.jk3721.com 提示1:过多帮助导致孩子无能 有些父母认为,孩子还很弱小,很多事情需要父母帮助,于是对于孩子所有的事大包大揽。譬如5岁的冰冰想吃果酱面包,于是她学着父母平时的样子,拿来了面包、果酱和餐刀,正准备为面包抹上果酱。这时妈妈担心她误了上幼儿园的时间,爷爷奶奶担心餐刀会伤着孩子,大家纷纷上前替孩子代劳。 www.jk3721.com普及健康知识 点评:孩子需要学习,以便学会自己处理生活中的小困难和小麻烦。一旦受到阻止,就会依赖于他人的帮助。以后当他习惯并且适应了这样的状况时,他在生活中会变得无助和无能。 建议:生活中,如果父母只图为了孩子穿鞋便捷,总是买有拉链的鞋是有害无利的,孩子总要学会穿系鞋带的鞋子,学会对付复杂的事情;如果父母日复一日地提醒孩子去幼儿园时不要忘了带这个或那个,不如让他自己学会记得。帮助是美好的,但应该让孩子自己决定他是否真的需要帮助,什么时候需要。因为所有的帮助只有一个最终目的,就是使帮助在某一天成为多余。 提示2:过多的玩具意味着干扰 3721健康知识网www.jk3721.com生活健康小帮手 现在的孩子每逢节日收到最多的礼物就是玩具,不同种类的玩具和电子娱乐产品塞满了房间。孩子常常把抽屉里的、架子上的、框子里的玩具统统翻出来,玩着玩着,他就会要求妈妈的帮助了:“妈妈你看到我的那个小汽车吗?”然后妈妈就放下手中事,帮孩子寻找他想要的玩具。 点评:玩具在增多,孩子的兴致却一点点下降,孩子可以支配的玩具越多,他就要用更多的时间决定玩哪一样,并且很快地将兴趣从一个玩具转移到另一个玩具,集中精力玩一个玩具的时间就会大大缩短。其实,问题不是在孩子,收拾和管理这么多玩具,早已超出了他的能力范围。 建议:其实,即使是一套积木,也可以让孩子在没有指令和界限的条件下,随心所欲地发明创造。虽然它没有高科技,也没有那么昂贵和漂亮,但是,美国最新一项研究证实,积木既是玩具,又对培养孩子的创造力大有好处。玩积木组的孩子在语言发展测试中,比没有玩积木的的那组孩子,分数要高出15%。积木除了帮助孩子掌握堆叠技巧外,还为孩子发展数学、科学以及空间能力打下基础。 提示3:过多表扬不利孩子抗挫折 3721健康知识网www.jk3721.com生活健康小帮手 受一些用表扬鼓励孩子进步的成功事例启发,有些父母误认为,www.bgy168.com,只要多给予一些表扬,也能使自己的孩子成功。于是,生活中无论大事小事对孩子的行为举止都大加表扬、赞赏和鼓励。 点评:心理学认为,适度地表扬能够增强孩子的信心。但是如果表扬泛滥则通常会带来很大的问题:一是孩子不再把表扬当回事;二是孩子把父母的赞扬句句当真,那么他就可能把自己当成了一个不同凡响的人,一旦从老师或其他人那里得到客观评价时,会大大打击他的自信心。 建议:孩子能自己整理玩具,或是在学做家务等方面表现良好时,父母应表示赞扬和欣赏,这有助于孩子更快进步。但此时要注意两点:首先,父母应该在表扬的同时给孩子示范,如何将事情做得更好;其次,表扬不仅限于一个玩具和甜点,对幼小的孩子,父母可以用搂抱和爱抚,而对稍大的孩子,一个特定的手势,一个微笑或眼神都是表扬的方式,并且表扬也应不断要有新意。 《父母应把爱控制在合适的范围》由3721编辑,http://www.jk3721.com

OK I did it …

at 2:49 is very different.

then

select the mesh to modify (character)

go to panel property-> object data -> shape Key

select one shape key (where is “Basis” , “key1” , “key2” …)

now attention:
a bit below there a value (usually is to 0.00)
click with the right button of mouse (RMB)
appear a windows with a list of argument , choose -> ADD DRIVER (ohhhhh!)

now, go in panel -> graph editor

go in driver

click on the channel “key1” or what (to the left)
press N if not see the panel to right (sorry for bad henglish)

go in driver panel(to right) , choose maximum value, or average value
(if you want understand something ,really strange that “scripted expression” as default!!)

below:
-var- OK this
below:
choose the object : armature -> bone
rotation X

now roll the bone selected and change the mesh! doh!

hi , cool … i managed to mix two shapes with the bonedriver method last night …
the same u describe. i assume i can do that for the following 60 animations :slight_smile: probably
will take me 1000 years to set that up. for some reason blender … ieven though its awesome
for some things its is sometimes very painfull to work as a user.

blender can have much way, depend from the size and the complexity of the project whats is the best

(bit annoyng the change from 2.49 to 2.5 version, too big , but now is better i think)

for one things as big , better found another way ,not bone->action->actuators, otherwise agree with estimated time of 1000 years :smiley:

you can change the driver obj, from bone to -> empty (obj)
whats the different?

the empty (different to the bone) is easy to manage with script (python,you know python language?)
so , you no have need to actuator, can manage all with one script

also, the “script expression” (in driver) work well , ,try it, make too fast the setup of the driver.

now i work on this things (for my games) , i want try with empty instead of bone ,so if you want i can post some blend.

blender can have much way, depend from the size and the complexity of the project whats is the best

yeah , it almost killed me in the alst days .. and i have found some serious bugs i have to say ... for instance my keys resetting to 0 in the action value when switching objects in the outliner . (bit annoyng the change from 2.49 to 2.5 version, too big , but now is better i think)

for one things as big , better found another way ,not bone->action->actuators, otherwise agree with estimated time of 1000 years :smiley:

tried to find a better way but there is NONE … i mean maybe acessing the shapekey via
phyton but im aint a programmer … .so … .

you can change the driver obj, from bone to -> empty (obj)
whats the different?

not sure … the bones are a part of the armature … i think its probably the same besides
what u say.

the empty (different to the bone) is easy to manage with script (python,you know python language?)
so , you no have need to actuator, can manage all with one script

yeah . u wanna write me one ? :slight_smile:

also, the “script expression” (in driver) work well , ,try it, make too fast the setup of the driver. if i would only know how ?

now i work on this things (for my games) , i want try with empty instead of bone ,so if you want i can post some blend.
22-Feb-12 03:36

thats very nice ! i just managed with the bones method … took me 4 hours but now im
up and runnning .

why u not using unity for games ?

cheers and thanks , e

p,s if u find a way to use just shapekeys only without drivers lemme know.

	<i></i>

Hi

I can not combine anything good.

I find 1 solution -> I find 10 new problems

There are really many nonsense things.

I think the problem is that the armorature is really difficult to access (like all things pertaining to the physics engine)

probably in the source code there are workarounds to avoid the bug early, this means the multiplication of bugs over time, version after version.

and now there are just a mountain.

I am not convinced that it’s worth, my advice is to use an armature with many bones and vertex group (assigned with precision), and many constraints (these work well), with this you can do a great job(also better), and take some exception as shapekey (5/6 shapekey )


shapekey work only with other obj in edit mode , not in bge
in bge work only with bone
bone MUST have a keyframe, without not work
plus, also if is a diferent channel you must using a different layer, somno more than 7 (at least , I unnderstand this)

bad bad

hi, yes this feeling / painful proof i got aswell. i have a feeling the developers trying
to make it easy for everyone for the cost of loosing functions you where able acess before …
something i obeyed in many software evolutions (by not beeing a programmer) … but still its sucks .
thanks for digging in the mess . cheers , e

ps. i connected all my keys to bones and it works . even though i feel scared now to open
my project and make changes :slight_smile:

Hi, sorry you had some problems with shape key!
I was hesitating to reply to this thread… for some reason…
You can mix shape keys, even the ones saved on the same vertices.

Steps to follow:

  1. Create you shape keys.
  2. Convert them into actions: Go to the dopesheet, change the editing context to shapekeys. Create a new action and set frame to whereer you shape key will started. Choos your shape key and set the initial value, then set frame to the end and set the value of the shape key again(Note, you can mix you shape keys here already, into one action)
  3. Set you logics or python to play the actions. With the actuator, place one per action and put the actions in different priorities. Play a bit with the blending value and wheight.
    Voilá! here an example.

hi, very nice . but infact the problem is adding shapes on top of each other . like i managed
with the atached example but only with driverbones … i think you will not be able to
to do this with your example since me and quite some people on the list tried that. but if
u manage to do it it would be great . i think its not possible with blender 2.6
in my example you can press the A key and then “add on” the shape with the spacebar key.
i dont think you can do this with your version. thank you very much for looking into this !
cheers from swizzerland ,e

Attachments

drivers_BV2.6_eug.blend (297 KB)

I don’t see why not!
If you make the animations play with properties, then all will be good!
Download my example again and use up and down arrows!

u dont see why not because u havent tried it … its bugggy blender 2.6

I am saying that I have it working on my example (I reworked it).
When using properties, you force the action to stay at the current frame as the property, thus, as the second action is played over it, the actions will add up. Besides, I only use shape keys with properties, since they you need a certain level of control and need to mix them…

hi, but i tried exactly this… i put one action on one keyboardkey and the second on the
other .then i tried to mix it in the bge and it jumps back 0 when i switch keys . could you provide me with an example hhaving it working like in my example with the bonedriven shapekeys ? i have tried to get this working for a week straight now and it jsut doesnt work.

i dont think its possible . unless you can show me an example without coding .

hi! much good news

@torakunsama : your blend work , but cannot adding more than 7 layers
@eugen : youn need to change the layer[0] …
action0->layer[0]
action1->layer[1]
since 7.

meanwhile I FOUND! a way, exactly what i want!
no need to one action , and even need to one actuator.

I cannot ask more .

only want tested if can add much bone or, also in this way there the limit of 7 (not tink,but first make a test)

W blender!!:smiley:

infact it would really really help me if you could show me . sorry if i am beeing pessimistic
but i jsut havent found a solution and i have some people telling me it doesnt work. so if u could show me a .blend i would be very happy . cheers

I hope that if you do something
then post the blend in the forum eh! :wink:

(I think it will be very difficult to manage so many shapekey anyway)

here’s the demo ready, no limit, no bugs, all perfect !!!

switch the controllers to run the script simple or complex

Attachments

infiniteShapeKeyDemo.blend (111 KB)

hi marco , sorry there must have been a confusion in my replies …

@torakunsama pointed out he has a solution for doing what u doing in ur .blend
without using bonedriven shapekeys … the one with the bondedriven shapekeys i have
already working for my 60 shapes and it works . since 2 days . anyway i think ur .blend
helps the community . cheers ,e

can post the blend with 60 shapekey? and you can manage well? i m curious…

PS: in the demo i m forget to clean the action

Yes it does work, but Marco is right by pointing it’s limits 7 layers. When adding an action to an animation layer it is isolated, and adds up! So you can only have 8 animations with this setup.
I’ll keep on looking!