Skip to main content

Questions tagged [matrix]

A 2D array of numbers, symbols or expressions, arranged in rows and columns. Each row must have the same number of columns. The numbers, symbols or expressions themselves are called elements or entries.

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

I am trying to do a SAT OBB collision test using OBBs that are represented as a 3D position (\$c_0\$ and \$c_1\$) and a 3x3 rotation/scale matrix (\$A\$ and \$B\$), where the columns of the rotation ...
CPlus's user avatar
  • 153
0 votes
0 answers
49 views

Designing a space game, where each ship has a certain size/ number of layers of armor. for example 3 layers size 7.. .Which would look like this: ...
Pliny's user avatar
  • 111
0 votes
0 answers
97 views

I was trying to make a 3d renderer in Java and was very confused about how to multiply the camera matrices correctly. So for the camera transformation matrix (T) I need a translation matrix (C) and ...
ThatRandomOctoling's user avatar
0 votes
0 answers
87 views

I have 2 rotation matrixes than work in a world that have three dimensions (X, Y and Z) being Y the one of the height. One of such rotations works using Y dimension, from the point of the center of ...
user57129's user avatar
  • 133
0 votes
0 answers
104 views

So I'm trying to figure out the model, view and projection matrices. I can, with some effort, find my drawings (3x3x3 structure of cubes) in 3D space and it looks like: The problem is, the cubes seem ...
Valtsuh's user avatar
  • 139
0 votes
2 answers
119 views

I have a MAT4 structure. ...
Valtsuh's user avatar
  • 139
0 votes
1 answer
218 views

I need help on something I'm struggling with very much. I am working on a TouchDesigner patch where I have a Camera COMP with rotation on x, y and z axes. I need the formulas to convert such rotations ...
Alessio Mastrorillo's user avatar
0 votes
1 answer
163 views

I'm trying to draw a hollow rectangle (i.e. the border of a rectangle without the middle) using a unit square plus normals. The actual positions are being calculated in my vertex shader. For example, ...
junglie85's user avatar
  • 123
0 votes
0 answers
579 views

For my project I am turning my CharacterBody3D 90 degrees on the x-axis towards a wall. To achieve this I set basis.Z to the <...
NEWBIE's user avatar
  • 23
0 votes
0 answers
106 views

When I calculated the inverse matrix, I found that the error in using the float data type would cause the inverse matrix calculation error. Is there any good solution? ...
noodle_run's user avatar
0 votes
0 answers
133 views

I have been searching around for a solution to this but still haven't been able to use it or find it, the thing is i need the Screen Position of an object that is being seen, for this i have three ...
user57129's user avatar
  • 133
2 votes
1 answer
690 views

From what I can tell Godot uses Projection for 4x4 matrixes, but I see no way to generate a localtoworldmatrix from a given transform in Godot, how do I do this?
Ethan's user avatar
  • 145
0 votes
0 answers
47 views

This is how I (possibly mistakenly) understand it. Please correct me if I am wrong. Assuming a 4x4 matrix composed of vectors v0 through v3 is stored in a one-dimensional array with indices [00] ...
Michael Ball's user avatar
0 votes
1 answer
75 views

I ask for help - I need to rotate the UV scan inside the quad by a certain angle (set by a parameter) so that the result is embedded in the original UV, and the missing areas are repeat edge pixels. ...
AleVerDes's user avatar
2 votes
0 answers
138 views

I want to rotate a 2D orthographic projection around the centre point of my view. However, something is off (it looks like a translation) but I'm not sure what. To put some concrete values on the ...
junglie85's user avatar
  • 123
0 votes
1 answer
202 views

If I have the inertia tensor relative to the center of mass, is that the same as the inertia tensor in body coordinates? If no, can you please explain the difference and how do I numerically calculate ...
Learning CG's user avatar
0 votes
1 answer
155 views

I am trying to implement a program in Direct3D 11 which uses techniques like deferred shading and shadowmapping, but when I create my gBuffers, the position looks strange. After researching a bit I ...
Charlie.Q's user avatar
0 votes
1 answer
1k views

For various reasons I am building a very simple graphics engine. I have a pretty good 2D thing using plain SDL2 and C that essentially boils down to a single "putpixel" function. I can ...
MalphasWats's user avatar
0 votes
1 answer
62 views

I have VC++ code for DX9 that draws shadows perfectly. ...
black4joss's user avatar
0 votes
1 answer
130 views

I have two meshes (A and B) and I know that a triangle in A has the same size and same angles as a triangle in B. For simplicity, suppose A is an octahedron and B is a tetrahedron. And suppose the ...
nkint's user avatar
  • 961
1 vote
1 answer
835 views

I want to create an orbit camera with zooming, panning, and rotation. I used the following examples to create cameras: https://stackoverflow.com/questions/54400422/how-to-implement-altmmb-camera-...
Wusiki Jeronii's user avatar
0 votes
1 answer
1k views

I was wondering if it was possible to calculate a lookat position from the translation and rotation matrices (aka the building blocks of my view matrix). I need the lookAt position to implement a ...
oli2's user avatar
  • 3
0 votes
2 answers
192 views

I'm trying to determine what coordinates are in one space when given a point in another space. For example, I've got a Matrix4x4 that I can use to convert a point in unity's world space to a skewed ...
Hex Crown's user avatar
0 votes
1 answer
115 views

I need to draw a tilemap for a 2d game. For that I created vertices with their relative positions already hard baked. The coordinates start top-left with (0f, 0f) and z is always 0. I rendered them to ...
codymanix's user avatar
  • 394
0 votes
1 answer
85 views

