microsoft / RoomAliveToolkit

Other
715 stars 191 forks source link

Going beyond the toolkit #43

Closed Cybertron-Joy closed 7 years ago

Cybertron-Joy commented 8 years ago

Hello Andy,

Based on your detailed instruction and code, I have managed to get your projection mapping samples working well. Next, I would like to create an 'virtual window' that updates in real time on my wall.

Currently, I am stuck on the very first step: replacing the "FloorPlan.obj" with my own obj file. Both "view" and "projection" windows are black.

I am using one Kinect and one projector. Live head-tracking is enabled and works fine with "FloorPlan.obj".

Thank you.

thundercarrot commented 8 years ago

Here are some strategies:

Verify that the .obj file is being loaded correctly by stepping through the obj loading code. Verify that if the .obj file refers to any textures that they are available and loaded correctly.

Turn wireframe rendering on (search for "Solid", change that to "Wireframe").

Consider that the scale of your model may be very different than what the sample expects; I believe it works in meters.

Try the "Quad.obj" model that is included with the sample (it is in the same directory as Floorplan.obj).

I hope this helps.

devhci commented 8 years ago

Hi @Cybertron-Joy @thundercarrot 's point "Consider that the scale of your model may be very different than what the sample expects" is the key.

I also faced the same issue. You have to reduce/adjust the size of you .obj from code. Just try changing with different scaling ratios in your code as per your .obj size
var world = SharpDX.Matrix.Scaling(1.0f) * SharpDX.Matrix.RotationY(90.0f / 180.0f * (float)Math.PI) *