Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [3d]

Questions and problems dealing with three-dimensional space, including 3D meshes and other data structures, vector math, transformations, etc.

24
votes
1answer
722 views

Is my perspective math correct?

I've got a homework in which I have to calculate and plot some points using a pespective transformation, but I'm not sure my results are correct, since the 3d plot using Camera coordinates looks very ...
16
votes
3answers
4k views

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Games and other graphically intensive applications use frameworks like OpenGL and DirectX. Also they require features like pixel shader and DX12. But why would we need all these frameworks and GPU ...
12
votes
5answers
446 views

Is there a standard specification for 3D graphic representation?

I'm reading a book on computer graphics, and at some point, it shows a 3D model, created from a .dat file. Here are a few rules for the .dat file creation: Made of a list of vertex positions / faces ...
11
votes
3answers
3k views

Why are quads used in filmmaking and triangle in gaming?

In film school, in the classes of 3D modeling, I was told that when we model something for films we maintain topology of 4 edged polygons. Any polygon which has more or less than 4 edge/vertex is ...
11
votes
1answer
257 views

Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?

I am trying to understand why meshes that are smoothed in 3D studio (Modifiers/Smoother) end up having the same amount of vertices/faces before or after that process, as well as the exact same ...
11
votes
1answer
483 views

Is this the correct way to implement Beer's Law?

When I implement Beer's law (color absorption over distance through an object), it never looks very good for some reason. When i have the color behind the object, I calculate the adjusted color like ...
10
votes
1answer
93 views

Is depth of field incongruous in a 3D still image?

If rendering an image in 2D, adding depth of field effects (blurring objects further from the focal distance) adds realism and draws the eye to the object of the image. With a 3D (i.e. stereo) image, ...
10
votes
1answer
905 views

Pipeline to create Voronoi Meshes

