I want to be able to render a grid, similar to what you usually get in higher level model editors like Blender, Maya, etc. This should be a completely trivial task, but somehow I’ve found myself stuck for almost a whole day. Seems like there isn’t a single tutorial/example out there on this particular problem ..
I am currently in the need to primarily store 3D vector coordinates (possible up to maximum precision in terms of decimals) in C++. This includes the use of 3 double (/ float) values for x, y and z, respectively. I know I can use arrays, structures, or classes, but what I am aiming for is ..
how would you get a 2D motion vector from two points in 3D space, maybe depending on the rotation of the camera the distance between the two points and the distance from the camera to the points? The first 3D point is from the current frame and the 2nd one is from the last frame. ..
I want to hand implement back-face culling, before passing the tris to the GPU. So I am trying to understand the algorithm. So Wikipedia says for back-face culling to use the first vertex in the triangle: Does the vertex on the triangle chosen to create the view vector (the view vector in the Wikipedia picture ..
I try to implement a quaternion-based camera rotating like FPS game controlled by mouse movement, but can move freely. The coordinate system of camera space: Forwad vector: -z-axis Up vector: +y-axis The code of constructing camera space: mPosition = glm::vec3(0.0f, 0.0f, 2.0f) mForward = glm::normalize(glm::vec3(0.0f, 0.0f, 0.0f) – mPosition); mUp = glm::vec3(0.0f, 1.0f, 0.0f); mCameraRotation ..
I have this code snippet that should – at last in my mind rotate the billboarded object around its Z-axis (objectLookAt) to align it with camera’s right vector (cameraRight). To do this I try to get angle between the object’s right vector and camera’s right vector and then rotating around objects lookAt vector (objects Z ..
I am rendering a 3d model with OpenGL, and when I render in debug mode it looks fine, but when I switch to release mode the vertices mess up. here is my code model class: https://pastebin.pl/view/0ca03509 mesh class: https://pastebin.pl/view/8508395c main cpp file: https://pastebin.pl/view/972d0b9e Debug mode screenshot: https://i.imgur.com/QiCp0Eu.png Release mode screenshot: https://i.imgur.com/0UcnKvR.png please help Source: Windows ..
Image negative effect is typically done like this: pixel = rgb(1, 1 ,1) – pixel but if the pixel color is close to gray, than: pixel = rgb(1, 1, 1) – rgb(0.5, 0.5, 0.5) = 0.5 That’s not a problem and it’s how it should be, but for me it is, I am making a ..
I am new to Qt3D and I am trying to figure out a way to render a 2D image on top of a mesh and also control the transparency of the 2D image. I googled for it but could not find any solution. Looking at some of the examples provided with Qt i was able ..
The problem is : given 2 known 3D points (A and B), forming a ray R find the Z coordinate of C that is lying on R, but only knowing X and Y… Sounds easy at first, but now I am lost… Help appreciated Source: Windows Que..