Hot answers tagged

23

Speed is the most common reason why this is not done. In fact you can do what you propose, if you make your own operating system, its just going to be very slow for architectural reasons. So the assumption that its faster is a bit flawed. Even if it would be faster, it would be less efficient in terms of development (like 1% speed increase for 10 times the ...


15

work on any 32-bit color GPU (even old ones)? Bit of history here: this is how games were done on PC up until graphical accelerators started to become available in the mid-90s. It did indeed work on all hardware, because the hardware wasn't doing much. A graphical accelerator allows the drawing of pixels considerably faster than a CPU can, by using ...


14

Just to add to joojaa's answer, things are still being drawn pixel by pixel. You're just generating the pixels using a vertex shader/assembler/rasterizer, then texturing and lighting them using a fragment shader. This was all done in software in the 90's when your video card wasn't much more than a blitter and a frame buffer, but it was slow as hell. Hence ...


14

Raxvan is completely right that "traditional" anti aliasing techniques will work in raytracing, including those that use information such as depth to do antialiasing. You could even do temporal anti aliasing in ray tracing for instance. Julien expanded on Raxvan's 2nd item which was an explanation of super sampling, and showed how you'd actually do that, ...


12

I think it's safe to say that there are two different ways of doing AA in raytracing: 1: if you have the final image and the depth image it is possible to apply almost all existing techniques that are used in games (FXAA, etc) Those work directly on the final image and are not related to raytracing 2: the second method is to take into account multiple rays ...


8

Here's my take on it. A pixel is not a square, and it isn't even a rectangle. A pixel is a point (infinitely small) that has a color associated with it. The only way I personally have ever seen pixels viewed (interpreted) by a display is to use "nearest neighbor" sampling where the pixels were on a rectangular grid, which means that the color of any given ...


7

Let's suppose a fairly typical raytracing main loop: struct Ray { vec3 origin; vec3 direction; }; RGBColor* image = CreateImageBuffer(width, height); for (int j=0; j < height; ++i) { for (int i=0; i < width; ++i) { float x = 2.0 * (float)i / (float)max(width, height) - 1.0; float y = 2.0 * (float)j / (float)max(width, ...


7

OpenEXR might be a good fit. You can have an arbitrary number of channels per pixel and the data types for each channel can be integers. http://www.openexr.com/


7

I'm not sure that there's a truly optimal radius—it's going to be a subjective matter based on what the image looks like. As you say, too large a radius results in blurring and too small a radius results in aliasing. I like to set sigma = 0.5 px, so that the overall radius is about 1.5 px (since the Gaussian has the majority of its weight within ±3 ...


4

If one examines old CRT television displays, one will observe red, green, and blue phosphor dots in a triangular lattice. Some LCD television sets had a somewhat similar arrangement; pixels were rectangular rather than square, but successive rows of pixels were staggered so that the horizontal position of a red pixel on one row would be halfway between the ...


4

Imagine that one is rendering a picture of a flat floor with a uniform black and white checkerboard pattern that extends to the horizon; the checkers are large enough that they should be clearly visible at points near the camera but not large enough to be distinguishable near the horizon. Near the horizon, the floor should simply appear as uniform gray. ...


4

The answer to both your questions is the same: the physical size of the monitor makes no difference at all. If your screen is 1920x1080 pixels, and you display a 960x540 image without any scaling, the image will stake up a quarter of the screen, and it won't take any more GPU time to display on a larger monitor. The only caveat is that most OSes have some ...


4

Yes, and there are several ways this can apply. First off though, we need to fix a misconception in your diagram. Even if pixels really were square, the volume contributing to the pixel gets wider as it gets further away from the image plane, because of perspective. For a square pixel, the volume would be a square pyramid, whose apex is at the camera. It's ...


4

What they're saying is you don't have to render the game at the same resolution that it's displayed. For example you could be in a display mode of 1920×1080, but have the game rendering at only 1280×720, to run faster. The OS and display hardware can automatically upscale the frames to the display resolution under the hood. Usually, the OS runs a window ...


3

According to a review by Legge & Bigelow the arc or degrees of visual angle ($\alpha$) is, $$ \alpha = 57.3 \times S/D, $$ where S is height of object and D is distance to object. [1] $S/D$ is the small angles approximation of $2 \times arctan(S/2D)$ which follows form geometry. Image 1: the equation comes straight from trigonometric definitions. ...


3

The question is: is there a way to pass this type of texture to glTexImage2D as-is? Yes; you can just pass it as-is, but (looking at the docs) it is not supported directly. You'll need a custom shader to interpret it. Depending on your needs, expanding the pixels first (or even doing the full conversion CPU-side) may be worthwhile. At a guess, I'd say ...


3

I may be misunderstanding what you're asking, but if you know the sensor size and the number of pixels in the object, then you can calculate the object size. For example, a Canon 7D has an APS-C sensor that's 22.3 x 14.9mm and 5184 x 3456 pixels. That works out to ~0.0043mm/pixel. So if you have an object that's 250 pixels wide, then the projection of the ...


3

Yes, theoretically, for the sphere no for other things in image. If it is possible to augment the situation then it is possible to measure anything you can track much more reliably. First, knowing the scale of a object that you can successfully track is a requirement to getting a scale for the image as the cameras lost all scaling info. But this requirement ...


2

Probably .dds. You can store there textures array or 3d texture both can be use as array per pixel. You can try creating this textures with DxTex from DirecX SDK. Also you can look in Legacy Texture Tools from Nvidia https://developer.nvidia.com/legacy-texture-tools


2

In your 31 bit solution, the thing most likely to happen there is that you'd give an extra bit to green and make a 32 bit solution. In 16 bit color for instance, r and b get 5 bits while g gets 6 bits, because your eye can distinguish more greens. Or maybe you'd use that extra bit to have 1 bit alpha? Not sure if that'd be very useful though... As far as ...


2

In my opinion and experience i don't think there exists an univocal answer... since basically in literature you can easily find example of adaptive filters too (i.e. of variable size). I think the actual answer should be related to the both context of applications (i.e. hardware or sofware, real time or not) and kind of scene you're going to synthesize (...


1

I don't know, why you consider your first approach hacky, but an alternative would be to analyze the shape of your brush and how it interacts with your underlying data structure. For example for your rectangle: Let's assume the brush's sides are parallel to the sides of the image. Then you can calculate how man pixels are covered by your offset d. Let's call ...


1

Ad 1) Yes, if both monitors have the same resolution but different screen sizes, this means the pixels of the larger monitor are bigger. It could also mean the space between the pixels is different. Ad 2) No, the physical size of a monitor makes no difference for the GPU. It only cares about the resolution, for example 1920x1080 vs 3840x2160. The latter ...


1

Just to add to the answers above: Distributed Ray Tracing (Cook, Porter, & Carpenter). Allows you to simultaneously do spatial AA, temporal AA (i.e. motion blur), and focus/depth of field. Best to read the paper, but basically the N-rays you fire per pixel can also be assigned pseudo-random times (for motion blur) and positions on a lens (to get focus ...


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