I would like to implement a Maya plugin (this question is independent from Maya) to create 3D Voronoi patterns, Something like I just know that I have to start from point sampling (I implemented the ...
9
votes
1answer
9k views

What's the difference between orthographic and perspective projection?

I have been studying computer graphics, from the book Fundamentals of Computer Graphic (but the third edition), and I lastly read about projections. Though, I didn't exactly understand what's the ...
9
votes
1answer
148 views

Sphere intersection occlusion (for hybrid raytracing)

Thinking about hybrid raytracing, hence the following question: Suppose I have two solid spheres $s_1$ and $s_2$. We know their centres and radii, and we know that they have some overlapping volume ...
8
votes
1answer
460 views

Maximum number of vertices after clipping a triangle against an AABB

I clip a 3D triangle against a 3D Axis-Aligned Bounding Box (AABB) to obtain the largest planar polygon of the triangle contained in the AABB. My clipping algorithm is a (slightly modified) version of ...
8
votes
1answer
190 views

Human Readable/Writable 3D Representation Formats/Languages?

My goal is to create 3D meshes without the use of a 3D editor. So I want to know what representation languages and formats there are that are designed for this or otherwise that would be good for ...
8
votes
2answers
648 views

How to translate mouse movement to a rotation gizmo?

I need to implement translation, scaling and rotation gizmos and I'm having trouble with the rotation gizmo. Basically I don't know how to translate the mouse movement to determine in which direction ...
8
votes
0answers
346 views

3D mesh segmentation simple algorithm

I am developing the algorithm reported in this article: Least square conformal mapping. Here is presented an algorithm to flat a 3d mesh on the parametric space, but i don't understand the ...
7
votes
3answers
208 views

How do graphic engine developers debug their 3D graphics code?

I'm currently trying to create an amateur game engine, and I often run into very basic bugs (eg I change the node hierarchy code and suddenly nothing is displayed). Some of the methods I will use ...
7
votes
1answer
256 views

NURBS topology classification

In what sense is it true that a NURBS surface can only have the topology of a plane, cylinder or torus? For example I can do a NURBS sphere. Is the sphere homeomorphic to one of the above surfaces?
7
votes
1answer
361 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
7
votes
1answer
164 views

After a deformation operation on polygons, how can I check for and fix inverted polys?

I'm doing a quick and dirty automated deformation routine on a polygon body. If it was a tree, and my axis was in the center of the tree, I would like to bend the body by bending the axis. I would ...
6
votes
2answers
5k views

How to achieve gimbal lock with Euler angles?

I was studying about Euler angles and I came across the problem gimbal lock which can occur by using Euler angles. In gimbal lock we lose one axis of rotation. But how? And when does it happen? On ...
6
votes
1answer
189 views

Graphics Pipeline: Viewspace & Back face culling incorrectly

I'm attempting to model a simple graphics pipeline - using Matlab at the moment as a modelling tool to get the transformations correct. I appreciate there are software tools that would make this ...
6
votes
1answer
113 views

3D projection that increases objects' size as they become more distant

tl;dr Is there a name for a type of (non-physical) projection that causes objects to become larger the farther they are from a camera? With a fisheye projection, an object twice as far from the ...
6
votes
1answer
983 views

What is stereo about multi-view stereo?

What 3D scene reconstruction methods does the term "multi-view stereo" encompass? Is it only used for methods that apply binocular stereo algorithms (taking 2 views as input) in a pairwise manner? Or ...
6
votes
1answer
1k views

Why do I need to inverse the orientation matrix of a camera to be able to translate it in the direction it is facing?

I've been going over some OpenGL learning resources and one of them is this article: Modern OpenGL 04 - Cameras, Vectors & Input in which the author presents an approach to building a ...
6
votes
1answer
176 views

Mix shader looks wrong on my path tracer

I apologize if my methods seem way off because this is my first time trying to build a path tracer and I'm struggling quite a bit. Currently, I am trying to mimic the "mix shader" node in Blender 3D ...
5
votes
2answers
851 views

Is there a way to draw spherical objects without triangles?

It seems that in all existing graphics libraries, 3D objects are always described in terms of triangles. Drawing triangles can be implemented very efficiently on video hardware and since any 3D object ...
5
votes
2answers
207 views

How did the hard, accurate shadows, work in early 3d (2000 - 2004) games?

I've been hunting around the internet for a while now, and I can't find anything about the specific shadow technique that I'm looking for. I can only recall one game in particular that used it, and I ...
5
votes
2answers
203 views

What is missing in this image that stops it from looking like a photograph?

Look at this image: This is CG, Saya, a project meant to make as real CG as possible to the point of becoming indistinguishable from reality. I would say that it is pretty believable. But, it still ...
5
votes
1answer
102 views

How does a rigged model work?

What black magic is behind this? Starting from a pile of polygons, a skeleton, and an initial conformation, how is a new conformation turned into a new pile of polygons?
5
votes
1answer
87 views

Best way to group 3d points into planes, if any

If I have some 3d points, how can I discover parallel planes within them (not just arbitrary planes). I want to know how many "levels" or "floors" something can travel within, after it has done so, ...
5
votes
1answer
82 views

What other paradigms exist besides vector/fragment/transform graphics programming?

I am familiar with the basic concepts of writing vector and fragment shaders while using linear transformation matrices to describe orientations in 3D space. But, what other paradigms exist (...
5
votes
1answer
242 views

Transformation Matrices

Consider the following problem and its answer: Given 3 points in 3D: $A=(A_x,A_y,A_z); B=(B_x,B_y,B_z) ; C=(C_x,C_y,C_z)$ Find the transformation matrix (in homogeneous coordinates) that ...
5
votes
1answer
64 views

How to randomly draw Quaternions within a specific range of Euler angles for rotation?

I am pretty new to Quaternions so please bear with me. I want to draw random Quaternion samples so that their Euler angle equivalent would range within [-30, +30] ...
5
votes
1answer
242 views

why is translating in 3D space the same as shearing in 4D space?

I was reading "3D Math Primer for Computer Graphics and Game Development" and there was something the author had said that I thought was particularly interesting, he stated It is important to ...
5
votes
1answer
201 views

Creating Sparks using Code

I'm new to this area and have less knowledge. I want to create some graphics like sparks and lightning by writing some code, using my own physics. I don't want to use some engine, However I can use ...
5
votes
1answer
349 views

Rotation matrix for a 3D object in space

This is the follow-up question from here: Minimum requirements to uniquely represent a 3D object in space Assume I have 3 original points in a 3D object (in 3D space) as ...
5
votes
2answers
130 views

Implement own Bend function

I'm trying to write a mesh deformer that bends a Cube around an axis like this: The bend degree in figure A is 90 and something like 35 in B. So if I know my desired bend degree how can I get alpha? ...
5
votes
1answer
159 views

Why is rotating this prism in iOS Metal not rendering correctly?

I've set up a test project for learning Metal on iOS to do some rendering, but I'm a bit stumped on how to get a prism rotating correctly about its y axis. Here is the prism rendered without depth ...
5
votes
1answer
496 views

Normal 2D photo to VR-compatible spherical photo

How to turn a normal photo like this one : into a photo that I can use in my game development platform (Unity3D). I just wrap a 3d sphere model with the photo and then it can be all around me when I ...
5
votes
1answer
117 views

Where should I project a polygon corner when it is behind me?

I am creating a simple 3D engine as a learning project to get the hang on spherical trigonometry. I am using the following approach. 1. A model consists of a lot of triangular faces. 2. Each triangle ...
5
votes
1answer
58 views

get partial view points from 3d surface mesh

I have a 3d surface mesh. Say the camera is located in some points and I want to get the visible points from the 3d surface mesh from the camera view. I believe this kind of process would be done ...
5
votes
1answer
140 views

Project quad onto ellipse in 3D

I have three points P0, P1, P2, which are located on an arbitrarily oriented ellipse in 3D space. I have a square texture map with a circle on it. I would like to render a textured quad (with the ...
4
votes
2answers
223 views

Minimum requirements to uniquely represent a 3D object in space

Let's assume we have a 3D object (in 3D space). We get a single representation vertex from this whole 3D object. Given the fact that the object can be moved and rotated in the space in any direction, ...
4
votes
1answer
2k views

What formula or algorithm can I use to draw a 3D Sphere without using OpenGL? [closed]

I know that there are 3 techniques to draw 3D objects: (1) Wireframe Modeling and rendering (2) Additive Modeling (3) Subtractive Modeling Am I correct? What formula or algorithm can I use to draw a ...
4
votes
1answer
225 views

Earth curvature and horizon in modeling large scenes

If I want to model a large environment, how can I solve the problem of earth curvature and horizon? I use an environment map for the sky, but for the ground what can I do? Do I have to model the ...
4
votes
2answers
100 views

Is it possible to render red / blue 3d from one image and a depth buffer?

To render an image for use with red & blue 3d glasses, the usual way to do it is to render from one point of view, convert it to a single intensity (greyscale) value per pixel, and then put that ...
4
votes
1answer
53 views

What metrics are used for deciding if a 3D object is visible?

I'm wondering what metrics I could use to decide upon the visibility of a 3D object in VR or other 3D applications and what advantages each has.
4
votes
1answer
275 views

What if we don't mention Modelview and projection matrix?

So I've been learning opengl for some weeks now and managed to understand all the viewing pipelines. As far my understanding goes we need to bring the object to world space and then the world space to ...
4
votes
2answers
178 views

How to get the transform amount from a screen vector and a direction vector?

I am working on the move tool in a 3D modeling software. I need to know how much to move when the user drags an axis of the gizmo (for example along the x axis). I have the 2D vector describing how ...
4
votes
1answer
422 views

How to properly direct light sample GGX in path tracing

I have been trying to implement the GGX shader in my path tracer based on this paper: Microfacet Models for Refraction through Rough Surfaces It's pretty clear how the importance sampling works, but I ...
4
votes
2answers
158 views

File format for swept profile with changing normal

I have to create a file describing a 3d surface with the following properties: a circular arc cross section is swept along a closed 2d curve spine defined with equations the normal direction of the ...