University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

[Smartbody+Unity] Adding more SmartBody controlled characters to Unity3D scene and Web deploy | 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
[Smartbody+Unity] Adding more SmartBody controlled characters to Unity3D scene and Web deploy
March 20, 2013
4:03 pm
Avatar
Angelo
Guest
Guests

Dear Smartbody team,
I have recently downloaded the VHTK to set up a basic scene in Unity3D and use SmartBody to control some characters.
I managed to run an empty scene with a single character in it.
How can I add more characters to the scene controlled via SmartBody?

On a separate note, I was trying to build the unity scene both as standalone app for windows just for testing and as Unity Web Player app but it didn't succeed.
The platform we are targeting is the Web Player, is it possible to do that in unity "carrying" over the required SmartBody components as well?
I will wait for this answer prior to post the error messages that I've got if they are useful to solve the problem.

thanks!
Angelo

March 20, 2013
5:18 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Hi Angelo,

 

The VHToolkit has a web site (https://vhtoolkit.ict.usc.edu/) and a Google Groups email list (http://groups.google.com/group/vhtoolkit) which I would encourage you to post on for Unity-specific issues (unfortuantely, I'm not an expert on Unity...) for your questions regarding adding more characters to a scene in Unity.  You should be able to write SmartBody scripts, which in turn create Unity characters automatically, but the Unity interface also has a way to create those characters directly from the Unity GUI as well.

 

If you are having trouble building the standalone version, you should copy the error output and post it to the groups email list - one of the people in charge of the VHToolkit will respond to you about that.

 

With regards to the Web player, SmartBody is integrated into Unity as a plugin via the DLL interface. Unfortunately, the Unity Web Player doesn't allow you to use C++-generated plugins in their web player, so the current VHToolkit doesn't work on the web.

However....

We are working on a couple of possible solutions to this:

1) We have already generated a Flash version of SmartBody (currently only works in the Flash debugger since loading time exceeds the 15 seconds that Flash gives you to load your application, but the essential workings have been successfully ported), which we are using to see if we can communicate from Flash->Unity in a web page.

2) We have talked about cross-compiling SmartBody to JavaScript, and then load that as a module into UnityThis is in active development, so with any luck, we'll have a solution in the next month or two.

 

Ari

 

 

 

March 30, 2014
12:08 am
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

I am interested to see the SmartBody working with JavaScript. Can we find the development released for general users like us?

 

Thank you.

April 2, 2014
9:53 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

The source code is available at Sourceforge. I would need to write an interface (say, using SWIG) to the underlying C++ code to enable other scripting languages such as Javascript to work with SmartBody.

 

Ari

June 11, 2014
3:06 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

I am interested to explore the web version of SmartBody. I dont see the javascript version of SmartBody. Is that at the sourceforge location http://sourceforge.net/p/smart.....ree/trunk/ ? I only see the flash version.

 

Thank you.

June 11, 2014
11:50 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Hi,

The only web-based version is the Flash version.

We have code that works with Unity, but the Unity web version requires using their own scripting language, whereas SmartBody uses C++ in a dynamic library.

There is a possibilty of building SmartBody to work with an HTML5 environment by cross compiling the code to LLVM. We haven't had the time/resources to do this yet, however.

Ari

June 13, 2014
2:17 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

Thanks for your response.

I was trying to build the flash version. It was fine till Compiling PreLoader and Console(pg 216, user manual) but I got some problems in the next step(Compiling SmartBody and Minimal SmartBody Flash Application- pg 217, user manual).

I kept the contents of trunk/cmakefiles into trunk/builddirectory/ (I hope its correct!). Then in flascc(crossbridge), I fired the command cmake CMakeLists.txt (from the path of trunk/builddirectory). I got bunch of errors as shown in the snapshot:

https://www.dropbox.com/s/1kilpohi7xxep54/sb_compile_flash.png

It seems that the gcc.exe is corrupt or not found. The gcc.exe is just 1KB in size and while exploring in some sites, they suggested that it might be  corrupted and should be replaced by working version.Will it be a good idea to update the CMakeLists.txt to point to some other gcc.exe or is there any good way around?

 

Thank you.

June 16, 2014
7:04 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

It looks like the Flash makefiles need to be updated.

Also, did you use the Cygwin that is included in the Crossbridge distribution?

 

Ari

June 17, 2014
10:27 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

Yes I used the Cygwin that is included in Crossbridge itself.

 

Thank you.

June 19, 2014
1:12 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I think I need to spend some time to make it work again. I haven't touched that build for about a year, now.

Conversely, I'm looking into Enscriptem to see if I can convert SmartBody into an HTML5-compatible format that could be used with one of the web-based game engines.

 

Ari

June 24, 2014
6:33 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

