-1
votes
0answers
28 views

How to get 3D objects using Visual C++ | OpenGL | SDL | Blender [closed]

How to get 3D objects using Visual C++ | OpenGL | SDL | Blender Hi, I have been searching for a tutorial(s) witch corresponds or my specific desire but I had no luck, any suggestions? Thanks.
1
vote
0answers
55 views

How to implement translation, scale, rotation gizmos for manipulating 3D object's transforms?

I am in the process of developing a basic 3D editor. It uses OpenGL for rendering a 3D world. Right now my scene is just a few boxes of different sizes and I am at the stage where I want to be able to ...
0
votes
1answer
104 views

How do you create a 2d world then view it in 3d?

I have been learning OpenGL for a while now and have a pretty good understanding so far. What I would like to know is if I create a 2D game in Orthographic Projection, is it possible to switch to a ...
1
vote
1answer
116 views

Should all primitives be GL_TRIANGLES in order to create large, unified batches?

Optimizing modern OpenGL relies on aggressive batching, which is done by calls like glMultiDrawElementsIndirect. Although glMultiDrawElementsIndirect can render a large number of different meshes, it ...
0
votes
0answers
19 views

Manual occlusion culling with glDrawElements [duplicate]

How should I go about doing occlusion culling with glDrawElements? I am dealing with voxel-like terrain. I want to avoid drawing the faces that are facing another block. I just don't know how to ...
0
votes
2answers
85 views

Achieving a fixed frame-rate with varying scenes

I am working on an OpenGL 3D model viewer app for iOS. I have to load, view and navigate extra detailled 3D models on an iPad. I hardly achieve 2 fps, if i load and navigate a very complex model. I ...
0
votes
0answers
151 views

Adding 2d hud/gui to a 3d game engine which has no 2d features

I have been following the 3d game engine tutorial series made by theBennyBox for a few months now, and have finally decided to create a game with it. My problem is that it is a 3d only engine which ...
3
votes
2answers
132 views

OpenGL - Index buffers problem

I have a custom file format that has all the needed information for a 3D mesh (exported from 3ds Max). I've extracted the data for vertices, vertex indices and normals. I pass to OpenGL the vertex ...
3
votes
1answer
280 views

How to efficiently render a large terrain mesh?

Recently I've been stuck on a problem thinking about the best way to generate a terrain into my game. In another projects I normally used heightmaps, so all the core-work was based on the engine used, ...
0
votes
2answers
81 views

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 ...
0
votes
3answers
128 views

OpenGL: glRotatef cause performance drop while rotating -x and -y

I have made a rotating cube and I got some performance drops while using two glRotatef calls. So basically this code is giving me 80FPS: //code 1 GLrotate_x += 0.4f; GLrotate_y += 0.4f; ...
1
vote
1answer
81 views

DirectX Bullet Tracer Effect

I'm wondering if anyone knows some common and efficient ways to do a fast tracer for an instant bullet. I've seen people speak on forums of using primitive lines with DirectX, but I doubt this ...
2
votes
1answer
224 views

3D Camera Rotation

Please, forgive me, but I need help and I've been stuck on this for a few weeks now, I'm making no progress and everywhere I go and I see a different answer, everything I try doesn't work. I've had ...
2
votes
2answers
139 views

How can I determine the pixels covered by a transformed triangle (without drawing it)?

I have three points that form a triangle in a 3D scene. I want to apply an arbitrary rotation/translation transformation to this polygon and later check in which pixels of an image they would be ...
14
votes
4answers
1k views

Why do we use 4x4 matrices to transform things in 3D?

To translate a vector by 10 unit in the X direction, why do we have to use a matrix? We can just add 10 to the mat[0][0], and we got the same result too.
0
votes
0answers
96 views

Calculate parameters for orthographic matrix for directional shadow mapping

I am struggling with how I can fit my scene in an orthographic projection, based on what is visible by the camera. All tutorials so far explain almost everything in perfect detail, and then for the ...
0
votes
0answers
76 views

Shadow Mapping: How to calculate Axis Aligned Bounding Box?

