Slastraf Posted February 28, 2024 Posted February 28, 2024 I need more data on how the Ultra Engine works. I had great success combining the Vicon SDK headers, dlls ..., inside Ultra Engine. It is used to track real life objects into virtual space. The tracking translation works fine, however I have great issues adjusting the details. The Vicon SDK Documentation says this about their conventions Units "Positions are expressed in millimeters. Rotation is expressed in radians." When I convert from radians to degrees to be applicable inside Ultra Engine, there are various issues, such as the object flipping at certain angles etc. I convert by multiplying each vector component by (180 / 3.14) Instead of Euler XYZ there are also functions to get the Quat , x y z w . This had no flipping issues but the axis are not aligned. "The quaternion is of the form (x, y, z, w) where w is the real component and x, y and z are the imaginary components. N.B. This is different from that used in many other applications, which use (w, x, y, z)." Ultra Engine uses x,y,z,w as i remember from the documentation. However the axis are still flipped. I made a video to show how the tracking currently works: https://ody.sh/b85p8I5GK8 (odysee) SetAxisMapping() : Vicon Data uses a right-handed coordinate system, with +X forward, +Y left, and +Z up I am at a loss at how to properly implement this. Quote
Slastraf Posted February 28, 2024 Author Posted February 28, 2024 Update Ultra The engine uses a left-handed coordinate system. The X axis points to the right, the Y axis points up, and the Z axis points forward. this->client->SetAxisMapping( ViconDataStreamSDK::CPP::Direction::Right, ViconDataStreamSDK::CPP::Direction::Up, // Y-up ViconDataStreamSDK::CPP::Direction::Forward ); the rotation axis are still wrong. I have a reference live view inside vicon tracker, and the rotations are very different Quote
Solution Slastraf Posted February 28, 2024 Author Solution Posted February 28, 2024 (Ultra Engine Discord) 1 Quote
Slastraf Posted February 28, 2024 Author Posted February 28, 2024 //radians to degrees rot.x = UltraEngine::Degrees(rot.x); rot.y = UltraEngine::Degrees(rot.y); rot.z = UltraEngine::Degrees(rot.z); // prevent gimbal lock this->model->SetRotation(0, 0, 0); this->model->Turn(rot.x, 0.0, 0.0); this->model->Turn(0.0, rot.y, 0.0); this->model->Turn(0.0, 0.0, rot.z); this is example code to prevent gimbal lock. i do no longer use quaternions. but from radians eulers converted instead. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.