It would be really appreciable if you can provide us some hints so that we can get the flash version of SmartBody working for at least the sample applications. I can try from my side on the make files as well, if that is doable and if I can get some clues on it.

It will be awesome to have the HTML-5 compatible SmartBody too. I think the community is desperately waiting for the HTML-5 version of SmartBody.

 

Thank you.

June 25, 2014
11:06 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I took a lot at the Flash version and it's going to take some effort to get it compiling properly again. It looks like the demo I have in there (SmartBodyFlashDemo.html) isn't working anymore, either. Not sure when I'll have resources to do this; the main issue is getting the environment set up. Technically, once I have a SmartBody-flash build, all you would need to do is replace the scripts and the data files as needed.

I've looked into HTML5 and it looks processing; I've experimented with building SmartBody using Emscripten, and have been able to do so, except for the major library dependencies (Python, Boost, Xerces). For me to fully test this out, I would need to either port those libraries as well, or replace them with alternatives. Once that happens, yes, you would have an HTML5 version of SmartBody that would be web-enabled.

But again, it comes down to resources; I don't have anyone right now who can commit the month or so it would take to make this happen. If someone had a javscript/html5 version of boost, python2.7, or xerces, this could probably happen quickly.

Ari

June 27, 2014
5:11 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

How is the SimCoach application working then? Isn't that too flash version of SmartBody?

Is there anything that we can try to help on those things to make SmartBody work with HTML-5 ? If so, then please don't hesitate to let us know.

Thank you.

June 27, 2014
6:57 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

The SimCoach platform works by creating video content offline, cleverly streaming in new video content as needed. So a video containing a character response will be played after the idle video, then once it is finished, the idle video will be played again. This is fine for turn-based interactions, but the SmartBody/flash version would instead give you full interaction with the character like a video game.

It would be helpful if you could find someone who built Python, boost or xerces to JavaScript. If I had that, I think a port could be quickly constructed. Alternatively, I could replace the boost and xerces functionality with alternative functionality; that would accelerate this process as well.

 

Ari

June 27, 2014
9:43 pm
Avatar
Member
Members
Forum Posts: 47
Member Since:
March 1, 2014
sp_UserOfflineSmall Offline

Hi Ari,

May be due to seamless transition between the idle video and response video, the users feel it as single regular stream of video.

 

There are some popular tools that can help build Python scripts into javascript (ex: http://pyjs.org/ ; http://www.skulpt.org/ ; https://github.com/PythonJS/PythonJS). Though these maynot be complete but they provide most of compilation capabilities and if some of these fit our need then we can move ahead. So its important to figure out what compilation capability we need in the desired compiler.

Also, it seems to be possible to have boost for the web version (ex: http://stackoverflow.com/quest.....emscripten).

If you wish, then I can try working on some of these things.

Thank you.

July 3, 2014
5:11 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

If you are able to get Boost and Python built into Javascript runtime, that would take us pretty far towards the web port.

There is limited use of Boost in SmartBody, so we would only need to port those files (and their dependencies).

#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/bimap/bimap.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/foreach.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/labeled_graph.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/numeric/bindings/blas/blas.hpp>
#include <boost/numeric/bindings/lapack/lapack.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/ublas_vector.hpp>
#include <boost/numeric/ublas/banded.hpp>
#include <boost/numeric/ublas/lu.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include <boost/python.hpp>
#include <boost/python/args.hpp>
#include <boost/python/return_internal_reference.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/tokenizer.hpp>
#include <boost/version.hpp>
#include <boost/weak_ptr.hpp>

 

Ari

May 9, 2015
5:35 pm
Avatar
Member
Members
Forum Posts: 30
Member Since:
April 27, 2015
sp_UserOfflineSmall Offline

Hello

I'd be very interested in integrating SmartBody with web. Is still building a flash app the only way? How is the javascript version development?

Thank you.

May 11, 2015
4:58 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I've hired a programmer for the summer whose task is to port SmartBody to a web version (say, using asm.js). So, if he is successful, we should have a web version of SmartBody in the next couple of months (the main issue is porting or substituting the dependent libraries). Down the road, it might also be possible to combine this with a web-based game engine, but in the short run, I'd be happy with getting our own renderer working, which would likely be good enough for many applications.

Ari

September 21, 2015
6:20 pm
Avatar
Member
Members
Forum Posts: 30
Member Since:
April 27, 2015
sp_UserOfflineSmall Offline

Hello, Ari

What is the port progress?

Thanks

September 22, 2015
6:13 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

We have a working version (currently in the Javascript branch of the repository).

Now we are working to fix memory leaks, figuring out best practices (data formats, etc).

 

Ari

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 69

Members: 122211

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 531

Posts: 2495