I am trying to implement Shadow Mapping, which is actually working with an AABB that always covers my entire scene, but (obviously) it gives very blocky graphics. So I figured I need to calculate a ...
1
vote
1answer
103 views

Most common format & good practice for 3D models for a placeholder in a PC game [closed]

I'm soon starting programming my first 3D game in OpenGL, C++, for PC. It's going to be a top-down space-based game. Early on I want to create basic placeholder 3D models for my objects, and then in ...
1
vote
0answers
190 views

Shadow mapping implementation not working?

I am trying to implement Shadow Mapping in my program using Java/LWJGL/OpenGL/GLSL, but I cannot get it to work properly. Let's start off with a screenshot first, then the relevant code and lastly ...
8
votes
4answers
309 views

Why nearby triangles tend to disappear?

I've just enabled back face culling and I'm noticing a weird behavior: when all vertices of my triangle is outside the view and 2 of them is behind me (I think) the triangle disappears. So to see it, ...
2
votes
1answer
552 views

Skeletal animation with Assimp and glm

I'm trying to implement skeletal animation using assimp and glm. Everything seems to work, except for rotations. This is the code I use when packing assimp data into my own engine's format. I THINK ...
3
votes
4answers
287 views

Dynamic Terrain Triangulation

Is there someone who know/have an algorithm which can perform terrain triangulation like on the example image right under (there is a secondary image as well). The reason I say "Dynamic" is because I ...
0
votes
0answers
72 views

Rendering a model with transparent or translucent uv map applied doesn't work

Before I try to make anything transparent, the model renders nicely. When I change the uv layout so that one piece of the model will be transparent, it renders horribly. This is the result with a ...
8
votes
1answer
611 views

what is world space and eye space in game development?

I'm reading a book about 3D stuff and OpenGL. The book often talks about world space and eye space. What exactly is the "world space?" Does the "eye space" mean the projection?
1
vote
1answer
61 views

Models not rendering when far away

I am making a game where objects are represented by colored cubes. I have files that mark the location and rotation of the cubes. I've been using Processing's 3D library and the cubes disappear within ...
1
vote
1answer
109 views

What is w componet [duplicate]

What is the W component on graphics programming. I read a blog about opengl that says that w must be equal to either 0 or 1 here. But the book I am currently reading has put w component to more than 1 ...
0
votes
0answers
80 views

Triangle Clipping

I want to determine which part of a triangle is visible in a frustum in OpenGL, is there a way to get visible coordinates of triangle in the viewing frustum?
0
votes
1answer
173 views

OpenGL camera translate and rotate on cameras local axis

How can I make rotation and translation on a local camera axis in OpenGL? I want to make camera like "aeroplane" camera with a pitch yaw and roll. I want to have good explanation on everything! Can ...
1
vote
1answer
692 views

how to make cross platform 3d games using modern opengl? [closed]

How to create games that run on windows, Linux, mac os x, android, ios, wp8 etc.... using c/c++, opengl 3 or 4 and opengl es 2.0. any tutorials or videos on how to create cross-platform 3d games.
1
vote
1answer
133 views

Android Object get Jagged at the border

I am new to OpenGL ES 1 in android. My 3D Model border getting Jagged. Please help me to look like a smooth border instead of jagged. Screenshot : http://i.stack.imgur.com/1Gq83.png private class ...
1
vote
1answer
103 views

How to render models using a personalized projection matrix?

I'm creating a game with a great sprite demand. Out team is considering automatizing the sprite generation using 3D models. The problem is we have a very particular ortographic projection: We have ...
0
votes
1answer
78 views

How to rotate the camera to point to a specified location?

I have a quaternion based camera class (which controls a view matrix) and would like a function to rotate the camera to face a specified point. The best approach I can come up with is that I rotate ...
1
vote
2answers
579 views

How to check for cube collisions?

I want a method, which takes two "ObjectBox" objects (A "ObjectBox" has .getX() .getY() .getZ() .getSizeX() .getSizeY() .getSizeZ() methods) as a parameter and return true if the two Boxes are ...
0
votes
1answer
1k views

Parsing Blender obj with Opengl And C++

