Reputation: 1148
I am trying to augment the live RGBA stream from Kinect sensor with some 3D models using XNA (i.e. adding 3D models into a live video scene).
I succeeded in augmenting the scene with 2D sprites (e.g. circles) but I cannot add 3D objects (I think the objects are there but they hide because of the video texture). I can see 3D objects if I don't draw the video stream, but as I start applying video stream, objects disappear.
Upvotes: 0
Views: 458
Reputation: 471
In XNA 2D and 3D rendering calls are handled differently:
So what you want to check is if the z coordinates of the objects you want to render are right:
If the rendered pixels of your 3D model are farther away than your RGBD data, your RGBD video stream overwrites your 3D model's pixel or they are discarded right away if they are rendered after your RGBD data.
Try moving your whole RGBD data away from the camera and see if your 3D model appears. To achieve this just increment the depth values of your data. Otherwise decrement your 3D models z coordinate until you can see it. Watch out as this may result in the 3D model being rendered behind the camera.
Upvotes: 2