University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

BoneBus API documentation | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
BoneBus API documentation
September 19, 2014
6:11 pm
Avatar
New Member
Members
Forum Posts: 2
Member Since:
September 19, 2014
sp_UserOfflineSmall Offline

Hello,

I'm hoping to get some more information on BoneBus and how it can be used with a remote renderer. Here's the documentation I found in the manual:

The BoneBus is a TCP and UDP based network protocol that sends information about the SmartBody character state to a renderer on a remote machine, or in a different process than the originating SmartBody process. SmartBody provides a C++ and C implementation of this protocol, but any coding method could be used provided that it interprets the BoneBus protocol properly.

To connect a renderer to SmartBody via BoneBus, the game engine code should use the bonebus::BoneBusServer interface located in the lib/bonebus/include directory.

Since this interface uses TCP/IP, it is not as efficient as embedding the SmartBody library within the application.

First, a couple general questions:
  • Is this a persistent socket connection with duplex communication?
  • Are the messages binary or are they sent as strings over the wire?
  • Is it possible to send/receive data to/from a BoneBus server via netcat (or a similar tool) for testing purposes?

The manual references a "bonebus::BoneBusServer interface", but I couldn't locate this file. Would it be possible to post a link to this interface in the Sourceforge repo? In general, I'm looking for a description of the BoneBus API and message types, and also a general direction as to how a BoneBus client could be implemented in another language (besides C++). Thanks!

September 19, 2014
7:49 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

If you download the code from SVN, the bonebus is located in lib/bonebus. There are only 4 source files: bonebus.h/cpp, bonebus-c.h/cpp. One set is a C++ interface, the other is a C-interface. This is brought in as an external SVN link from here:

http://svn.ict.usc.edu/svn_vh_.....b/bonebus/

The renderer/receiver would implement the bonebus::BoneBusServer interface, which uses a set of callbacks to respond when SmartBody sends data. For example, there's an 'OnClientConnectFunc' which is triggered when a SmartBody instance is connected:

typedef void (*OnClientConnectFunc)( const std::string & clientName, void * userData );

and an 'OnCreateCharacterFunc' which is triggered when a character is created:
typedef void (*OnCreateCharacterFunc)( const int characterID, const std::string & characterType, const std::string & characterName, const int skeletonType, void * userData );

then the state information is transferred with 'OnBoneRotationsFunc' and 'OnBonePositionsFunc':

typedef void (*OnBoneRotationsFunc)( const BulkBoneRotations * bulkBoneRotations, void * userData );
typedef void (*OnBonePositionsFunc)( const BulkBonePositions * bulkBonePositions, void * userData );

If you look at the OgreViewer project, you can see an example of this in the BoneBusHandler.cpp file:

https://sourceforge.net/p/smartbody/code/HEAD/tree/trunk/core/ogre-viewer/src/BoneBusHandler.cpp

There is also a bonebus interpreter for Panda3D in Python here:

https://sourceforge.net/p/smartbody/code/HEAD/tree/trunk/core/PandaBMLR/PandaBMLR/NetHandler.py

Does this help?

Ari






September 22, 2014
2:53 pm
Avatar
New Member
Members
Forum Posts: 2
Member Since:
September 19, 2014
sp_UserOfflineSmall Offline

Yes, this is very helpful- thank you. This will certainly get me started.