Stack Exchange Network

Stack Exchange network consists of 174 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.

7
votes
0answers
57 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
349 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
27 views

Convert bones by bone matrix

I have a 3d-models from old game. They have the following structure: ...
1
vote
0answers
24 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
28 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
34 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
151 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
349 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
78 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
157 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
138 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
544 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
106 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
39 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
89 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
357 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
184 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
135 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
768 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
211 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
721 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
417 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
326 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
487 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
18 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
23 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
16 views

creating rotation matrix in a left handed coordinate system from a direction vector

I have been looking at creating rotation matrices from a direction vector in the OpenCV coordinate space and there is one thing that has me slightly confused. Here is an OpenCV rotation matrix, that I ...
0
votes
0answers
24 views

Billboarding Labels Using Quaternions

I am encountering some issues with billboarding. Although my situation is a bit complicated. So, I am modeling the solar system, and I am also placing labels on everything. For an example, I'll use ...
0
votes
0answers
23 views

Tetris like rotation with a list of points

I have a list of points that I want to rotate around the origin by 90, 180 or 270 degrees. This list can be an arbitrary shape such as: ...
0
votes
0answers
27 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
45 views

FreeGLUT - Making Planets Orbit at their own Speed

I'm currently working on a project for Uni using FreeGLUT to make a simple solar system simulation. I've got to the point where I've implemented all the planets and have used a Scene Graph to link ...
0
votes
0answers
39 views

Skinning - Bone Matrices Clarification

I'm trying to create the simplest animation scenario, 12 vertices and 2 bones. Both bones has a 4x4 matrix. When both are set to "Identity", the model looks correct, like in the picture above (...
0
votes
0answers
33 views

Calculating Offset Matrices for 3D Animation

I am experimenting with SkinnedMesh sample in Microsoft DirectX SDK June 2010. I am trying to understand how offset matrices work. The .X format comes with Offset matrices for every bone, but I am ...
0
votes
0answers
379 views

Creating a rotation matrix from an up vector without using trigonometry

I'm looking for someone who really understands vector and matrix algebra. I have a coordinate in 3D space whose origin is the centre of the Earth, and I want the coordinates to be on a flat plane at ...
0
votes
0answers
308 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
248 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
144 views

Smart algorithm to find clusters in matrix of numbers

I´m developing in C, a solver for puzzles like this game Bubble Popper (https://play.google.com/store/apps/details?id=com.bytesequencing.bubble_popper_ads). Fast explanation: we have to find clusters ...
0
votes
0answers
23 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
345 views

OpenGL Vertex shader matrix multiplication causes triangle to disappear

So i have a very basic functioning application, rendering a basic triangle (using vertex and fragment shaders) When I try to multiply the in-vector in the vertex shader with a mat4 the triangle ...
0
votes
0answers
200 views

Opengl: 2D Set the origin to center of the +x, +y quadrant and render quads from from (0.0, 0.0)

I'm developing a 100% 2D program. Presently, the origin is at 0,0,0 (dead center of the screen). I feel as though this is wrong for my app. It's a little unnatural for me to position things in the ...
0
votes
0answers
89 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
89 views

Rotate object from an origin using a transformation matrix

I'm making a project in lib GDX and I want to rotate an object by changing the transform matrix of the sprite batch to one that rotates an object rendered on screen a given number of degrees from a ...
0
votes
0answers
459 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
472 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
64 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
84 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
48 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
101 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 ...