2024/05/27 Update: To be used with Record3D 1.10 and newer.
2022/08/16 Update: To be used with Record3D 1.7.2 and newer.
2021/07/28 Update: Now supporting higher-quality LiDAR RGB streaming. Updated for Record3D 1.6 and newer.
2020/09/17 Update: Introduced LiDAR support
This library connects Record3D's live-streaming library record3d_cpp
with Unity demo project. The goal of this library is to transform stream of RGBD video into Point Clouds that can be fed into Unity VFX Graph as attribute maps (textures).
Building on Windows is quite cumbersome, which is why I am including pre-built library.
The library consists the following file, which you can download: record3d_unity_streaming.dll
.
This library should be copied into record3d_unity_demo/Assets/Scripts
. The demo record3d_unity_demo
does already have this dll
included, so you don't need to take any further action if you use the demo on Windows.
Before installing, make sure to have installed CMake >=3.13 (this is crucial).
-
Build
record3d_cpp
-
git clone https://github.com/marek-simonik/record3d
-
cd record3d
-
Generate build files and open the .sln file in Visual Studio
md build cd build cmake -G "Visual Studio 16 2019" -A x64 ..
-
Open the generated .sln file in Visual Studio, change to Release build
-
Right click on 'record3d_cpp' > Build
-
After build, copy all .lib files to the "record3d\build\Release" folder (needed in further steps):
# In the "record3d\build" folder: cp libs\win\lzfse-lzfse-1.0\Release\lzfse.lib Release\ cp libs\win\libusbmuxd\Release\usbmuxd.lib Release\ cp libs\win\libusbmuxd\libs\libplist\Release\plist.lib Release\
-
-
Build
record3d_unity_streaming
(this library)-
git clone https://github.com/marek-simonik/record3d_unity_streaming
-
cd record3d_unity_streaming
-
Generate build files and open the .sln file in Visual Studio
md build cd build cmake -G "Visual Studio 16 2019" -A x64 ..
-
Open the generated .sln file in Visual Studio, change to Release build
-
record3d_unity_streaming > Right Click > Properties > Linker > General > Additional Library Directories >
[path-to-record3d]\build\Release;%(AdditionalLibraryDirectories)
-
record3d_unity_streaming > Right Click > Properties > Linker > Input > Additional Dependencies > add "
ws2_32.lib;lzfse.lib;plist.lib;usbmuxd.lib;record3d_cpp.lib;
" -
Right click on 'record3d_unity_streaming' > Build
-
Make sure that
record3d_unity_streaming.dll
(located in[record3d_unity_streaming]\build\Release
) is in thePATH
, this can be done in two ways: 2. Copyrecord3d_unity_streaming.dll
intoC:\Windows\System32
and/orC:\Windows\SysWOW64
- Add
[record3d_unity_streaming]\build\Release
to thePATH
- Add
-
You can now open the Unity demo project.
Similar to Windows, only one dylib
file is needed: librecord3d_unity_streaming.dylib
. Copy the .dylib
file into /usr/local/lib/
. If there is no /usr/local/lib/
folder on your disk, then create it.
Before building, make sure you have installed CMake >=3.13 (this is crucial). After you have CMake installed, you can proceed to building and installing 2 libraries;
-
record3d_cpp
— handles raw RGBD streaming from the Record3D iOS app via USB cable to a computer# Install the record3d_cpp library git clone https://github.com/marek-simonik/record3d cd record3d mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. make -j8 record3d_cpp sudo make install
-
record3d_unity_streaming
(this library) — acts as a bridging library betweenrecord3d_cpp
and Unity; produces point cloud (texture) data fromrecord3d_cpp
's RGBD stream and provides API suitable for C# wrapper code# Install the record3d_unity_streaming library git clone https://github.com/marek-simonik/record3d_unity_streaming cd record3d_unity_streaming mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. make -j8 sudo make install
If the installation of both libraries was successful, you can run the Unity demo project.