# Tagged Questions

26 views

### Calculate required resolution

Lets say I have a rectangle with width x and height y. Then there is transformation matrix T. Now, how using only those data can I estimate minimal resolution of texture (that is its width and ...
62 views

### What is the optimal way to handle matrix internal data storage for interop with native graphics apis?

I'm writing a managed (c#) game engine and have stumbled on a bit of a crossroads in design/implementation regarding matrix types. Matrix types need to be optimized for marshaling to native graphics ...
2k views

### Are there 3D projections other than orthographic and perspective? [closed]

The question is pretty much in the title. Are there notable 3D projections other than orthographic and perspective that could be used in a 3D system such as OpenGL? In particular, are there any that ...
443 views

### Day and Night Cycles and Skybox Blending

I've been working on adding day/night cycles and random weather to my project using the Neoaxis engine. The day/night cycles itself is pretty simple, just rotating the "sun" light around the Y axis. ...
190 views

### Reducing Spherical Harmonic Ringing

I've generated some 2nd order SH light-probes from cube-maps in my scene and I was surprised how strong artifacts are around the back of the dominant lights. I switched to a Lambert source plus ...
231 views

### Are there multiple valid definitions for what translate, rotate and scale do?

Are there multiple valid definitions for what translate, rotate and scale do to the 4x4 matrix? I bring up this question, because I have a simple webgl program that draws a square and does a few ...
188 views

### How to Construct a Perspective Projection With 4 Vanishing Points

Is it possible to construct a projection matrix which will create a perspective with four (or more) vanishing points? This question have an OpenGL tag, but general insights are welcomed as well.
76 views

### Displaying normals of a geometry

I have a rectangle which is created by 2 triangles and it is in x-z plane, and i have object on it. Now, the normals of two triangles (face normals) are y axis i.e. (0,1,0). I want to display normals ...
30 views

### Is there a transformation or set of transformations that can approximate a “radial scale”?

Is there a way to, with matrices, scale something as if someone were opening a Japanese fan? I'm at a loss of what to call it, so pointers towards avenues of research would be greatly appreciated. If ...
901 views

### GGX specular BRDF is way over 1!

Now, the classic Torrance derivation for roughened surfaces which Cook took into vectorized form yields the familiar parametrization of a specular BRDF where we have the NDF which decides how much ...
88 views

### Symmetry preserving path simplification

I'm using the Douglas peucker (DP) algorithm to simplify some (2d) closed paths forming a shape. This works pretty good, but not so much for closed paths that have some symmetry. Take for example a ...
237 views

### Quaternion to direction vector - flipping

I've kinda solved this myself by adapting the Camera::setDirection code from OGRE to work for my need: Now I have the following code: Vector3 boneDir = getBoneWorldOrientation(mEntity, mHips) * ...
392 views

### RGB to xyY color space conversion and luminance

The luminance calculated by following GLSL functions (fragment shaders - tonemap) has different value: float GetLuminance (vec3 rgb) { return (0.2126 * rgb.x) + (0.7152 * rgb.y) + (0.0722 * ...
116 views

### Movement constrained to the faces of a cube

The basic setup I'm working with is a cube rendered in-Engine (Panda3d, although I only am looking for a generalized solution) as well as a 2d square on one face of the cube. The eventual outcome I'm ...
221 views

### Move projectile in direction the gun is facing [duplicate]

Possible Duplicate: Move sprite in the direction it is facing? I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make ...
2k views

### global transform to local transform?

If an object is attached to another one and you need to set its position, rotation and scale in global space, what do you do to get the local versions of these values, knowing the same values for the ...
409 views

### Detect mouse click on a bezier curve's neighborhood

I'm developing a game in HTML5 and JavaScript using Canvas API for drawing graphics. I want to detect if the user has clicked on a bezier curve which has the line width of 20 pixels (something like ...
193 views

### Web sites with famous game information? [closed]

Is there any website containing informations related with some famous game? For information I mean how to calculate damage in a rpg for example, or how they've set camera and other tips like this! ...
512 views

### 3D Vector “End Point” Calculation for procedural Vector Graphics

Alright, So I need some help with some Vector Math. I've developing some game Engines that have Procedural Fractal Generation for Some Graphics, such as using Lindenmayer Systems for generating Trees ...
954 views

### How do you blend multiple colors in HSV (polar) color-space?

In RGB color space, you can do a weighted multiple-color blend by just doing: Start with R = G = B = 0. Then we perform a blend at index i using a set of colors C, and a set of normalized weights w ...
527 views

### Problems with 3D rotation when creating a 3D skeleton

I am writing a simple BVH parser in C# using the XNA framework. At the moment I have managed to parse in all the data and my goal is to find out the global coordinates of all the joints in the ...
3k views

### Quick 2D sight area calculation algorithm?

I have a matrix of tiles, on some of that tiles there are objects. I want to calculate which tiles are visible to player, and which are not, and I need to do it quite efficiently (so it would compute ...
1k views

### How can I transform a point from world space to object space?

If I have an object space described by transformation matrix that should be applied to object to transform it to world space, what I have to do to transform point (world space) to that object space. ...
2k views

### What does the graphics card do with the fourth element of a vector as the final position?

From this question it appears you would want a four-element position vector, as it is simpler to modify its position with matrix multiplication. On its own this would imply the fourth element should ...
571 views

### Find new position of rotated by 10 degrees line

I have a line that goes to x (x1) of 300, and then I rotate the line by -10 degrees. How can I get the new x (x0) of the rotated line? Here's a picture to show what I mean: Are there any books ...
498 views

### How to form a concave shape out of convex shapes? [closed]

I'm trying to get around the rule of only being able to form convex shapes in the SFML C++ library. To do this I'm planning on testing given vertices, and if concave, splitting the vertices ...
1k views

### my SFML sprite Move() function: FeedBack?

Hey so i'm making a pong game with SFML and in the process made a function that takes a Time, Speed, Angle of movement, buffer for the movement on the X axis, and buffer for the movement on the Y ...
1k views

### top down game - checking, drawing enemy's line of sight area with obstacles

Examples of what i'm going to need: I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS cone. How would i test if the player is within that cone, taking obstacles ...
8k views

### Rotate vector by matrix?

If I have a Vector, say (1,1), how can I rotate it around the origin (0,0)? I'm working in XNA if that helps.