The SmartBody framework is fully compatible with the Android platform. The SmartBody distribution contains several Android apps that can be run: a simple example of using SmartBody with the Java Native Interface (JNI) called sbjniapp, a simple example of using SmartBody with the Ogre rendering system called sbogreapp, and a SmartBody application integrated into the Unity game engine called sbunity.
To build any of these applications from the distribution, please see the instructions in the Appendix on Building SmartBody for Android.
Running sbjniapp
The sbjniapp app is a simple example of using SmartBody with the Java Native Interface (JNI) and rendering using OpenGL.
- Copy the file smartbody/android/sbjniapp/sbjniapp.apk to your Android device.
- Install the sjniapp.apk app
- Copy the entire directory smartbody/android/sbjniapp/sbjniappdir to the /sdcard directory on your Android device
Note that the data files under /sdcard/sbjniappdir can be modified. The app will look for the file /sdcard/sbjniappdir/default.py and run the commands contained within it.Any Python script can be substituted for the default.py file which is automatically run by the app. There are no camera controls, but any Python command can be sent to SmartBody by entering it in the input box.
Running sbogreapp
The sbogreapp app is a simple example of using SmartBody with the Java Native Interface (JNI) and rendering using Ogre.
- Copy the file smartbody/android/sbogreapp/sbogreapp.apk to your Android device.
- Install the sbogreapp.apk app
- Copy the entire directory smartbody/android/sbogreapp/sbogreappdir to the /sdcard directory on your Android device
Note that the data files under /sdcard/sbogreappdir can be modified. The app will look for the file /sdcard/sbjniappdir/initOgre.py and run the commands contained within it.Any Python script can be substituted for the initOgre.py file which is automatically run by the app. Swiping the screen rotates the camera. Any Python command can be sent to SmartBody by entering it in the input box. The 'Use Deformable Model' checkbox switches between viewing the character as a rendered mesh and as spheres.
Running SBUnity
The SBUnity app is an example of combination SmartBody with the Unity game engine.
- Copy the file smartbody/android/SBUnityApp/sbmUnity.apk to your Android device.
- Install thesbmUnity.apk app
- Copy the entire directory smartbody/android/SBUnityApp/SbmUnity to the /sdcard directory on your Android device
The app has several controls:
- Press the 'Steering' button, then tap anywhere on the screen and the character will walk to the tapped location. The speed of movement may be changed, and the 'Jump' button will cause the character to jump. 'Pick Up' will cause the character to reach for the nearest ball, and 'Put Down' will cause him to put it down near himself.
- Press the 'Camera' button, then swipe the screen to rotate the camera, pinch to zoom. In Camera mode, the camera may also be changed to 'Character' view (position the camera in front of the camera), '3rd Person' (position the camera behind and above the character, 'Main' (view from a controlled location), or 'Reset' (reset the camera to its original position)
- Press the 'Edit' button, then 'Create Box' then tap a location and a box will be created, or 'Create Ball' and a ball will be created at the next tapped location.
Attachments:



