5

If depth testing is disabled, the triangles get drawn in the order they're submitted, i.e. the order they appear in the index buffer or vertex buffer. Later ones will overwrite earlier ones, or blend over them if blending is enabled. This ordering is guaranteed by all GPUs and APIs as far as I know.


5

Multi-view stereo (MVS) is the general term given to a group of techniques that use stereo correspondence as their main cue and use more than two images. A quote from 'Multi-View Stereo: A Tutorial' by Yasutaka Furukawa and Carlos Hernández. So to paraphrase: We have a set of images that is larger than two, and use them in a pairwise manner by applying ...


5

Instead of using a perspective projection you would use a orthographic projection. Then the trick is to position the bounding box to in front of the normal camera. An additional option is to add a skew/shear operation so it maps the light direction to the vertical and keeps the horizontal ground plane horizontal. This avoids leaving a large dead zone ...


5

You can ray trace the distance to the second surface. This may be conceptually easiest, but not necessarily fastest method*. But there is a neat trick, you can multi pass render a depth map to the water surface from the camera. The distance in water is now pixel depth minus the depth map depth. This does not work in all situations such as when you exit ...


5

The blog post that you talked about, is not about generating bokeh for a computer generated image. It is instead about generating a believable depth of field effect from an image captured by a smartphone camera, as the effect is desired for portraits to make the subject stand out. It generally works by splitting the image in to two parts. One part is the ...


5

This is an example of implementation details leaking through the abstraction. Parts of the GL state are often implemented via native GPU ISA instructions that the driver injects into user-defined shaders, such as fetching the geometry from vertex and index buffers, or interpolating VS outputs in the subsequent pipeline stages. Since we're looking at the GPU ...


3

(Just converting comment into an answer) It seems you might be asking one of two possible questions. If you meant "Why doesn't the Depth buffer contain camera space Z" then it's perhaps worth reading Why do GPUs divide clip space Z by W, for position? If, OTOH, you just meant "why is it restricted to [0,1)?", then that's probably because old systems ...


3

No, it's not. The way many of the 3D sensors work is by projecting an infrared pattern onto the surface and measuring how it distorts. But with a 2D image, the pattern will simply be projected onto the flat 2D image, not onto the objects in the scene. So the 3D sensor will only sense a flat card. Other methods work by combining 2 images taken with different ...


2

If I blur the whole image and apply the result on the sphere, the white background will bleed onto the sphere shape and I want to avoid that. I also don't want that the blue (3) and yellow (4) sphere merges with the red (1) and green (2) ones. But I would like that the green and red ones merges. Again This could be done using the depth but if you have more ...


2

Congratulations for having progressed so far. Context, first analysis Your explanation: I am using a z-buffer, with one stored length to a wall for the x coordinate of each ray. Means the z-buffer is currently one-dimension. One dimension is enough in the first case (your first two images) but not in the second case. To see why, imagine that the red tomato ...


1

Unfortunately, I don't know how 3ds max handles its Z-buffer or its near and far planes so I can't give a definite answer. There are many ways the software could handle this. However, you are on the right track. Z-fighting occurs when there is not enough numerical precision to distinguish two "objects" from the scene rendered at the same pixel. In such ...


1

Depth buffer values are clamped to that range because usually they are using fixed-point representation, so if clipping is disabled (by glEnable(GL_DEPTH_CLAMP)) then they can't hold anything beyond that range. However, there isn't really a good reason for this clamping when floating point depth buffers are used. In fact GL_NV_depth_buffer_float extensions ...


1

This is just a visualisation. Type the command vis scenedepthz uv0 to see the actual depth buffer used. UE4 uses a "reversed" depth buffer for the scene.


Only top voted, non community-wiki answers of a minimum length are eligible