Comments (10)
Yes, but I can't say when.
You might be interested in the 'desktopDuplication' option in the projection mapping sample (it is described briefly in the README). It's a quick way to get the projection mapping sample to work with any program that renders to the screen. The support for it in the sample code is a bit sketchy-- some things are hard coded, but depending on your needs, it may be a very nice solution. Also note that in CalibrateEnsemble you can save the calibrated room geometry to an .OBJ file that is easily imported to programs like Unity.
from roomalivetoolkit.
Hi,
After calibration, is it possible to use the transformation matrix found in calibration.xml and apply it in unity(bypassing roomalive after calibration).
Or are things more complicated than that?
from roomalivetoolkit.
Yes. One thing you have to deal with is the handedness of the coordinate systems. RoomAliive Toolkit uses a right handed coordinate system (like Kinect), while Unity uses a left handed coordinate system.
from roomalivetoolkit.
Thanks,
How do I get the matrix that will get the output rendered from the Kinect's point of view rather than the projectors point of view?
from roomalivetoolkit.
Look at how GraphicsTransforms.ProjectionMatrixFromCameraMatrix is called in CalibrateEnsemble.or the sample. You can create a projection matrix for the Kinect depth or color camera in the same way that the sample creates a projection matrix for the projector. You'll need a view matrix for the color or depth camera as well. You can see how this is done in the sample for the projector; in you need the view matrix that takes a point in the world coordinate frame into the camera you are interested in.
from roomalivetoolkit.
Has anybody integrated with Unity successfully?
from roomalivetoolkit.
Hi Guys
I am having trouble getting the projection matrix correct in unity3d.
I tried to use the same method that GraphicsTransforms.ProjectionMatrixFromCameraMatrix uses.
However GraphicsTransforms.ProjectionMatrixFromCameraMatrix calculates matrix that projects to a volume where x,y in [-1,1] and in z[0,1]
Is that because SharpDX assumes that the viewport clipping volume ranges from -1.0 to 1.0 in X, and from 1.0 to -1.0 in Y?
Unity3D assumes that the viewport clipping volume ranges from 0 to 1 for both X and Y (x right, y up) so how do I calculate the projection matrix so that it projects to a volume where x,y in [0,1]?
Thanks
from roomalivetoolkit.
I finally was able to get the projection matrix correct in unity3d :)
So I would like to correct my previous post and provide a code snippet to how you can calculate the projection matrix for Unity3D 👍
So one thing I learned (please correct if I am wrong) is that Canonical View Volume and ViewPort are two different things: Canonical View Volume is 3d Box where the projection matrix projects into, and ViewPort is 2d rectangle that takes the X,Y values of Canonical View Volume and normalize them to some defined range which is (0,1) for both X and Y (X is right, Y is up) in Unity3D. So projection matrix has nothing to do with ViewPort.
The reason that GraphicsTransforms.ProjectionMatrixFromCameraMatrix didn't work out of the box is that RoomAlive uses RH coordinate system as @thundercarrot mentioned, and Unity3D uses LH coordinate system, so we need to tweak the matrix to match the correct coordinate system.
Here is what I did
float dx = cx - w / 2;
float dy = cy - h / 2;
float near = 0.1f;
float far = 100.0f;
Matrix4x4 projectionMatrix = new Matrix4x4();
Vector4 row0 = new Vector4((2f * fx / w), 0,(2f * dx / w),0);
Vector4 row1 = new Vector4(0,2f * fy / h,-2f * (dy +1f) / h, 0);
Vector4 row2 = new Vector4(0,0,-(far +near) / (far - near),-near *(1+ (far+near)/(far-near)));
Vector4 row3 = new Vector4(0,0,-1, 0);
projectionMatrix.SetRow(0, row0);
projectionMatrix.SetRow(1, row1);
projectionMatrix.SetRow(2, row2);
projectionMatrix.SetRow(3, row3);
Now my projectors see what they project :)
Thanks
from roomalivetoolkit.
Great to hear that @zaherj ,
Will hopefully try to test out what you've been able to achieve.
Could you possibly share a sample video?
from roomalivetoolkit.
Since we have now released a full Unity codebase, this issue is closed.
from roomalivetoolkit.
Related Issues (20)
- Cannot Build in Unity 2017.1.1f1 HOT 2
- DLP Link 3D Glasses HOT 1
- NullReferenceException when running build HOT 4
- Interacting with Game Objects HOT 4
- kinect server depth map to be smooth out gradual grayscale HOT 3
- understanding about calibration result (depthToColorTransform&projector pose) HOT 2
- Ultra Short Throw projectors invalid?! HOT 13
- Unity and JPEG Compression HOT 19
- Body Tracking question HOT 3
- Recording Playback in Unity can't handle loopback HOT 1
- 3d object appears in game view but but in stand alone application HOT 10
- Can't Find Kinect Servers on Other IP Schemes HOT 1
- ProjectorMappingSample Problem after pass augment HOT 4
- I need remove background .Only for mesh player.
- Building Standalone exe from Unity and only got scene view instead of game view
- Error : "Can't add script behaviour CallbackExecutor. The script needs to derive from Monobehaviour"
- This repo is missing important files HOT 4
- Whack A Mole!
- is this project still under development, since last update was 6 years ago? HOT 1
- adding face tracking to roomalive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roomalivetoolkit.