Here you will find all the information required to set up your own custom sandbox.
To run our software on you will need:
How to correctly place both Kinect sensor and the projector.
Sensor and projector placement without (left) and with (right) lens shift.
There are two things You'll have to bear in mind: the Augmented Reality Sandbox Software works best when the sensor is close to the light beam source and at the same time, it [sensor] should be placed approximately above the center of the sandpit. To meet both of these requirements we suggest using a lens shift projector. It may be slightly costlier, but will provide great quality of simulation and minimize errors.
Having the projector and kinect far apart may result in parallel shifts in the projection. Those are usually not significant, but visible. We found that the best way to avoid this issue is to mount a lens shift projector close to the kinect and place them above the center of the sandpit. Such solution is only possible with this certain type of projector.
Bear in mind the Kinect sensor should be placed exactly above the center of the sandpit, facing downwards. See the overhead view image for clarification.
Drivers and packages necessary to run KinectSandbox and modules
Step by step tutorial.
For best results the application requires scrupulous calibration. The outcome of the process depends heavily on surrounding conditions, especially the lightning. It should be constant, evenly distributed and very slightly dimmed, soft daylight-like.
Make sure there are no flashing lights nearby, such as TV screens, or faulty light bulbs. Also cover the windows in case weather conditions (clouds, etc.) could affect lighting in the room.
The areas right next to the sandbox have to be nonreflective – avoid things such as oil-painted walls or tile floors. If necessary, cover them with white paper sheets.
To correctly gather calibration data, sensor needs smooth, flat and preferably white surfaces.
Our suggestion is to use cardboard boxes of three different sizes listed below. They should be arranged so that the edges of the same length contact each other and only the height varies. It’s best to not leave any gaps between boxes, however if they occur (eg. because of size of the sandpit), fill them with white paper sheets, so that the lowest surface is also plain white.
Box 1 – 20x20x20cm
Box 2 – 20x20x15cm
Box 3 – 20x20x10cm
Use this scheme to set up the boxes, starting from the edge of the sandpit:
Calibration automatic mode:
Calibration manual mode:
CalibrateEnsemble create new file (menu File > New, make sure Number of Projectors and Number of Cameras is 1) and save it to D:\ArSandbox_…\KinectSandbox_Data\StreamingAssets
It may happen that the calibration process doesn’t immediately give perfect results. This is because it uses and depends on physical objects and can be affected by their imperfections. Usually it’s a matter of few simple steps to reach the wanted level of accuracy.
The most common problem is projection being shifted compared to the actual shape of the sand. Reason behind this is the program misinterpreting or having wrong input data. First thing to do in such situation is to re-run the calibration software. If it doesn’t help, you should try repeating the actions described in the first chapter. As the lightning plays crucial role in the process, try changing it. Firstly, lower the projector’s brightness. Then, if necessary, brighten up the room. Avoid direct light sources and letting sunlight in. Check the borders inside the KinectSandbox app.
Another problem that can occur is the projection going completely dark after launching the AR-Sandbox app with new calib.xml file. In such case go to D:\Calibration\procamcalibration\_RAT_ProCamCalibration, run the CalibrateEnsemble program as administrator, open the calib.xml file (menu File > Open…) from D:\ArSandbox_…\KinectSandbox_Data\StreamingAssets and check the number assigned to the display (menu Setup > Show Projector Server Connect Displays). You will see a number on the screen (should be either 0 or 1). Remember this number and then manually edit the calib.xml file (Open with Notepad). Find the line: <displayIndex>…</displayIndex> and write the display number in place of the dots.
One last thing to check is the number of lines in the newly prepared calib.xml file. It should be precisely 187. If it is not, it means the calibration process malfunctioned and has to be repeated. Pay close attention to all the steps.
Should you still have problems with your calibration, keep the old and new calib files and contact us at [email protected]
Quick overview of the most important settings inside the application.
When you first launch the application it may turn out that the picture is flipped. This is because of the way we construct our sandboxes and believe is the best way to do this (at least without a lens shift projector). If you put the projector on the floor and project the application on the wall it will look like the lower picture. The watermark is flipped and so are the borders (we will talk more about them in a moment). However, when you set the projector vertically, like presented on the left, and stand in front of your set up, you will be facing the picture properly.Don't worry if you already mounted your device and now have a flipped picture. You can always change it in Windows' or projector's display settings. If you do so, make sure to recalibrate your sandbox.
Note: to save setting changes made inside the application, press Alt + F4 (exit). This applies to any adjustments made with the program running. There are some settings essential for the application to work correctly. First of them are the borders. Because Kinect has a 90º field of wiev, the area it sees is much larger than any sandpit and needs to be restricted. In the first picture you can see an example how borders can be set by default. Kinect sees the whole sandpit, but also some of the surrounding area. It may happen that there is an obstacle in that region, e.g. a reflective wall (see lower left picture). In such case, and this is a pretty common situation, your sandpit will end up looking like the last picture. It can also disturb the calibration process. Restrict Kinect's field of view by setting your borders along the arrows, to the point when they become visible in your sandpit. Keyboard controls inside the app are: T,Y - Left, G,H - Right, U,J - Top, I,K - Bottom. If you have already calibrated your sandbox, you may need to do it again, or try running the app with the default calib file.
Another important settings are Sandbox Top and Bottom Levels. They specify the range of the Kinect sensor. See image for more details. Presented parameters are specified in the setting file. Their values are the distances in mm. The best way to achieve good results is to tape-measure the distances and then set the right values. It can be done either when the application is running (Z, X keys for Top Level; C, V for Bottom Level; values are shown on the screen), or in the setting file in application root folder (Settings.json in KinectSandbox_Data\StreamingAssets\Settings). Remember you will have to exit the app to save your changes. Also, we recommend that the values You enter have a margin of about 50-100 mm in both directions.In the graphic You can also see one parameter called WaterDropOffset. It is the distance above the Top Level of your sandbox, required to activate the waterflow. The higher the value, the higher You will have to lift your arm to make it rain. Also the active area will shrink due to the sensor's field of view. Offset value can be changed in the app (R, F) or in the setting file (Settings.json in KinectSandbox_Data\StreamingAssets\Settings). Value range 0-300.To directly control basic water options use computer keyboard or mouse. Press space or left-click mouse to reset water - it will sink into the ground. To disable water flow press 'b' or right-click mouse. The same goes for enabling water flow again. Notice: disabling water flow does not reset current water, so You can have some in your drainage and then sculp it without unnecessarily pouring more.
The last two parameters you will need to adjust are TerrainTop&BottomLevel. They control the projected colour range in your sandbox (unlike SandboxTop/BottomLevels which described physical values). Keys to control are W, S for bottom and Q, A for top. If you set the two values close to each other, distances between neighboring isohypses will shrink - this will make sense if you have a shallow sandpit. If you want to build high mountains and deep valleys, set the two values farther apart. Two things to acknowledge: first - there is no other way to set those values than to experiment. For a standard construction (distance from Kinect to sandpit ~1,2 m) they should not depart far from the default ones. Second - TerrainBottomLevel value has to be lower than TerrainTopLevel – the number is higher, since the values are negative.
Button controller is used to switch the water simulation on and off, or reset it. With many people around the sandbox it is easy to flood the area. To avoid it, switch the water off and then back on after you are finished building. The water that is already flowing won’t disappear, until you reset it.
The button uses keyboard/mouse controls to interact with the application – space/left-click is water reset and ‘b’/right-click is water on/off. You will need a control board that emulates a computer keyboard (e.g. Arduino Leonardo). It writes space when the button is pushed and ‘b’ when held. You can download the script here (you will also need software to upload it onto the board) and connection scheme here. Another way is to use a standard computer mouse, but replace its original buttons with external ones.
You can choose any button you want, as long as it is a normally open, monostable one. Mount it to your sandbox in a well-exposed place. To avoid it getting stuck choose a place above the sandpit level.
Additional feature for expanded functionality
As the touchscreen module is now available as a software extension, you can implement it in your custom Sandbox. This allows for quick control over the application via easy to use interface.
For this feature to work, You will have to find a touchscreen that has exactly the same resolution as your projector. Then, when setting up both screens in Windows, make sure they are next to each other (horizontally, not vertically).
You will need Kinect 2 PC (it is Xbox ONE + PC adapter) You can buy refurbished one from the eBay.
Our system doesn't work with realsense. It is much much worse depth detector than Kinect 2. With Kinect 2 we get very accurate 3d model. We wish to use Azure Kinect in future.
We are going to release full video tutorial, as well as we want to update existing one. Operating buttons is very simple. You can use mouse or wireless mouse to be interface. Just get wires out form mouse buttons and connect your button. We also provide Arduino code for Arduino Leonardo/Micro pro control.
If you will make rigid frame for kinect + projector it will be stable. We have unit with wheels and tower that automatically goes up and there is no need to re-calibrate when moving unit. Calibration is very simple by the way - you need just white boxes.
Contact us, write about your project and let us think. At this moment price is very competitive.
We don't count. We wanted to have affordable price even for small organizations but if there is a science center with thousands of visitors a day they have to pay. It's just about being fair.