RealSenseTOP D435, let's make it on GitHub!

Update 2018-03-06:
It works! Check out the repo for the most up-to-date information.

This visual studio project compiles and creates a dll, but the dll fails to load in TouchDesigner (follow the README instructions). For reference I’m looking at this example … es/capture

Here’s an overview of the modifications from the OpenGLTOP in C:\Program Files\Derivative\TouchDesigner099\Samples\CPlusPlus\OpenGLTOP


bool hasStarted = false; // declare a private variable


// at the very top of the file #include <librealsense2/rs.hpp> // Include RealSense Cross Platform API rs2::pipeline pipe;

[code]// inside the execute function
if (!hasStarted) {
hasStarted = true;


Later, the missing pieces would involve

rs2::frameset data = pipe.wait_for_frames(); data.get_depth_frame(); // and rendering into the context

Teach a man to fish so that I can do this for the 100 other “Kinect replacements” coming out :smiley:

If it’s failing to load the .dll it’s likely because there are other .dlls it depends on that it can’t find. You can use the Dependency Walker took you can download from microsoft to help determine what .dll it needs. They should usually be placed in the same directory as your .dll.

Thanks for the tip. Things got better once I pasted the dlls. Now I’m stuck because the inner section never gets executed.

rs2::frameset frames; if (pipe.poll_for_frames(&frames)) { // get the data and render into TD... }
There’s an alternative way of getting the data with

rs2::frameset data = pipe.wait_for_frames();

but that errors out with RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE. That error doesn’t make sense to me because I think the firmware is the latest (

I know realsense will be supported in a future build of TD. I’m just trying to get familiar with the realsense library and c++ so that I can combine it with a skeleton tracking API soon.

I just finished my work on this, next posted 2018.20000 series will have it. I’m not sure about that error, sorry. I didn’t run into anything like that.

The reason I’m still trying out a C++ version is to use the point cloud with the IR emitter disabled.

It would be a quick modification around here … P.cpp#L145

dpt.set_option(RS2_OPTION_EMITTER_ENABLED, 0);

This C++ version works well with one or two cameras, but I have 8 cameras going into a PC via fast USB controllers, and in that situation some of the C++ RealSense TOPS cook at 4ms/frame. Even with 8 cameras, the built-in RealSense TOP isn’t slow like this, but it has the IR emitter always enabled. So, I’m hoping someone might have a tip on speeding up this C++ version.

I’ll add this feature to the TOP today.

The main reason the TOP is faster than your .dll is because the TOP does all of it’s image capturing and even memcpy operations in another thread. The main reason outputFormat->cpuPixelData has multiple buffers available to you is because this gives you the ability to update one or more buffers in another thread, and have the main thread that calls execute() just hand off already filled buffer to be output.

Ok the IR emitter control will be in builds 2018.25950 or later.