Setting up Asset Server with Unity3D over local-network

with one comment

There are two problems faced by everyone who is starting with Unity3D. First is version control – There is virtually no rollback mechanism and any changes done at the project level is absolutely irreversible which causes most of the data loss. Second is collaboration – if you are working as a part of a team, it is absolutely painful to transfer and sync files across workstations. Unity has an elegant built in solution for both these problems with its asset server and team license. But setting up an simple local asset server with version control is tough if you are an absolute beginner let alone making it remotely accessible. So here is a walk through for setting up an asset server over a local network in windows environment which I figured out after spending a some time.

The Basics:

Before we go into the entire process, it is better to understand how a local network works and how does a server – client relationship works in it. When I say a local network, I mean a set of computers connected through wifi/lan with or without a router. Here the router is also a computer in itself (usually running an embedded Linux) which is capable of only one specialised function – ‘routing’ traffic between computers inside and outside of the network.

I think it is better to understand the setup using a real world analogy. Consider every computer as a house/property in real-world and communication between them as sending mail between these properties. Here the local network would be a neighbourhood and the router would be a neighbourhood post office. Post office is a property in itself but its only purpose is handling mail.

Now imagine that you are in property A and a letter has to be sent to Property B within the neighbourhood. So naturally you will write the address of property B on the envelope and send it to the post office and the post office delivers it to property B. Here the address of a property has a digital counterpart – IP address. IP address is unique to every computer within a local network and even the router (post office) has one. Since post office has a fixed address, all you mail by default goes to the post office. This is a simple process and it is exactly how a local network of computers works, except for a small complication.

Properties usually don’t have just one occupant; they have multiple people living in them. So what if you want to send a letter to an occupant living on property B? You write the number of his mailbox along with the address. Isn’t it? This is where the concept of ‘ports’ come in. so imagine a computer in a local network with multiple programs running on it. Every program which wants to connect to another specifically listens to a ‘port’ allocated to it, so that any packet received at the port directly goes to the program. The diagram below illustrates the concept.

loc

Translating this concept to our unity setup, we have two types of programs, unity asset server and the Unity3D software itself. unity asset server will reside in one computer in the network which will be our server and listen to a specific port and Unity3D software (client) will be residing in all the computers in the network. One interesting case in this setup is that it is possible to have a Unity3D (client) running on the server computer itself. The diagram below illustrates the setup,

loc2

With this background on the overall setup, now we can move forward to implement this in the network.

Requirements:

  • Unity3D installed with Pro licence – Specifically, Team license [link] (in all machines)
  • TKdiff installer [download]
  • Unity Asset Server installer [download] (not cache server)

Install and Start the Asset Server:

This is a straightforward step except for the admin password, which is really important. Make sure that you remember this for later. This process has to be done only on server computer. Once installed and started, the asset server program in the server machine starts listening to the port 10733.

Find out your server Address and Add a Firewall exception:

With the asset server running in the server computer, we need to know the address of the server in the network to communicate with it. It can be found out as shown in screenshots below. (Remember that if you constantly shuffle your computers in the network, the server’s address might change as well. To overcome this you can either set the ip of the server manually in the TCP/IPv4 properties or can access the settings in your router to make it assign constant ip to certain computers). Note down your IP address and keep it aside for later use.

Since the windows firewall usually blocks all connections to programs in the computer unless it is explicitly allowed, any incoming and outgoing connections through this port has to be set to be allowed in all types of networks (private to be specific) as shown below.

Now out server is ready and accepting connections. now we have to connect to this server via unity3D client.

Install and Setup tkDiff:

Before connecting to the asset server we need to some preparation at client side as well. First is to install a diff tool – tkDiff. Installing tkDiff is straightforward as well. Since this is an external software which unity uses to display and resolve the difference between two files clashing during the sync (commit), you have to tell unity to use this through the preferences dialog after installation. This process has to be done on all the client computers.

Set Google DNS: This is not that important/ necessary at local network but do set your dns servers to google DNS whenever you run into strange bugs (sometimes your public IP and local ip can be the same creating problems)

Using the Asset Server:

