Tagged Questions
0
votes
1answer
51 views
XNA Camera Positioning All Wrong
I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
2
votes
1answer
61 views
Translating Viewmatrix is inverted, why?
So I've defined a Projectionmatrix, Viewmatrix and a Modelmatrix using OpenGL (LWJGL).
But when I translate my Viewmatrix to +X it moves my object to the right (hence my camera is moving to the ...
0
votes
2answers
48 views
Transform translation relative to world space
What is common algorithm for translating a transform matrix relative to world space axis?
E.g. Matrix M is representing some local space.
When I want to translate M relative to it's own local axis, I ...
2
votes
1answer
85 views
transformations of matrices
I'm in the process of reading up on 3d matrices and trying to following this powerpoint and had a few questions as to how to exactly determine the type of transformation from a matrix.
If I have a ...
1
vote
1answer
90 views
Proper approach to handle transformation matrix and extract its components
Basically I have a Transformation component object with following structure(pseudo):
TransformComponent{
Vec3 position;
Vec3 rotation; //in euler angles
Vec3 scale;
Mat4 worldMatrix; ...
0
votes
0answers
45 views
Proper matrix rotation and storing rotation values
I have GameObject's transform component(position+rotation) and shape mesh(array of vertices).
On each game tick I update coordinates of vertices relatively to game object's rotation.
And my current ...
2
votes
1answer
296 views
How can I create a 2D camera with upscaling and translation?
I've computed a Viewport that is fair in size (a proper aspect ratio to the given device) and then I calculate my ScaleMatrix like so:
scaleMatrix = Matrix.CreateScale(
(float) ...
6
votes
2answers
316 views
How can you extract orientation from a transformation matrix?
I have a 4x4 transformation matrix M, and I want to find out the shape of a sphere when transformed by M. (Sphere is at the origin and has radius 1.)
I know I can find the center by just multiplying ...
1
vote
1answer
167 views
2D Matrix Transformation (with a Player and Ground)
I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX.
I currently have a tilesystem that renders tiles at the screen and a character ...
0
votes
0answers
235 views
Transformation Matrix in Android Canvas?
This question is following up my previous question that I asked it in stackoverflow: Hide a face of a 3D shape behind another,Android canvas?
I have a canvas and I have to get the normal vector of a ...
0
votes
0answers
40 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 ...
2
votes
1answer
159 views
Scaling along an arbitrary axis (Dealing with non-uniform scale)
I'm trying to build my own little engine to get more familiar with the concepts of 3D programming.
I have a transform class that on each frame it creates a Scaling Matrix (S), a Rotation Matrix from ...
1
vote
1answer
273 views
How to do geometric projection shadows?
I have decided that since my game world is mostly flat I don't need better shadows than geometric projections - at least for now.
The only problem is I don't even know how to do those properly - that ...
6
votes
1answer
240 views
How can I attach a model to the bone of another model?
I am trying to attach one animated model to one of the bones of another animated model in an XNA game.
I've found a few questions/forum posts/articles online which explain how to attach a weapon ...
1
vote
1answer
100 views
Deformation of Sphere using Transformations
I have a graphic related question. I need to have a transformation matrix that I have no idea about what it is. The problem is to create right image from the right sphere. I created those images in ...
0
votes
1answer
74 views
coordinate transformation
I have two coordinate systems, like so
How can I transform a point on the one of the coordinate system to other ?
Pxyz = M . Px'y'z' what is M ?
0
votes
2answers
356 views
How can I reflect a point with respect to the plane?
How can I reflect a point with respect to a plane?
Example:
I have three points (0,0,2), (4,0,0) and (0,8,0). And I have a point (x,y,z). From these, I want derive a composite transformation matrix. ...
43
votes
8answers
5k views
Why do we move the world instead of the camera?
I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around.
For example here is an extract of this tutorial: OpenGL View matrix
...
3
votes
1answer
111 views
Extract derived 3D scaling from a 3D Sprite to set to a 2D billboard
I am trying to get the derived position and scaling of a 3D Sprite and set them to a 2D Sprite.
I have managed to do the first part like this:
var p:Point = sprite3d.local3DToGlobal(new ...
1
vote
1answer
131 views
Orthogonal projection and world transform
I'm reading about projection matrix. Needs of perspective projection is obvious, but I'm not sure about orthogonal projection. Because orthogonal projection effect looks possible with only world ...
1
vote
1answer
177 views
Transformation matrix that maps a window
I'm currently learning OpenGL at uni, and they give us questions to help us learn (these are not worth anything), however I'm stuck on this one question and would have to travel over an hour and a ...
1
vote
3answers
218 views
Inverting matrix then decomposing gives different quaternion than decomposing then inverting the quat
I'm getting different signs when I convert a matrix to quaternion and invert that, versus when I invert a matrix and then get the quaternion from it:
Quaternion a = Quaternion.Invert(getRotation(m));
...
1
vote
1answer
321 views
importing animations in Blender, weird rotations/locations
This is for the Blender 2.6 API.
There are two problems:
1. When I import a single animation frame from my animation file to Blender, all bones look fine.
But when I import multiple (all of the ...
0
votes
1answer
180 views
Optimizing hierarchical transform
I'm transforming objects in 3D space by transforming each vector with the object's 4x4 transform matrix. In order to achieve hierarchical transform, I transform the child by its own matrix, and then ...
0
votes
2answers
287 views
getting bone base and tip positions from a transform matrix?
I need this for a Blender3d script, but you don't really need to know Blender to answer this.
I need to get bone head and tip positions from a transform matrix read from a file.
The position of base ...
1
vote
1answer
223 views
Translate along local axis
I have an object with a position matrix and a rotation matrix (derived from a quaternion, but I digress). I'm able to translate this object along world-relative vectors, but I'm trying to figure out ...
2
votes
1answer
213 views
Transform 3D vectors between coordinate systems
I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF.
I need to find a transformation matrix M, that transforms AB to DE and ...
0
votes
2answers
3k views
Scaling Model in XNA, keep position
I am trying to create a little fun 3D game in XNA, but I am having some problems with scaling my models. I use models from random sites, so my battleship is for an example 10 times larger than my ...
1
vote
1answer
585 views
Translating local to global coordinates in ARToolkit / OpenGL
Ok, so I've tried reading over the other questions and something's just not clicking for me. I am working on an augmented reality application using ARToolkit, however it should just be straight ...
