前言

@Shaun Miller使用codelab-adapter驱动Cozmo和Vector,在CodeLab积木平台中制作了一部机器人相声: 《Where did the human go?》

Shaun Miller在自我介绍里说:

I am a software engineer in cyber security, and write code in python and C. My 11 year old nephew told me about Vector and asked for one for Christmas. I picked one up to give him and started playing with it so I could explain how it works to him, and I am attached.

他在《Where did the human go?》的项目背景介绍中提到:

I work as a volunteer at a high school helping to teach introduction Computer Science programming. The teachers asked to me to give a presentation on making videos with the Anki robots based on some recent animations that I made. One of the goals is to hopefully get Cozmo and or Vector into the school’s curriculum.

下边是他在社区里分享的创作成果:

我们的老朋友@cyke一如既往地在帖子下对CodeLab予以鼓励,他认为我们在积木上的设计是个brilliant idea,@cyke补充说:

You must remark that the “anim” Codelab block does’t exist in Codelab extension of the great Scratch lab 3.0 inline IDE (based on official Scratch 3.0) but you can use the block “exec” (this block exists in the Scratch lab for Cozmo and this block exists in the Codelab Adapter for Scratch lab for Vector). These blocks doesn’t use the same Anki SDK ! Vector is using its own API and Cozmo does the same too.

此刻,@cyke可能在用google翻译读这篇文章:) 感谢@cyke的支持。

之后我和@Shaun Miller在帖子里闲聊。@Shaun Miller提到:

I also noticed you have something related to Blender. I’m a huge fan of Blender for video editing, and have been thinking about creating a 3D model of Cozmo and Vector. My plan is to make a parody of the game ‘Touhou Project 6 - The Embodiment of the Scarlet Devil’ but using Vector as the protagonist and Cozmo as the enemies / antagonists. But that’s 6-12 months out at best, but if I can make it work, it will be awesome.

@Shaun Miller试图去做的事情,正是CodeLab在未来社中想做的事情之一, 所以我们准备支持@Shaun Miller的计划。

@Shaun Miller接下来提到他的计划细节:

My eventual plan is to create a 3D model of both Vector and Comzo. Those would be the smaller actual characters that fire projectiles at each other. Should be able to generate some interesting projectile patterns using the particle system. I would also alter the camera angle to not be a strict birds-eye view, but angled to make it more 3D (keeping the boss higher to have a more dramatic effect making them seem more powerful). I would then film the real robots on my green screen and use them to mimic the conversations between the protagonist (left side) and antagonist (right side). Possibly not using their voices, and only using text and robot animations. Vector would be the protagonist, and Cozmo the antagonist. After each stage, Cozmo would change colors to mimic the color of the boss in the real game. Also after each stage, Cozmo would become less silly and more darker in personality as Vector gets closer to the truth. The truth would reference another anime ‘Elfen Lied’ (great anime, very violent). I won’t spoil exactly what I’m thinking here, but I think the Elfen Lied story fits well here. The characters in ‘Embodiment of the Scarlet Devil’ game are known for eating people, which is where I got the idea to have Cozmo say ‘I ate him!’ when Vector asks ‘Where did the human go?’ in my video for this post.

同时他提醒我说Blender进入2.8时,有巨大变更,blender2.8是blender十年来最大的一次变更。这次变更中,codelab-adapter目前依赖的Blender Game Engine将会消失,于是我决定用周末时间重写codelab-adapter的blender插件。

周六下午写完了插件。 最新的插件除了兼容blender的最新版本,我们也做到了向前兼容。

在我们展示完插件的使用示例后,@Shaun Miller觉得设计很简洁,他提到codelab-adapter blender插件对他制作3d动画可能提供的帮助:

As animation scenes get more complex, it gets harder to know what object is moving where. Especially if you have multiple objects moving in different patterns. If we use this Blender codelab-adapter, I think this can give us a better view as to what is happening in a given animation. Lets say we have 4 minutes of multiple animations, and we realize we want to make a change from 2:30 to 2:40. I’m thinking with this adapter, we might be able to drill into that particular spot easier.

愿意尝鲜的朋友,欢迎阅读教程文档: blender extension

想象空间

利用最新版本的blender插件,用户除了可以使用积木控制3D角色、制作3D动画/电影,还可以利用积木,以编程的方式创作3D角色,如此一来构建大规模的机器人军队将变得容易!利用随机数和循环,可以轻松创作出个体姿态各异的机器人军团。

codelab-adapter的目标是将万物积木化, 接入Blender的例子很好地展示codelab-adapter想做的事情: 我们可以接入到任何开放生态中,无论是全球最有趣的AI玩具:Cozmo/Vector,还是全球最好的3D动画创作工具Blender,我们都能将其积木化,通过积木封装领域概念,从而将编程能力赋予给各个领域的创作者,同时我们也将其用于教育。

当我们将blender积木化之后,除了可以赋予动画艺术家们编程能力,让他们更轻松构建大型动画场景,还可以让3D相关的教育变得更为友好,这正是@Shaun Miller在做的事,希望@Shaun Miller能为我们带来有趣的探索成果:)

自定义积木

在积木设计上,我们依然采用EIM(Everything Is Message)风格,我们给出了一个万能积木,允许@Shaun Miller这样热衷教育的开发者,去自定义适合他的教育场景的积木。

我们相信正是这种开放性,让CodeLab可以专注在基础设施上,而让各个领域比我们更优秀的开发者去设计出适合他们领域的积木。

我们相信万物积木化的核心一环是构建开发者社区,而不是构建一个闭环的体系去包罗万物。

我们相信这不是一种谦虚,这是一种清醒。

todo

将blender_server写成blender插件。

参考