## Negative scale in Matrix 4×4

After some rotations and to from quaternion conversions I get negative scale from Matrix 4×4, is it possible? I need that scale to draw sprite on screen so I get sprite flipped, how to deal with this problem should I just handle negative scale in sprite drawing method. if MatrixHasNegativeScale then invert scale, draw sprite … Read more

## What dimensions should you use for a perspective projection frustum?

What dimensions should you use for a perspective projection frustum? Initially I created a perspective matrix based on the width and height of the screen, with a calculated zNear value based on a 45degree FOV. // OpenGL example // For height of 800, zNear is calculated to be ~965. zNear = (height / 2.0f) / … Read more

## Import a 3D animation into an android game

I want to import a skinned and animated character model built with bender into an android game. The animations can be: idle, walk, run …etc I’ve seen a related question but it’s only about importing a static model: https://stackoverflow.com/questions/204363/is-there-a-way-to-import-a-3d-model-into-android But I don’t see how to import a set of animation with tweened frames. Any ideas, … Read more

## How to create a walkable 3D terrain

I want to make a terrain for a RPG game that I’m developing. I started modeling the surface and implementing it to my game, but now I realized that i might be doing everything wrong. So I would like to ask a few questions: How should I make the surface Model? I’m developing my game … Read more

## 2 component unit vector

Is it possible to store a 3d unit length vector with only 2 components, for example as coordinates on a unit sphere? It seems possible but I have never seen anyone do this. Would this be at all practical? Answer No, it is not usually possible. But when it is, it’s quite useful. The problem … Read more

## How do reflections work for large flat surfaces?

I understand how reflections work for objects. A cubemap would be rendered around a certain point in 3D space, usually at the center of the object that the reflection is to be applied to, and that is the surrounding world it reflections. But this leads to the question, what about large flat surfaces like floors … Read more

## Lasers in 3D space game

I am creating this little 3d space shooter and am somewhat unsure on how to implement the laser beams. I’m thinking about something along Star Wars and the like where mostly you shoot rather short laser beams but very many of those. Should I create a “tube” for each of the beams, render them via … Read more

## Representing 3D World Space with 2D Tiles

How can I represent 3D world space with 2D tiles? I do not mean isometric, which is visually represent 3D objects in 2D space. Let’s say there’s some height map, and each 2D tile (X, Y) represents a coordinate on the top of the map – so the Y is generated automatically, X stays the … Read more

## How to find the bottleneck of the graphical pipeline

I’ve been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I’ve been using a program to draw massive amount of polygons in a simple scene with alpha blending (AKA grass scene). I’ve used two programs, one uses static coordinates and another uses rotation and translation. Both … Read more

## Drawing a textured triangle with CPU instead of GPU

I understand the benefits of GPU rendering and such, but for a certain limited application I need to render textured triangles purely using CPU. I’ve built a 3D engine capable of object handling, transform, projection, culling and the likes … now all I need is a little code snippet that draws a single textured triangle … Read more