I wrote an example attempting to parse blender *.obj file in OpenGl/C++ , to get it done : I have to open the file, exploding it's lines ...and returning the result. This is how the shape.obj file ...
1
vote
0answers
82 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 ...
3
votes
1answer
237 views

Do GLSL 4.x subroutine variables cause any performance overhead?

There's not too much deep information about them on the web. How are they implemented and how they work under the hood? I'd like to know that they cause any performance overhead or not, especially in ...
0
votes
0answers
114 views

Handling 3D perspective for different aspect ratio

I have problem for supporting different aspect ratio in developing Mobile Game. I was developing on 2:3 screen which is iPhone 4 (Retina). When I use width and height for screen size and use fixed ...
1
vote
1answer
148 views

How can I find the location of OpenGL object after rotation?

I have a rotating object, a cube, which I rotate in OpenGL as follows: gl.glPushMatrix(); gl.glTranslatef(400.0f, 300.0f, 1300.0f); gl.glRotatef(m_x, 4.0f, 0.0f, 0.0f); gl.glRotatef(m_y, 0.0f, 4.0f, ...
-1
votes
1answer
118 views

Ray picking gives inversed results

I'm trying to do a simple ray picking implementation to allow a user to select a cell in a grid rendered in 3D. I'm almost there, but I've ran into an issue which I can't seem to solve. Consider the ...
6
votes
1answer
276 views

How to find the bottleneck in a typical OpenGL game?

I am working on a little game engine. All major features are implemented yet, despite game logic which I assume not to be such a computational effort. The framerate is at least around 40 FPS, most of ...
5
votes
2answers
798 views

Is the “impossible object” possible in computer graphics?

This may be a silly question but I want to know the answer to it. I saw this thing called the "impossible object", while they're many different images of this online, it's suppost to be impossible ...
0
votes
2answers
748 views

Screen or World Coordinates to tile Coordinates

I have Plane made of tiles in opengl. I start drawing them at (0, 0, -20) after that i do my translations so that the view is rotated somewhat similar to an isometric (kind of) perspective. I'd now ...
3
votes
2answers
202 views

Extract smaller frustum from camera frustum?

Background: I was thinking of implementing multiselection by performing a frustum culling on a sub-part of the screen. Problem: Given total screensize, a rectangle on the screen (pos, size), and ...
2
votes
2answers
148 views

How scanline rendering finds an intersection with an object

I'm a newbie with graphics and after I read many articles on the web I still don't understand how in rasterizing from a pixel coordinate like (0;0) on the screen the intersection with an object (let's ...
2
votes
0answers
425 views

Converting Mouse Coords to 3d coords with Camera position [closed]

So I've looked at all the answers I can possibly find, and nothing seems to fit what I need exactly (because im bad at math). I'll explain what I have thus far: A camera with x,y,z, Pitch and Yaw ...
5
votes
2answers
665 views

3D models on 2D tilemap perspective when scrolling

I am creating a small top-down game, where the player traverses a 2D tilemap, with an illusion of depth provided by 3D models for things like buildings or trees. Having gotten to the point where I ...
2
votes
0answers
245 views

Displacement Mapping opengl-es [closed]

I need to do an application similar to this Morfo. And I posted a question here where the answer states the solution is "Displacement Mapping" . And I googled this to do it in opengles. I couldnt get ...
1
vote
1answer
255 views

Are interleaved vertex data formats better than non-interleaved formats?

I have been reading up on data formatting for 3D objects so that I can render my meshes as fast as possible in OpenGL. I am quite new to OpenGL so bear with me. The format for interleaving your ...
0
votes
0answers
937 views

How to do collision detection in 3D using bounding boxes?

I am using c++ in visual studio 2010 with opengl. I am trying to make a programme that has 2 boxes that are able to be stacked on top of each other but I am having some trouble with the collision ...
0
votes
1answer
308 views

Stars coming out of screen [closed]

I am pretty new to Graphics Programming. I am currently using OpenGL. I have got some hands-on in last few days. I have knowledge of Texture Mapping, Cubemap, Multitexturing. But somehow I am not able ...