Its done! The server is set up and the clients are ready to connect to the server. To test the availability of the server from the client, you can use this app (https://code.google.com/p/paping/) with your server address and 10733 port. Now we have to set up projects and users in the server for the client to connect to the network – this is the administration and in unity asset server this has to carried out from the client end for decent GUI.

Administration: The administration is done through the asset server window (ctrl+0) in unity 3D, as shown below.

Now there is a project folder (actually a database) created in the server machine to which we’ll connect our local project folders in Unity3D running in client machines.

Client-side: Now from same asset server (ctrl+0) window, we can connect to the server from the overview tab. Here the server IP is the same but the username and password would be the one we created using administration.

Thats it… done. Now you have a proper asset server managing your project files which can accessed and edited collaboratively by the users (as allowed in the administration panel), with version control.

For details on using the version control and asset server (pulling updates, committing changes, resolving conflicts etc.) please check this documentation. If you need an introduction to version control in general consult here  (particularly the ‘Centralised VC’ section). Hope this is useful.

Written by sbmkvp

October 25, 2013 at 1:46 pm

Dissertation – Part 1 – Prolepsis

leave a comment »

Its been a month since I have submitted my dissertation and as promised in the previous posts (http://goo.gl/XqYvuP and http://goo.gl/c7Lvu6 ) now it’s time to start blogging about the dissertation and its outputs. So starting from today I would try to do one post every day  for at least 2 weeks, talking about one aspect of my dissertation, leading up to the final results and conclusions.

To give brief introduction, In my dissertation (titled-“Network theory approach on modelling occurrence of Road Accidents – Case study UK”) I set out to create a dual graph of UK roads, attach the Road accidents data to the graph, find patterns in the distribution of accidents in the dual graph and find correlations between this distribution and the properties of the network.

Today, as a start I want to do a flash-forward into the whole process and share one of the key outputs produced as a part of the dissertation – A static visualisation of the dual graph of the entire road network of UK (England, Scotland and Wales) showing the betweenness centrality of each and every node.

Betweenness Centralities - Road Network, UK

Explanation: The above visualisation shows all the roads in UK as points (simplified by averaging the coordinates of their constituent segments)  and intersections between roads as lines connecting the corresponding points. The size of the points show the betweenness centrality of the corresponding roads in the information space. To put it simply, the visualisation highlights the most central roads in UK when the network is resolved as a dual graph. We can see that M25 is the most central road in the whole network with  a the highest probability of being in a shortest path derived between any two random roads in the network. The visualisation is produced using Processing.

Though it is simple plot of a series of data on a 2D plane, lot of things have been done in the background to create this abstract representation of the UK road network, about which I would be blogging in detail starting from tomorrow. I am hoping this series of posts are interesting to the readers and help me identify all the holes, drawbacks and errors in my research process.

Written by sbmkvp

October 5, 2013 at 7:18 pm

Webkit Speech API and Google Maps

with 4 comments

For the past couple of weeks in addition to working for the dissertation project, I was working sporadically on a demo of a speech integrated map using x-webkit-speech API provided by Google Chrome and Google Maps JavaScript API.Now that the dissertation is over, here is the final polished version of the demo, (http://goo.gl/pqYUsN)

Demo for mixing -x-webkit-speech and google maps API

The current functions available with this map are,

1) Speak to navigate – Click on the microphone button (or  click “ctrl+alt+.” ) on the text box and start speaking. The field will recognise when you stop speaking, analyse and interpret the sound as text and if it is a place,  takes you right to place you just spoke.

2) Zoom and Pan – you can use the same trick with some preliminary commands as well, the system as of now understands ,

east direction“, “west direction“, “south direction” and “north direction” will pan the map in the corresponding direction.
zoom in/ zoom out ” zooms the map.

3) Other commands,

satellite – switches the map to a satellite map
simple – switched the map to, above shown simplified default look and feel.

As usual, I request the readers to give it a try and share the results & problems in the comments section below. Also feel free to put in your suggestions and point out any mistakes.

Simple Random Network

leave a comment »

Random Network

As I have started working on my dissertation full-flegedly, I have been reading a lot on networks and the properties of networks. This work is a part of the reading process where I built a simple random network generator in processing so that I can understand the the stuff I am reading better. The generator can be accessed here (http://balaspa.50webs.com/r_net/) and it is really fun to experiment with simple Erdos-Renyi’s random network. The instructions are included in the page.

Written by sbmkvp

July 1, 2013 at 12:10 pm

An Eye on IRIS – Competition Entry

leave a comment »

Our team (Daniel, Kostas and I) have just finished doing 3 entries for the  competition – An eye on IRIS, which aims to produce visualization of the data on esteems won by UCL researchers all around the world for which had been provided with a small subset of the IRIS database.

The major aspects of the work was Geo-coding the database using the address/organisation information present in it and Visualizing the database so that it gives both overall and detailed information about the database. We spent a lot of time and energy in the cleaning and organizing the data using Omniscope (credits: Dan) and then used Omniscope, JavaScript, Google Maps API and Processing  to visualize it. Below is one of the three visualizations produced by the team which uses JS and Google Maps API. The interactive version of the visualizations can be found at http://balaspa.comuf.com/

An Eye on IRIS - Competition Entry

This particular visualisation uses heatmapLayer feature from the visualisation library, marker clusterer from markercluster.js, geodesic lines for the flow lines and CSS+ JavaScript to display the info window.

Written by sbmkvp

June 30, 2013 at 9:44 pm

UCLive – A Live Map for a Living Campus

leave a comment »

New project. New Blog. Following up the group project in the M.Res program, which I mentioned in the previous post, we (Dan, Ayana, Nicola and I) have created a new, separate blog dedicated for the project. The blog is hosted at http://ucliveproject.wordpress.com/ would request to give it a look for a broad overview and follow the same for updates and more in-depth coverage on the tools and techniques employed.

Blog Preview

UCLive – A Live Map for a Living Campus

Written by sbmkvp

June 18, 2013 at 3:55 pm

AR and ABM with Unity + NyARtoolkit

leave a comment »

This work was done as a part of the group project we are doing in the Spatial Simulation and Modelling module in the M.Res, CASA. The project team is Daniel Lam, Ayana Kito, Nicola Clark and myself and the overall theme is “Living city”. As a part of the exploratory phase I was working on Augmented Reality(AR), 3D (glasses) and Kinect as potential tools for the project. The idea for the exercise was to explore to find out the most suitable tools available to implement a strong AR component and to make a demo to demonstrate what can be done with them. The result is as below.

[vimeo 65742281 w=700]

This a screen grab from the unity application running the scene. The model and moving agents were done by Dan (link). The AR is built using NyARtoolkit from here. The challenge here was to understand the workings of the NyARtoolkit for unity which has virtually zero documentation and tutorials  online, which I think have been overcome substantially. After 2 weeks of (inefficient) work on this now I am considering shifting the whole focus to figure out the other plugin for AR – Vuforia by Qualcomm. Will be posting regularly on futher developments regularly.

Written by sbmkvp

May 9, 2013 at 2:58 am