Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
1answer
103 views

Optimizing black and white matrix block drawing

Disclaimer: I am uncertain if this is the best place to post this question, so please advise me of how I can best find the answer if I am doing something wrong. I am asking this question because I am ...
1
vote
1answer
486 views

Convert a transformation matrix from world-space to camera-space using Eigen

I have a transformation matrix, in world space. I need to convert it to local(camera) space. I have done the reverse of this (Local - to - world) using: ...
1
vote
1answer
585 views

Getting world coordinates from mouse position

I am drawing a 2D mesh imported from CAD. The mesh vertex coordinates are in feet from some arbitrary origin and Z is always 0. I am supplying the coordinates to my shader program and using projection ...
1
vote
1answer
218 views

Vertex Skinning, Bone matrices question

I'm creating a model/animation viewer in C# using OpenTK for a game's models. Before stating my problem I want to describe a bit what I've accomplished so far in case I'm fundamentally missing ...
7
votes
0answers
60 views

How to clip cut-off using different frustrum than that of original camera? How to cut plane by pyramid shape?

SOURCE : http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Mitchell_LightShafts.pdf This process is part of creating light draft effect. And I am suggested to do the described process in ...
2
votes
0answers
376 views

Control frustum near and far clip plane sizes in a Projection Matrix

I'm trying to achieve a dolly zoom effect. My first try was the obvious one, the original "zoom in & dolly out" technique, which works nicely. Except that there are cases which this is not ...
2
votes
0answers
180 views

Unproject considering parallax depth

How can I take screen coordinates (or alternatively world coordinates on the 'primary' parallax plane) and find out what world coordinates they translate into when taking parallax depth into account? ...
1
vote
0answers
42 views

Matrix for transforming a square to a quadrilateral

I have a square of points {<0, 0, 0>, <6, 0, 0>, <6,0, 6>, <0,0,6>} (The square is placed at the origin in the xz plane in opengl). Want to apply a transformation/s on the square and make ...
1
vote
0answers
45 views

Convert bones by bone matrix

I have a 3d-models from old game. They have the following structure: ...
1
vote
0answers
30 views

Blender - Exporting and Replicating Bone Animation

I'm having trouble replicating Blender bone animation in my game. Bones that have a vertical rest position (Euler(PI / 2, 0, 0)) are animated correctly (e.g. head, neck, torso, legs, shins), however ...
1
vote
0answers
30 views

Does it make sense for a view matrix to have a scale?

When building a view matrix from an SRT matrix multiply, examples (here and here) only ever compose it with a R and T. Does it make sense to have the S component be anything other than the identity? ...
1
vote
0answers
42 views

OpenAL listener position for isometric camera

I have an isometric camera for an RTS that looks like this: Basically, I don't know how to set the listener's position in OpenAL because I represent the camera's position with only two coordinates. ...
1
vote
0answers
260 views

Setting relative anchor point via matrix

The page at https://webglfundamentals.org/webgl/lessons/webgl-2d-matrices.html provides an example for rotating around the center of the image: ...
1
vote
0answers
423 views

SceneKit-Convert a rotation vector into rotation matrix

I'm very new and I'm studying this ARKit code from RPasecky/CubesInSpace on github where he/she convert the point of view 's rotation vector into a rotation matrix ...
1
vote
0answers
80 views

Cube Translation Looks All Wrong

I'm making a very simple cube in OpenTK and it seemed to be going fine until I tried to move it around. Moving it along the X Axis seems to elongate the cube, not the result I hoped for. My Vertex ...
1
vote
0answers
169 views

Understanding the ModelView Matrix

I want to analyze the each component of my 4*4 ModelView Matrix. I came to know that the starting 3*3 of ModelView Matrix ...
1
vote
0answers
142 views

Rotating an Object Around an Axis

I have a circular shape object, which I want to rotate like a fan along it's own axis. I can change the rotation in any direction i.e. dx, dy, dz using my transformation matrix. The following it's ...
1
vote
0answers
633 views

