37 votes
Accepted

Why does monte carlo ray tracing perform better than distributed ray tracing?

The term "distributed ray tracing" was originally coined by Robert Cook in this 1984 paper. His observation was that in order to perform anti-aliasing in a ray-tracer, the renderer needs to perform ...
Benedikt Bitterli's user avatar
20 votes
Accepted

Why is it twice as expensive to make a noise function that can be tiled?

It's unfortunate that people commonly recommend this. Blending between two (or four, etc.) translated copies of a noise function in that way is a pretty bad idea. Not only is it expensive, it doesn't ...
Nathan Reed's user avatar
  • 24.7k
16 votes

How is anisotropic filtering typically implemented in modern GPUs?

The texture filtering hardware takes several samples of the various mipmap levels (the maximum amount of samples is indicated by the anisotropic filtering level, though the exact amount of samples ...
yuriks's user avatar
  • 1,130
16 votes
Accepted

Visualizing the Lane-Riesenfeld Algorithm

The Lane-Riesenfeld algorithm subdivides the control polygon of a B-spline to create a new control polygon with the same limit spline. It's made up of two steps: first, duplicating all of the control ...
gilgamec's user avatar
  • 881
15 votes

Algorithm to find the center of a Bezier curve

Bézier curves are mathematical entities and have no clearly defined center. One can in fact define many different things as the center of the Bézier curve. I have tried to depict some of the possible ...
joojaa's user avatar
  • 8,367
13 votes
Accepted

Shading: Phong vs Gouraud vs Flat

Flat shading is the simplest shading model. Each rendered polygon has a single normal vector; shading for the entire polygon is constant across the surface of the polygon. With a small polygon count,...
Mark's user avatar
  • 1,592
13 votes

Changing image so it would look like through colorful glasses

(XYZ) can be the RGB colour you want to tint your scene by. For the above scene it can be a red colour (1.0, 0.0, 0.0) or something similar with a strong red component. Bear in mind that since you ...
Kostas Anagnostou's user avatar
11 votes
Accepted

Detect in-focus regions of an image

it is quite easy to measure the local max frequency in an image (at least as a low resolution mask, with some regularization). Several papers of the MIT graphics group have been around detecting and ...
Fabrice NEYRET's user avatar
11 votes

How can I concentrate points in areas of higher curvature?

The idea I would try to apply would be the following: I make the example for the curve, but it should be straightforward for the application for the surface. Let's say we have a curve $\gamma$ ...
user8469759's user avatar
11 votes
Accepted

How to modify Perlin (not simplex) noise to create continental like terrain generation

Perlin noise is just a base block, not very interesting by itself. You don't need to modify it, but to combine and filter it in interesting ways. Look at how to make fractal Brownian motion (fBm) with ...
Julien Guertault's user avatar
10 votes
Accepted

Seamless Textures

For these types of algorithms, you usually have to rely on multiple forms of texture synthesis. That doesn't mean you have to generate the whole texture from scratch. For example, you could regenerate ...
aces's user avatar
  • 1,353
9 votes
Accepted

Modelling Young's double slit experiment

It is in fact possible to augment a ray tracer to make it capable of simulating wave effects. The paper Rendering Wave Effects with Augmented Light Field describes one way to do it. In summary, they ...
Benedikt Bitterli's user avatar
9 votes

Is there some kind of Bresenham algorithm or equivalent for scanline rendering a rotated ellipse?

The classic book Computer Graphics: Principles and Practice (second edition) by Foley, van Dam, et al. describes such an algorithm in section 19.2. The explanation in the book seems to come from an ...
lhf's user avatar
  • 724
9 votes

How is anisotropic filtering typically implemented in modern GPUs?

The API requirements can be found in any of the specs or extensions. Here is one: https://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt All GPU vendors likely deviate from the spec ...
ap_'s user avatar
  • 2,194
9 votes
Accepted

What algorithm is used in the animation of the uTorrent 's "About window"?

As you discovered and mentioned in your self-answer, the pattern in the background appears to be a sum of sinusoidal gradients. However, the example linked to in your answer is more complicated than ...
trichoplax is on Codidact now's user avatar
9 votes

Why are oct trees so much more common than hash tables?

Lots of things here. "When reading papers". What papers? If the topic of the paper is about something other than the spatial partitioning structure, it could be fair to use whatever knowing that the ...
Angelo Pesce's user avatar
8 votes
Accepted

Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams

I think that there is a bit of confusion in terminology. My understanding is that only the initially colored points, before step 1, are called seeds. Maybe this helps clarify the algorithm as well. ...
StinkySkunk's user avatar
8 votes
Accepted

How do people come up with subdivision schemes?

The subdivision schemes are not arbitrary. Catmull-Clark, arguably the most used subdivision scheme, generalizes bicubic B-splines to meshes of arbitrary topology. Most, other subdivision schemes ...
Reynolds's user avatar
  • 1,089
7 votes
Accepted

scan line algorithm is too slow?

One red flag is the use of new several times within the loop. Memory allocation doesn't belong in a rasterizer! :) Certainly you should not need to allocate a ...
Nathan Reed's user avatar
  • 24.7k
7 votes

Algorithms to Remove High Frequency Noise from Path Tracing

There are, and I am looking forward to seeing the specifics of other answers, but one way to deal with this is to not have the noise (or as much noise) in the source data to begin with. The noise is ...
Alan Wolfe's user avatar
  • 7,721
7 votes
Accepted

How does the Painter's Algorithm handle transparency?

The common way to render transparent polygons in a rasterizer is by use of Alpha Blending, which basically combines the colour of the supposedly transparent pixel with the colour of the background at ...
Christian Rau's user avatar
7 votes
Accepted

What algorithm is used in this animation from Tatami Galaxy?

It looks like a voronoi diagram with a non-Euclidean distance metric. Probably not Manhattan L1 but something close related, but maybe Mahalanobis with some kind of restriction on seed point ...
David's user avatar
  • 301
6 votes

Perturbed image texture implementation from renderman language

As you've surmised, the transform() function transforms points from one co-ordinate space to another. (There are also ...
Dan Hulme's user avatar
  • 6,680
6 votes
Accepted

Optimal memory access when using lookup tables on GPU?

The best place to put a look up table for a GPU compute shader depends on the size of the lookup table, and the frequency/coherency of access. In your case (you mentioned 4kb), shared local memory ...
GroverManheim's user avatar
6 votes

Strategy for connecting 2 points without intersecting previously drawn segments of curves

The general problem is called graph drawing and is not an easy problem. The graphs that can be drawn on the plane without crossings are called planar, but not all graphs are planar: the typical graphs ...
lhf's user avatar
  • 724
6 votes

How to implement a realtime 2D light renderer with fog/colored light on the GPU?

If your wall geometry is vector graphics you can simply extrude the segment away from the light position. This means 2 triangles per draw call, all the extrusion offsets can can be handled in the ...
joojaa's user avatar
  • 8,367
6 votes
Accepted

Changing image so it would look like through colorful glasses

Extending Kostas Anagnostou's answer, a commonly used formula for desaturation is float value = 0.3 * InputR + 0.59 * InputG + 0.11 * InputB; This accomodates ...
David Kuri's user avatar
  • 2,293
6 votes

Why does monte carlo ray tracing perform better than distributed ray tracing?

In Distributed ray tracing, You stochastically sample many rays in directions which may or may not be preferred by the BRDF. Whereas, in Monte Carlo ray tracing or simply path tracing, you sample only ...
ranagraw's user avatar
  • 181
6 votes
Accepted

How should I fill a shape consisting of Bezier curves and straight lines?

If you are in a hurry to get your renderer working and you already have the filled polygonal routine functioning correctly, can I suggest an alternative, possibly easier approach? Though I'm not ...
Simon F's user avatar
  • 4,151

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