An array of numbers, symbols or expressions, arranged in row and columns. The numbers, symbols or expressions themselves are called elements or entries.
0
votes
1answer
158 views
Stage3D: Camera pans the whole screen
I am trying to create a 2D Stage3D game where you can move the camera around the level in an RTS style. I thought about using Orthographic Matrix3D functions for this but when I try to scroll the ...
1
vote
0answers
143 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 the quad object which is rotating around a center point:
Using:
...
2
votes
2answers
323 views
The purpose of using invert and transpose
In openGl ES and the World of 3D - why use the invers matrix?
The thing is that I dont have any intuition to, why it is used, therefore please correct me:
As fare as I understand, it is used in ...
1
vote
1answer
101 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
112 views
Camera lookAt target changes when rotating parent node
have the following issue.I have a camera with lookAt method which works fine.I have a parent node to which I parent the camera.If I rotate the parent node while keeping the camera lookAt the target , ...
0
votes
0answers
57 views
Calculating the position of an object with regards to current position using OpenGL like matrices
i have a 1st person camera that collides with walls, i also have a small sphere in front of my camera denoted by the camera position plus the distance ahead. I cannot get the postion of the sphere but ...
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 ?
1
vote
0answers
142 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 ...
0
votes
2answers
363 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. ...
0
votes
1answer
89 views
How to Draw texture between 2 Vector3
My scenario:
RTS combat style, 1 unit fires beam on another unit
My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
2
votes
1answer
2k views
How does gluLookAt work?
From my understanding,
gluLookAt(
eye_x, eye_y, eye_z,
center_x, center_y, center_z,
up_x, up_y, up_z
);
is equivalent to:
glRotatef(B, 0.0, 0.0, 1.0);
...
2
votes
1answer
204 views
Movement on the X an Z axis are combined?
This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward).
The Y axis works fine, but when I increment the object's X position, ...
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
...
2
votes
1answer
178 views
Billboarding restricted to an axis (cylindrical)
I have succesfully created a GLSL shader for a billboarding effect. I want to tweak this to restrict the billboarding to an arbitrary axis, i.e. a billboarded quad only rotates itself about the ...
3
votes
2answers
534 views
How can I implement smooth rotation from one direction to another?
I'm having a problem with animating rotations with 1Matrix.CreateRotationY() with my basic 3D game. Based on where you click the mouse, I want the 3D object to rotate to that direction and then move.
...
3
votes
2answers
290 views
3D rotation matrices deform object while rotating
I'm writing a small 3D renderer (using an orthographic projection right now).
I've run into some trouble with my 3D rotation matrices. They seem to squeeze my 3D object (a box primitive) at certain ...
1
vote
1answer
339 views
how can i get rotation vector from matrix4x4 in xna?
i want to get rotation vector from matrix to realize some parent-children system for models.
Matrix bonePos = link.Bone.Transform * World;
Matrix m = Matrix.CreateTranslation(link.Offset)
* ...
0
votes
0answers
168 views
Unity3D - Projection matrix camera frustum
I've used off centre projection to create a custom projection matrix for my camera.
When I run the game I can see the scene correctly in the game view but in the editor view the camera frustum is not ...
0
votes
1answer
374 views
Building View Matrix in Direct3D11
Am I doing it right? I converted this.
m_ViewMatrix = XMMatrixLookAtLH(XMLoadFloat3(&m_Position), lookAtVector, upVector);
to this one.
XMVECTOR vz = XMVector3Normalize( lookAtVector - ...
0
votes
2answers
449 views
OpenGL, objects disappear at a certain z distance
I'm writing a managed OpenGL library in C++, and I'm having a pretty annoying problem. Whenever I set an objects Z coordinate to -2.0 or lower, the object disappears. And at coordinates 0 through ...
3
votes
1answer
98 views
How to make an object stay relative to another object
In the following example there is a guy and a boat. They have both a position, orientation and velocity.
The guy is standing on the shore and would like to board. He changes his position so he is ...
3
votes
1answer
112 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 ...
2
votes
2answers
239 views
Rotating a child shape relative to its parent's orientation
When rotating a shape using a quaternion value I also wish rotate its child shape.
The parent and child shapes both start with different orientations but their relative orientations should always be ...
1
vote
1answer
132 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 ...
2
votes
1answer
88 views
Camera closes in on the fixed point
I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with:
camera.Eye = ...
0
votes
1answer
99 views
What's the standard location of a 3D clipping box?
The way I understand 3D rendering, polygons are transformed using several matrices, and they are then clipped if they are not inside a certain box, before projecting the box onto the screen. Before ...
2
votes
1answer
220 views
Does XNA 4 support 3D affine transformations for 2D images?
Looooong story short I'm essentially trying to code Mode 7 in XNA. Before I continue bashing my brains out in research and various failed matrix math equations; I just want to make sure that XNA ...
3
votes
1answer
199 views
D3DXMatrixDecompose gives different quaternion than D3DXQuaternionRotationMatrix
In trying to solve this problem, I tracked down the problem to the conversion of the rotation matrix to quaternion. In particular, consider the following matrix:
-0.02099178 0.9997436 -0.008475631 0
...
3
votes
2answers
297 views
How to derive euler angles from matrix or quaternion?
Currently working on steering behavior for my AI and just hit a little mathematical bump.
I'm in the process of writing an align function, which basically tries to match the agent's orientation with ...
2
votes
1answer
98 views
Problem with D3DXMatrixReflect
Currently I am trying to reflect a sky sphere into a flat piece of geometry which is acting as water. The sphere is very small, it follows the camera on all 3 axis and the z-buffer is turned off so it ...
0
votes
1answer
242 views
Correct Rotation and Translation with a 4x4 matrix
I am using a 4x4 matrix to transform verts in a shader. I multiply an identity matrix by a rotation matrix by a translation matrix. I am trying to first rotate the verts and then translate them, ...
3
votes
2answers
205 views
Rotating voxels in 3d space amongst the x axis
I have a very simple voxel engine and so far it works based on coordinates, e.g. x, y, z. I was wondering if there is a formula for rotating groups of voxels/coordinates from the x axis(e.g. [0, 1, ...
0
votes
2answers
184 views
get coordinates of origin of coordinate system in second coordinate system by knowin matrices of one point in bith systems
Situation, two coordinate systems A, B. origins Oa, Ob. I have one point, for which i know modelview matrix (translatoin/orientation) in both systems. And what i need to get is modelview matrix of Ob ...
1
vote
1answer
138 views
Can't work out how matrix is applied to 2D vertices
I have a texture, some 2D vertices, and a matrix. The matrix is used to calculate the texture coordinates for each vertex, but the problem is that the matrix comes with absolutely no documentation and ...
2
votes
3answers
798 views
glGetFloatv – should it be avoided? Can it be replaced?
Platform is OpenGL ES 1.x. I am using glGetFloatv() to get MODELVIEW matrix. This allows me to compute points, where I need to draw a shadow effect. This is very handy, as I can forget about ...
1
vote
0answers
168 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
2answers
768 views
OpenGL matrix vs DirectX matrix
I'm working on an animation and model exporter from Maya to use within my game. Currently, models work perfectly, and animations have some issues with the joints. Since Maya works in an OpenGL ...
0
votes
0answers
157 views
Animation exporting from Maya to DirectX environment
I'm working on a model/animation Maya exporter for a game I'm working on. I used a very simple animated box mesh with four joints at first to make sure everything works, and got it running relatively ...
1
vote
0answers
153 views
what space is this Matrix in?
In Blender 2.6 API, PoseBone is used for animating a bone. PoseBone.matrix is one way to do that. API says PoseBone.matrix is in "object space".
...
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 ...
-2
votes
1answer
166 views
Why doesn't my MatrixStack class work? [closed]
I've been trying to get openGLES2 to work on my Android device and this is starting to drive me insane. I've spent well over ten hours now trying to get this to work. I just don't understand anymore. ...
2
votes
1answer
114 views
Understanding Tensors [closed]
I don't seem to be able to visualize tensors. I am reading The Morgan Kauffman Game Physics Engine Development and he uses tensors to represent aerodynamics but he doesn't explain them so I am not ...
0
votes
1answer
237 views
3d world vertex translation to go to 2d screen coords
My technical english is a little rusty so to avoid misunderstands please be patient with me :)
I will try to be brief and clear
Situation:
- I have a 2d sprite character on the screen
- I've just ...
4
votes
1answer
279 views
apply non-hierarchial transforms to hierarchial skeleton?
I use Blender3D, but the answer might not API-exclusive.
I have some matrices I need to assign to PoseBones. The resulting pose looks fine when there is no bone hierarchy (parenting) and messed up ...
1
vote
3answers
219 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));
...
0
votes
0answers
95 views
Blender poseBone matrix from animation matrix?
Given an animation matrix for a bone in armature-space, how to calculate the "matrix" of poseBone from it and assign it in Blender?
Basically by bones can have parents, but all animation matrices in ...
1
vote
1answer
1k views
2D Quads : Translation with OpenGL ES 2.0 on Android [closed]
I have a simple 2D engine that renders 2D textured quads, and right now I can scale the quad or rotate it, but when I try to translate it I have a strange distortion (the quad is squashed in the half ...
2
votes
1answer
301 views
Finding a suitable axis-angle to avoid gimbal lock
In OpenGL the camera faces the -z axis with the +y axis pointing up. I am using quaternions to represent the orientation of my objects (which works well) and am trying to do the same for the camera. I ...
0
votes
0answers
305 views
Calculating the correct roll from a bone transform matrix
Read this forum topic for more info: http://blenderartists.org/forum/showthread.php?260602-transform-matrix-to-bone-%28head-tail-roll%29-bug
I'm trying to get my Blender3d modeller importer to create ...
1
vote
0answers
117 views
reflection plane 3d
Hey there I'm trying to create a plane that can have a texture on it and reflect the 3d elements around it. for example a plane with a laminate floor texture and above it a cube rotating. I want the ...