how to properly rotate in directX11

I am trying to Rotate a textured quad in directX however I think i am missing something. I am pretty sure it is because i am applying transformations to the WorldMatrix instead of the ObjectWorld, ...
1
vote
0answers
1k views

Matrix transform from one coordinate system to another

I have been beating my head against the wall for weeks on this and it is time I just break down and ask for help. I need to move a 3D camera from an in house system into Unreal 4. The two use ...
1
vote
0answers
116 views

Is it normal in skeletal animation to NOT consider the translation component in bone transform matrices?

I'm using assimp to load a model, and DirectX11 and DirectX ToolKit to render it. In the document of DirectXTK's IEffectSkinning, it says: As an optimization, SkinnedEffect and DGSLEffect assume ...
1
vote
0answers
40 views

Connecting a model's joint to the joint of another model

I am trying to figure out the math behind orientating and translating a model so that a specified point on the model will connect with a specified point on another model. For example, given the ...
1
vote
0answers
90 views

Relative Transformations for Bones

I'm using Blender to export my armatures in relative coordinates, and I'm trying to get to absolute coordinates in my engine. For the above example, the childBone's ...
1
vote
0answers
361 views

How should matrix-based Parallax Scrolling work?

The question is at the end, as it requires a bit of context. I'm not sure if my understanding, my code, or LibGDX's ParallaxCamera is wrong. LibGDX's ...
1
vote
0answers
190 views

Rotate view matrix based on touch coordinates

I'm working on an Android game where I need to rotate the camera around the origin based on the user dragging their finger. My view matrix has initial position of sitting on the negative z and facing ...
1
vote
0answers
136 views

Rotate Points with Object in world space

I posted this in the original stack overflow then realized that a game-dev specific one exists. I am working on personal project that requires me to have 4 points surrounding an object (1 at each of ...
1
vote
0answers
785 views

Stacking Drawing Matrix for SpriteBatch in XNA

I'm trying to make a 2D engine for XNA with SpriteBatch. My object unit is Entity, which can include other ...
1
vote
0answers
212 views

How do I implement a physics gun?

I'm currently trying to implement a physics gun for my game. What I want is for the entity to stay in the same position on the screen no matter how I wiggle the camera about, what is the correct way ...
1
vote
0answers
747 views

Drawing two orthogonal strings in 3d space in Android Canvas?

I want to draw two strings in canvas. The first string must be rotated around the Y axis, for example 45 degrees. The second string must start at the end of the first string and also it must be ...
1
vote
0answers
419 views

Matrix.CreateBillboard centre rotation problem

I'm having an issue with Matrix.CreateBillboard and a textured Quad where the center axis seems to be positioned incorrectly to ...
1
vote
0answers
327 views

How do I convert my matrix from OpenGL to Marmalade?

I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this: We're right handed by default, and we treat y as ...
1
vote
0answers
515 views

Getting and Setting Rotation in XNA around the Center of my Model with XNA

Alright, so I'm currently debating how I want to do this. Basically this is what I'm trying to accomplish. I've created a system to allow me to make my environment a little bit easier. I'm ...
0
votes
0answers
16 views

How to program 3D translate widget like in blender?

Im struggling to achieve the translation widget in my own render engine. Funny enough I thought that widgets are easy, but boy was I wrong... What I want to implement: Where I am having problems: ...
0
votes
0answers
15 views

Transform Vector3 into Vector2 with PerspectiveFieldOfView Matrix

If I understand correctly, Matrix.CreatePerspectiveFieldOfView(…) creates a Matrix that projects a ...
0
votes
0answers
21 views

From look-at vectors to a quaternion

So, I have code to create a quaternion from a matrix (using the 3x3 rotational part.) And I have code to construct a transformation matrix from a lookat + up vector pair. To go from lookat+up to ...
0
votes
0answers
31 views

Orientation is off when nearing 90 degrees rotation

Context: I am using Vive Trackers to track the head of a user. It is not a Vive headset and I am restricted to the TrackingUniverseRawAndUncalibrated, which only guarantees that the Y axis will be UP. ...
0
votes
0answers
26 views

Swapping Axis by Swapping Matrix Rows

I'm using MathGeoLib, which uses row-major storage. The problem that I'm facing is that I'm going from a East-North-Up(ENU) coordinate system. And I need to go to an East-Up-North(EUN) coordinate ...
0
votes
0answers
43 views

Drawing simple shapes in OpenGL ES 1.1

I'm having an issue getting OpenGL ES 1.1 to draw anything. All I get is a black screen every time. I have the following working OpenGL 2.1 code, which I'm trying to change over: ...
0
votes
0answers
20 views

Drawing ortho outline of rotated elipsoid

I'm working on a collision system for a 2.5D game, and I'm stuck on the sphereoids. As long as scaling x=y=z, and it doesn't rotate, I can just use an r^2 check, but I'm trying to figure out a way to ...
0
votes
0answers
33 views

btRigidBody world transform and scale issue

When I create a collision shape for rigid body (in this case box) I use vertices positions and scale from the opengl matrix, the code looks this way: ...
0
votes
0answers
30 views

anything wrong with a spherical camera view matrix?

Is there anything inherently wrong, if you derive your view matrix from 2 spherical coordinates (say, phi and theta) on the unit sphere? The z-axis vector would be at, say (phi, theta), the y-axis at (...
0
votes
0answers
386 views

Mythbuster: Mirror Operation with Quaternion

Mirror operation : all vertex positions must be reflected by a specific plane (here YZ).Synonyms: FlipHorizontal, SymmetryX, MirrorX, What implementations I already know that work: 1) Multiplying ...
0
votes
0answers
334 views

How to compose a matrix to perform isometric (dimetric) projection of a world coordinate?

I have a 2D unit vector containing a world coordinate (the player's direction), and I want to convert that to screen coordinates (classic isometric tiles). I'm aware I can achieve this by rotating ...
0
votes
0answers
24 views

Locking global Y rotation component of camera orientation

Question: For research purposes, I'm trying to lock the global camera yaw in VR -- though, the "how" is more of a 3D math question and has little to do with VR. The user is in control of the ...
0
votes
0answers
103 views

How to spin a 2D quad in place using only matrices?

In short, I have a textured 2D quad (a sprite). I would like to rotate/spin it about the z-axis (coming out of the screen) using nothing but matrices. If I do the following to a transform with scale ...
0
votes
0answers
535 views

Tweening back from arbitrary 3D rotation in javascript

I'm using a 3D javascript library to rotate the vertex of a 3D object with a classic 3x3 matrix, to an arbitrary angle in the 3D space, as depicted in the image below. For example, a first rotation ...
0
votes
0answers
519 views

Pre- or post-multiplication for rotation between coordinate frames

I have three 3D coordinate frames: O, A and B, as shown below. I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move from ...
0
votes
0answers
65 views

XNA - Link between Create Rotations matrices

A friend of mine have been coding some rotations on my XNA project, but the order of the matrices rotation are not good. Some are of form : ...
0
votes
0answers
85 views

“Blinking” graphical bug when rotating shadow matrix

So, we have implemented Krypton shadows into our code for our 2D game, and it's working beautifully. Only issue is that we're running into a bizarre graphical bug when rotating the shadows with the ...
0
votes
0answers
54 views

Constrain parent node transform to child bounds

If I have some node rendering tree set up, where a node basically has a draw method to render things, and a transform, represented as a 3x3 matrix, with scale and translation. Now, I would like to ...
0
votes
0answers
102 views

Transform a Screen Delta

I have a delta in screen coordinates that I want to transform to a 3d delta in world space. The delta is in this case a movement across the (x,y) coordinates in screen space on the near projection ...