I have a bool[,] Array for keeping track of Nations that are either at war(true) or neutral(false). The problem Im having is that when going over the matrix, to display al wars in UI elements, it will ...
questioneeeeer's user avatar
0 votes
1 answer
82 views

I've run into an issue when trying to write a simple rendering program in D3D11. I'm 90% sure it's to do with some faulty matrix multiplication or generation, but I've tried debugging the values of ...
vK 3 1 RON's user avatar
3 votes
2 answers
2k views

Is there a general method to convert a matrix transformation from one coordinate system to another, so that the resulting transformation looks the same on screen? For example: There are some ...
thalm's user avatar
  • 257
0 votes
0 answers
431 views

I haven't used OpenGL for a long time and have trouble setting up a 2D screen where the upper left window coordinates are (0,0) and the width and height of the ...
stuv_2028's user avatar
0 votes
2 answers
181 views

I have a ray and its direction is (o,d). Multiply it by the model matrix to rotate the model. ...
USSRCoder's user avatar
0 votes
0 answers
193 views

I have just begun learning some 3d mathematics and OpenGL (trying to implement skeleton animation). I am stuck here when reading a book(Advanced Methods in Computer Graphics). I understand the first ...
potter john's user avatar
0 votes
1 answer
383 views

I'm currently adding a billboard mode to animated sprites and static sprites in my 3D engine. The code below works fine, but I want to know if a more optimized solution exists. I've heard about ...
Ra1jin's user avatar
  • 3
0 votes
1 answer
694 views

I'd like to have a map in my pygame game but don't want to waste time moving each individual object in it. To resolve this, I'd like to iterate over a list like this: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
CodeWizard777's user avatar
1 vote
0 answers
234 views

I have an issue with calculating transformation matrices for animation mesh deformation using glm in c++ I have a class Bone which does the basic calculation which does have a current local position (...
NoFr1ends's user avatar
1 vote
0 answers
434 views

I am working with Collada and GLTF. Say I have a humanoid with 3 bones with the following hierarchy: B0(root) → B1 → B2. Terminology: bind pose is the same thing ...
Kroma's user avatar
  • 111
0 votes
1 answer
100 views

I am currently struggling with an animation I made that I would like applied to multiple models, all different, but from the same vertices. I already have a custom gltf importer ready but I need to ...
Kroma's user avatar
  • 111
0 votes
1 answer
277 views

I'm writing an OpenGL/DX11 Windows/Linux "engine" and I've encountered a confusing behavior in DX, specifically. For math, I'm using GLM, which means all of my HLSL ...
pdm's user avatar
  • 103
0 votes
1 answer
105 views

This is my code that draws a top down view tile based map. But Iam do not know how high the camera needs to be placed in the sky so that the map is fully visible so that nothing is cut away and I do ...
codymanix's user avatar
  • 394
0 votes
1 answer
2k views

In my engine, camera is just any other object in the scene. It has a transform -- position, rotation (quaternion), and scale (ignored for camera view matrix). I want to convert this to the camera's ...
Gasim's user avatar
  • 199
0 votes
1 answer
263 views

I have the following problem. I have a camera that is initially looking at a cube. The cube is with center at (0, 0, 0). The camera that is initially on (0, 0, 60). The camera can rotate and translate ...
Teodor Dyakov's user avatar
1 vote
1 answer
234 views

I'm trying to use Unity Job system to speed up some calculation related to Reaction-Diffusion simulation. The calculations requires 2 matrixes, current and ...
silverfox's user avatar
  • 117
0 votes
1 answer
68 views

I know the bare minimum to do matrix multiplication and have implemented them from scratch a few times for various purposes, but every time I do, I make sure to be very clear to myself about where are ...
kale hops's user avatar
0 votes
0 answers
952 views

I need to get the rotation differences between the model and the camera. convert the values to radians/degrees and pass it to the fragment shader. for that I need to decompose and the Model rotation ...
Sadern Alwis's user avatar
1 vote
0 answers
757 views

I have a type called transform in my game engine: ...
Guillaume Racicot's user avatar
1 vote
1 answer
374 views

I'm trying to build small UI framework. And I want it to have a coordinate space such that origin is placed in top left corner (x increases to right, y increases to down). I think for UI it should be ...
ChessMax's user avatar
1 vote
1 answer
91 views

I have a formula for skinning, where a vertex is attached to 2 joints with some proportions: B = M1*A*K1 + M2*A*K1 Where: K1 and K2 are the proportion ...
Dmitry Logov's user avatar
1 vote
1 answer
115 views

Whenever I seem to create a rotation matrix or try to zoom, the meshes that I draw to the screen get stretched and distorted. I've tried to make a simple rotation matrix like this: ...
Lukas Kawalec's user avatar
1 vote
2 answers
1k views

I’m using a 3D affine transform (a 4x4 matrix of floats) to represent a combination of translations and rotations in 3D space doing a sort of 3D turtle graphics kind of thing. From this state I know ...
heckj's user avatar
  • 138
0 votes
0 answers
89 views

I am using JavaScript and WebGL for a game which rotates a spaceship around a 3D planet. Below is the code for rotating a sphere spaceship and sphere planet. I looked over your camera code and now it ...
Jon White's user avatar
1 vote
0 answers
111 views

So far in my code I only dealt with transform matrices that I fed to OpenGL (the 4x4 float matrices), and had a class that was used to do transformations on the CPU side and generate the OpenGL ...
Newline's user avatar
  • 193
0 votes
2 answers
635 views

In my openGL project I draw a lot of quads (composed from 2 triangles) - for sake of example let's say quad 0,1,2 and 3. I process them in single pass. I do transform them with projection view matrix ...
Janis Taranda's user avatar

1
2 3 4 5
13