Questions tagged [zbuffer]

is an array used to store the maximum Z coordinate of any feature plotted at a given (X, Y) location on the screen.

The Z-buffer is a memory buffer (array) used in a graphics accelerator to hold the maximum z-axis value of each (X, Y) location. This allows a pixel check so that if any pixel is "below" the z-buffer value for that location, it can be ignored. This is for "hidden surface removal."

114 questions
0
votes
1 answer

Checking depth/z when rendering triangular faces in 3d space

My question can be simplified to the following: If a 3d triangle is being projected and rendered to a 2d viewing plane, how can the z value of each pixel being rendered be calculated in order to be stored to a buffer? I currently have a working Java…
user2649681
  • 750
  • 1
  • 6
  • 23
0
votes
0 answers

MATLAB: Can I Save the Z-Buffer Array Values?

I am new to MATLAB and am wondering if anybody could help me with this (probably basic) question: I would like to view/save the depth value for each screen pixel (the z-buffer) of a 3D surf(), ideally in a file. I have read Using OpenGL in Matlab to…
0
votes
0 answers

Inaccurate calculation of vertex positions in the projection

There is a sphere of radius 7000 that is wrapped in Object3D with the position (0,0,0) When the zoom camera as close as possible to the heights (eg 0.2 from vertices), we get the following: That is, the larger the value of the vertices, the worse…
Ni55aN
  • 63
  • 1
  • 9
0
votes
1 answer

Z-fighting. Inaccurate coordinates of faces / shakes

For sufficiently large approaching the surface of the sphere, which is a model of the Earth, I get inaccurate coordinates of vertices. Because of this, when moving the camera the shaking noticeable. How to get rid of it? On the Internet to find…
Ni55aN
  • 63
  • 1
  • 9
0
votes
1 answer

Mathematical view of z-fighting

to understand how z-fighting is working i got this question. Consider the point p = (0, 0, −500) given in the local coordinate system of the camera. Derive the depth values assigned to p in the different stages of the pipeline described above, i.e.,…
Klotz Großer
  • 73
  • 1
  • 1
  • 7
0
votes
1 answer

zbuffer problems using 2D planes in THREE.JS

I am composing 2D planes with textures. I have 3 levels. A background plane at z=0, black shapes for conections at z=0.1 and small planes with textures at z=0.2 the problem is that when I move the camera planes seems to change z position. Planes…
0
votes
2 answers

Custom drawing order for AR overlay effects in OpenGL ES (10)

I am working on a augmented reality application and need to sort the rendering of three different kinds of geometry. Level 1 Background geometry. This is a set of triangles that represent basic architecture. Walls etc. Level 2 Photograph plane. A…
J-S
  • 425
  • 3
  • 17
0
votes
0 answers

calculate zBuffer-accept wrong values

calculate zBuffer-accept wrong values I am trying to calculate my zBuffer and I accept wrong values. the model that I am loading has to have diffrent Zbuffer values but I dont accept them my values are defined ZNEAR 1.0f ZFAR 1500.0f my code…
Dana
  • 1
  • 3
0
votes
1 answer

Absolute distance of depth buffer

1.How can i find the absolute distance of the depth buffer? 2.How can I calculate the real value of the depth_bias and depth_scale? I tried by the commends: glGetDoublev(GL_DEPTH_BIAS, &depth_bias); // (Returns only…
0
votes
1 answer

good way to implement a z-buffer

currently I'm making my first experiences with 3D projection and rendering. So, I'm using löve lua (ik, not the best platfrom for 3D), and I can render all polygons (only triangles) perfectly. Because sorting the table of polygons by distance to the…
ardera
  • 51
  • 1
  • 4
0
votes
1 answer

Custom 3D Rendering

So I've been prodding ever so diligently at the internet as of late and have come across some interesting games. The basic example is Minecraft4k. It was made for the Java4k contest a few years back, but what I am really interested in is how the…
CoderTheTyler
  • 839
  • 2
  • 11
  • 30
0
votes
0 answers

Absolute limite to z-buffer (depth buffer) value

I'm trying to use the z-buffer to measure distances, but I found a unexpected issue. I'm aware that the z-buffer returns a 0..1 float number through my code: zImageData = new osg::Image; zImageData->allocateImage(720, 576, 1, GL_DEPTH_COMPONENT…
elael
  • 1
  • 1
0
votes
1 answer

Occlusion culling for spinning sphere dataset

I am currently working on an assignment in which I have to implement a CPU-only rasterizer for sphere datasets. The datasets are static and therefore don´t change in runtime, even though the whole set can rotate in front of the camera. The idea now…
0
votes
1 answer

Rendering the Z-buffer to texture in WebGL

When I create z-buffer texture like so: gl.bindTexture(GL_TEXTURE_2D, texBuff); gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); gl.texParameteri(GL_TEXTURE_2D,…
spearmunkie
  • 21
  • 1
  • 7
0
votes
2 answers

Calculating z-buffer from glm::project output

I would like to calculate the z-buffer of an object position from the output of glm::project. The calculation of the z-buffer in the code below is from https://en.wikipedia.org/wiki/Z-buffering. What I've tried int windowWidth = 800; int…
Købmanden
  • 117
  • 1
  • 2
  • 10