University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Call OgreViewer callbacks from sbgui (bonebus) | 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
Call OgreViewer callbacks from sbgui (bonebus)
July 26, 2015
2:18 pm
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

Hello,
I'm trying to establish connection between smartbody application (sbgui) and OgreViewer. First i start OgreViewer app to listen callbacks from sbgui. Next, i start sbgui, then start bonebus at (127.0.0.1) and finally run OgreCrowdDemo.py script.
When i run this script and were created aall characters callbacks  BoneBusHandler::OnCreateCharacter and BoneBusHandler::OnUpdateCharacter were not called (i dont know why). Furthermore, after run script i manualy through sbgui interface create an character but OnCreateCharacter and OnUpdateCharacter were not called again.
All other callback works well: BoneBusHandler::OnClientConnect, BoneBusHandler::OnDeleteCharacter, BoneBusHandler::OnSetCharacterPosition, BoneBusHandler::OnSetCharacterRotation, BoneBusHandler::OnBoneRotations, BoneBusHandler::OnBonePositions, BoneBusHandler::OnBoneId, BoneBusHandler::OnVisemeId.

July 26, 2015
8:37 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

If you want to use the OgreCrowdDemo.py script with the OgreViewer, you need to change the line 34 of the OgreCrowdDemo.py script from:

sinbad = scene.createCharacter(sinbadName,'')

to

sinbad = scene.createCharacter(sinbadName,'sinbad')

The second parameter tells Ogre which character class to load. Make sure that you start the OgreViewer first, then start SmartBody with command line parameters like:

sbgui -scriptpath /path/to/smartbody/data/examples -script OgreCrowdDemo.py -host=127.0.0.1

Also, when Ogre is running, you can press '4' to switch to a different background (other than the default room scene).

Does that work for you?

Ari

July 27, 2015
10:49 am
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

I already did that, i run OgreCrowdDemo.py on sbgui (with bunebos active at 127.0.0.1). On OgreViewer side, i established an connection through bonebus socket (OnClientConnect) and can get data of sbgui sinbads from functions (OnSetCharacterPosition, OnSetCharacterRotation, OnBoneRotations, OnBonePositions and OnBoneId). however, i can't access functions as OnCreateCharacter and OnUpdateCharacter to present my model (sinbad) on OgreViewer space.
At the same time i have VHmsg protocol to get BML instrutions as:

feature=youtu.be

on OgreViewer i can retrive BML instructions from sbgui.
Of topics i've searched about this users says bonebus is used only to update model state. If i what to present my model i need to create a scene listener. If it is true BoneBusHandler::OnCreateCharacter and BoneBusHandler::OnUpdateCharacter are used for what?
Where can i get a sample using that listener?

July 28, 2015
5:12 am
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I'm still not sure what exactly you are trying to do; you are trying to modify a non-SmartBody character in Ogre? Can explain the problem in a bit more detail?

 

Yes, the bonebus is mainly for transferring character state after SmartBody processes it. If you don't need them to run in a separate process, you can use ogre-viewer in the embedded mode where SmartBody will run in the same process as Ogre.

 

Ari

July 29, 2015
9:31 am
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

I needed to create an character on OgreViewer but OnCreate callback on BoneBus wasn't called. I already solved this problem i forgot to add 'sinbad':

sinbad = scene.createCharacter(sinbadName,'sinbad')

on python script.
Thank you

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: huberdavidsen3, casey29english, kinneyreynolds06, andersen19eaton, kristensen00leblanc, bager59mayo, eric506784, t9rrzpi307, g2pvwfg490
107 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 65

Members: 52505

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 427

Posts: 2343