38 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 ...
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 ...
user avatar
  • 23.7k
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 ...
user avatar
  • 811
15 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 ...
user avatar
  • 1,100
14 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 ...
user avatar
  • 8,159
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,...
user avatar
  • 1,462
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 ...
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$ ...
user avatar
10 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 ...
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 ...
user avatar
  • 1,323
10 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 ...
user avatar
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 ...
user avatar
9 votes

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

All conics (including rotated ellipses) can be described by an implicit equation of the form H(x, y) = A x² + B xy + C y² + D x + E y + F = 0 The basic principle ...
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 ...
user avatar
  • 714
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 ...
user avatar
  • 1,944
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 ...
user avatar
  • 5,872
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 ...
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. ...
user avatar
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 ...
user avatar
  • 23.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 ...
user avatar
  • 7,331
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 ...
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 ...
user avatar
  • 181
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 ...
user avatar
  • 6,440
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 ...
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 ...
user avatar
  • 714
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 ...
user avatar
  • 8,159
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 ...
user avatar
  • 2,221
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 ...
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 ...
user avatar
  • 3,941
6 votes
Accepted

How to generate OSX Flurry screensaver

Looking at the video you provided, I would tend to think it's something along those lines: A particle emitter, to which all threads are attached, is moving around. I haven't really figured what its ...
user avatar

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