Questions tagged [3d]

3D computer graphics are graphics that use a three-dimensional representation of geometric data stored in the computer for the purposes of performing calculations and rendering 2D images.

3D could mean 3D graphics. 3D graphics usually involve a lot of matrix manipulation and vector mathematics. These matrices will be both affine transformations for manipulating the objects in 3D space (translation, rotation and scaling) and perspective transformations for generating the 2D image required for display. More information about 3D graphics at Wikipedia page of 3D graphics

3D could also mean Stereoscopy. Stereoscopy (also called stereoscopics or 3D imaging) is a technique for creating or enhancing the illusion of depth in an image by means of stereopsis for binocular vision. To generate stereo images two normal displays are generated offset from each other by the distance between the eyes. These are then combined on the display in one a variety of ways (LCD shutter glasses, polarised projections etc.) to generate the 3D effect.

More information on Stereoscopy at Wikipedia page of Stereoscopy

17108 questions
25
votes
3 answers

Convert Latitude and Longitude to point in 3D space

I need to convert latitude and longitude values to a point in the 3-dimensional space. I've been trying this for about 2 hours now, but I do not get the correct results. The Equirectangular coordinates come from openflights.org. I've tried several…
Niklas R
  • 16,299
  • 28
  • 108
  • 203
24
votes
1 answer

How can I bind two shapes together as one in Three.js?

Can I bind two different shapes together as one shape? For example, binding sphere and cylinder together as one?
BorisD
  • 2,231
  • 5
  • 25
  • 35
24
votes
4 answers

Get pitch and roll from matrix without singularities

I'm working on motion simulator with 2 DOF (pitch & roll). I'm reading transformation matrix from game and I need to get the angles and send to hardware to drive motors. Since Euler angles have singularities, I can't really use them. It behaves like…
AdrianEddy
  • 707
  • 1
  • 8
  • 13
24
votes
1 answer

Difference between tessellation shaders and Geometry shaders

I'm trying to develop a high level understanding of the graphics pipeline. One thing that doesn't make much sense to me is why the Geometry shader exists. Both the Tessellation and Geometry shaders seem to do the same thing to me. Can someone…
Andi Jay
  • 5,882
  • 13
  • 51
  • 61
24
votes
1 answer

Three.js - Scale model with scale.set() or increase model size?

What is the best practise for scaling 3d models in Three.js (or other 3d renderers)? Here is an example I just faced: I load a model in and realise the size of the model is too small. I then scale the mesh using mesh.scale.set(2,2,2); and it is…
jskidd3
  • 4,609
  • 15
  • 63
  • 127
24
votes
4 answers

Check which side of a plane points are on

I'm trying to take an array of 3D points and a plane and divide the points up into 2 arrays based on which side of the plane they are on. Before I get to heavily into debugging I wanted to post what I'm planning on doing to make sure my…
GameDever
  • 243
  • 1
  • 2
  • 5
23
votes
3 answers

Mapping image onto 3D face mesh

I am using the iPhone X and ARFaceKit to capture the user's face. The goal is to texture the face mesh with the user's image. I'm only looking at a single frame (an ARFrame) from the AR session. From ARFaceGeometry, I have a set of vertices that…
coco
  • 2,998
  • 1
  • 35
  • 58
23
votes
2 answers

Three JS - Find all points where a mesh intersects a plane

I have created a three.js scene that includes a plane that intersects a mesh. What I would like to do is get an array of points for all locations where an edge of the mesh crosses the plane. I have had a good look for solutions and can't seem to…
user1961104
  • 405
  • 1
  • 3
  • 7
23
votes
2 answers

What's a quaternion rotation?

Is quaternion rotation just a vector with X,Y,Z which the object will rotate towards, and a roll which turns the object on its axis? Is it that simple? Meaning if you have X=0, Z=0 and Y=1 the object will face upwards? And if you have Y=0, Z=0 and…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
23
votes
2 answers

How can I overlay 3D model over google or iOS maps?

I have a 3D model for building in KML format and i want to import it over google or apple maps to get the user location and find POI. I have find that google maps v2 [1]: https://developers.google.com/maps/documentation/android/views support 3d…
Mina Nabil
  • 676
  • 6
  • 19
23
votes
2 answers

How to calculate the normal matrix?

I have some trouble with my normal matrix. vs.glsl #version 440 in vec3 vPosition; in vec3 vNormal; out vec4 eyeCordFs; out vec4 eyeNormalFs; uniform mat4 model; uniform mat4 view; uniform mat4 proj; void main() { mat4 modelView = view *…
Maik Klein
  • 15,548
  • 27
  • 101
  • 197
23
votes
2 answers

CSS3 Matrix rotation

I have a CSS 3D cube that I'm trying to rotate left/right/up/down straight as it appears to user. If I use css rotation functions, then I rotate the axis, not the cube. There are lots of articles on the web about X,Y,Z matrix rotation calculation,…
Alex Under
  • 1,406
  • 1
  • 12
  • 25
23
votes
1 answer

Is there a way to draw primitives in 3D with Python?

I want to draw 3D primitives like spheres, cylinders and planes (patches) in a 3D plot and I would like to be able to interactively rotate, translate and zoom the scene. I want to do that in Python. I'm use to use Matplotlib for 2d graphs but I…
dom_beau
  • 2,437
  • 3
  • 30
  • 59
22
votes
3 answers

A Good 3D mesh library

I'm looking for a good 3D Mesh library Should be able to read popular formats (OFF, OBJ...) Should support both half-edge structure and a triangle soup Should be tolerant to faults and illegal meshes. Basic geometric operations - intersections,…
shoosh
  • 76,898
  • 55
  • 205
  • 325
22
votes
3 answers

How does one convert world coordinates to camera coordinates?

I have an input 3D vector, along with the pitch and yaw of the camera. Can anyone describe or provide a link to a resource that will help me understand and implement the required transformation and matrix mapping?
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406