comparison thesis/cortex.org @ 464:8bf4bb02ed05

sleeeeeep.
author Robert McIntyre <rlm@mit.edu>
date Fri, 28 Mar 2014 00:42:42 -0400
parents 6d55ac73bc6f
children e4104ce9105c
comparison
equal deleted inserted replaced
463:6d55ac73bc6f 464:8bf4bb02ed05
483 screengraphs to avoid drawing things that do not appear on the 483 screengraphs to avoid drawing things that do not appear on the
484 screen. It has an active community and several games in the 484 screen. It has an active community and several games in the
485 pipeline. The engine was not built to serve any particular 485 pipeline. The engine was not built to serve any particular
486 game but is instead meant to be used for any 3D game. 486 game but is instead meant to be used for any 3D game.
487 487
488
489 I chose jMonkeyEngine3 because it because it had the most features 488 I chose jMonkeyEngine3 because it because it had the most features
490 out of all the open projects I looked at, and because I could then 489 out of all the free projects I looked at, and because I could then
491 write my code in clojure, an implementation of =LISP= that runs on 490 write my code in clojure, an implementation of =LISP= that runs on
492 the JVM. 491 the JVM.
493 492
494 ** Bodies are composed of segments connected by joints 493 ** Bodies are composed of segments connected by joints
494
495 For the simple worm-like creatures I will use later on in this
496 thesis, I could define a simple API in =CORTEX= that would allow
497 one to create boxes, spheres, etc., and leave that API as the sole
498 way to create creatures. However, for =CORTEX= to truly be useful
499 for other projects, it needs to have a way to construct complicated
500 creatures. If possible, it would be nice to leverage work that has
501 already been done by the community of 3D modelers, or at least
502 enable people who are talented at moedling but not programming to
503 design =CORTEX= creatures.
504
505 Therefore, I use Blender, a free 3D modeling program, as the main
506 way to create creatures in =CORTEX=. However, the creatures modeled
507 in Blender must also be simple to simulate in jMonkeyEngine3's game
508 engine, and must also be easy to rig with =CORTEX='s senses.
509
510 While trying to find a good compromise for body-design, one option
511 I ultimately rejected is to use blender's [[http://wiki.blender.org/index.php/Doc:2.6/Manual/Rigging/Armatures][armature]] system. The idea
512 would have been to define a mesh which describes the creature's
513 entire body. To this you add an skeleton which deforms this
514 mesh. This technique is used extensively to model humans and create
515 realistic animations. It is hard to use for my purposes because it
516 is difficult to update the creature's Physics Collision Mesh in
517 tandem with its Geometric Mesh under the influence of the
518 armature. Without this the creature will not be able to grab things
519 in its environment, and it won't be able to tell where its physical
520 body is by using its eyes. Also, armatures do not specify any
521 rotational limits for a joint, making it hard to model elbows,
522 shoulders, etc.
523
524 Instead of using the human-like ``deformable bag of bones''
525 approach, I decided to base my body plans on multiple solid objects
526 that are connected by joints, inspired by the robot =EVE= from the
527 movie WALL-E.
528
529 #+caption: =EVE= from the movie WALL-E. This body plan turns
530 #+caption: out to be much better suited to my purposes than a more
531 #+caption: human-like one.
532 [[./images/Eve.jpg]]
533
534 =EVE='s body is composed of several rigid components that are held
535 together by invisible joint constraints. This is what I mean by
536 ``eve-like''. The main reason that I use eve-style bodies is for
537 efficiency, and so that there will be correspondence between the
538 AI's vision and the physical presence of its body. Each individual
539 section is simulated by a separate rigid body that corresponds
540 exactly with its visual representation and does not change.
541 Sections are connected by invisible joints that are well supported
542 in jMonkeyEngine3. Bullet, the physics backend for jMonkeyEngine3,
543 can efficiently simulate hundreds of rigid bodies connected by
544 joints. Sections do not have to stay as one piece forever; they can
545 be dynamically replaced with multiple sections to simulate
546 splitting in two. This could be used to simulate retractable claws
547 or =EVE='s hands, which are able to coalesce into one object in the
548 movie.
549
550
495 551
496 ** Eyes reuse standard video game components 552 ** Eyes reuse standard video game components
497 553
498 ** Hearing is hard; =CORTEX= does it right 554 ** Hearing is hard; =CORTEX= does it right
499 555