Skip to main content

Questions tagged [interpolation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16 votes
1 answer
5k views

How are mipmap levels computed in Metal?

My question is specifically in regards to Metal, since I don't know if the answer would change for another API. What I believe I understand so far is this: A mipmapped texture has precomputed "...
lcmylin's user avatar
  • 413
12 votes
1 answer
765 views

Is a cubic Lagrange interpolation tensor product the same as bicubic interpolation?

I just implemented some interpolated texture sampling by sampling the 4x4 nearest pixels then doing Lagrange interpolation across the x axis to get four values to use Lagrange interpolation on across ...
Alan Wolfe's user avatar
  • 7,801
9 votes
3 answers
5k views

What is bilateral upsampling?

I've worked with various interpolation algorithms including linear, cubic (and bilinear and bicubic), other bezier (and nurbs, etc) based interpolations, lagrange interpolation and some others, but I ...
Alan Wolfe's user avatar
  • 7,801
8 votes
2 answers
7k views

How do I use barycentric coordinates to interpolate vertex normal?

Given a triangle and a point inside the triangle in Cartesian coordinate system, I compute the Barycentric coordinate of the point like this: ...
Bla...'s user avatar
  • 481
6 votes
1 answer
554 views

Image rescaling algorithm

Suppose I have to use bilinear interpolation to rescale image. I more or less understand how enlargement works in case of integer scale factor. But what to do with non-integer scale and especially ...
justanothercoder's user avatar
6 votes
1 answer
919 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
lelgetrekt's user avatar
5 votes
1 answer
3k views

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. ...
J.Doe's user avatar
  • 1,445
5 votes
1 answer
2k views

Is there a way to interpolate color across the line with only integer calculation ?`

Here is my function that does interpolation ...
user avatar
5 votes
1 answer
2k views

Interpolating vectors on a grid

If you have values on a grid and you want to find the value of a point within one of the cells, you can use techniques like bilinear or bicubic interpolation to get the data at that point. What ...
Alan Wolfe's user avatar
  • 7,801
5 votes
1 answer
4k views

Normal Interpolation for Phong shading

As the title says I have been trying to understand the normal interpolation for the Phong shading/lighting model. I am unsure of the equation to calculate the normal but I have come across this ...
Will D's user avatar
  • 115
5 votes
1 answer
254 views

How to rasterize a line when the background color is not always white?

I've to rasterize a line taking into account not only the background color of the screen, which is white, but also the color of other objects in the scene. In my case, I've just another object, a ...
user avatar
5 votes
1 answer
2k views

Which interpolation algorithm does MS Paint on Windows 7 use for image rescaling?

I was about to scale this image down to 64x64 pixels: The result I got on MS Paint on Windows 7 was surprisingly good (i.e. crisp edges): , whereas scaling it with GIMP resulted in for cubic and ...
dialer's user avatar
  • 151
4 votes
1 answer
2k views

Perspective correct interpolation z-buffer

While I was deriving expressions for perspective-correct linear interpolation on triangles, I reached the conclusion that the interpolation may be kept linear only if view-space $Z$ is available. ...
lightxbulb's user avatar
  • 2,226
4 votes
1 answer
567 views

How can you interpolate over an array of say 5 colors?

I have an array of color values. I have an interpolating parameter, t, which varies from 0 to ...
lokstok's user avatar
  • 43
4 votes
2 answers
1k views

Linear interpolation on Plane (Marching Cubes)

Let's assume I have the following cube. Let's assume the isovalue = 0. I would like to draw the resulting triangles of the isosurface. I know that first I define which values are inside or outside ...
john john's user avatar
  • 423
4 votes
1 answer
344 views

How to interpolate vertices when clipping?

When we clip in homogeneous clip space, we have to generate a new vertex located at the intersection between the edge and the clip plane. We thus have to interpolate the $(x , y, z , w)$ position of ...
Voko's user avatar
  • 269
4 votes
1 answer
1k views

Screen coordinates, barycentric coordinates and global coordinateas

To continue with this my other question, here's the problem. So, I've a slide, which I'm trying to understand. Here are my questions. What are the barycentric coordinates of? From my previous ...
user avatar
4 votes
0 answers
69 views

MRF and Textures

I am pursuing my research in Texture Interpolation. After digging deep into it, I'm stuck at a point. It is proven that textures can be modeled as Markov Random Fields and that each texture can be ...
user3159395's user avatar
3 votes
1 answer
536 views

Determining Rational Quadratic Bezier Curve Weights for Circle

I am trying to create a spherical interpolation with 3 points. I'm currently using Quadratic Bezier Interpolation but have been told I should use Rational Quadratic Bezier Curve in order to get a ...
Dr. Pontchartrain's user avatar
3 votes
1 answer
504 views

How to use Monotone cubic interpolation in 3D?

I wanted to use Monotone cubic interpolation, but the site only provide explanation for 2D case. How can I extend it to 3D?
Bla...'s user avatar
  • 481
3 votes
3 answers
109 views

Does the blending matrix change between calculating various curve segments in a uniform cubic B-splines approximation?

I would like to ask about uniform (periodic) cubic B-splines (approximation, no interpolation). $$B=1/6\begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&0&3&0\\1&4&1&...
Nick's user avatar
  • 321
3 votes
1 answer
550 views

Correct way to interpolate 1/z?

I have doubts on 1/z depth buffer interpolation. According to this website, the correct 1/z interpolation formula is $\dfrac{1}{P.z} = \dfrac{1}{V0.z} * \lambda_0 + \dfrac{1}{V1.z} * \lambda_1 + \...
Jimmy Yang's user avatar
3 votes
1 answer
800 views

Smooth triangular mesh interpolation

I am looking for an algorithm which would smoothly interpolate triangles of a mesh (computed by Delaunay triangulation) where each vertex has some value (elevation in my case). I need it for PDAL ...
Martin Ždila's user avatar
3 votes
1 answer
216 views

Interpolate vertex attributes with $z$ AFTER homogeneous divide

Usually, if we want to interpolate some vertex attributes, say $A_1$, $A_2$ and $A_3$, we have to first divide them by their corresponding $z$ in view space, then we interpolate them using barycentric ...
Voko's user avatar
  • 269
3 votes
1 answer
609 views

Creating a gently moving 2D fog effect

I am trying to create a fog-like effect, similar to that found using perlin noise. I know where I can find information about that effect, but it's harder for me to tell if it's an efficient route for ...
aceslowman's user avatar
3 votes
2 answers
583 views

Fake cubic Hermite spline interpolation with smoothstep

When scaling an image with Bicubic Interpolation, the Cubic Hermite spline interpolation is used. smoothstep is one of the four basis/blend functions of this kind ...
legends2k's user avatar
  • 131
3 votes
1 answer
995 views

Interpolation in Graphics Pipeline

I am trying to program my own version of WEBGL graphics pipeline in python, however, I am confused as to where the color interpolation takes place in the pipeline. According to my research, it happens ...
Anisa's user avatar
  • 41
3 votes
1 answer
383 views

Find closest point on surface interpolated by 2d matrix of points

I have rectangular matrix of 3d points sampled from a parametric surface. In my program this matrix provides base points for bilinear interpolation of surface (In any (u,v) point it returns 3d point ...
Ibraim Ganiev's user avatar
3 votes
1 answer
709 views

How to deal with light leaks?

I'm struggling with light leaking through meshes (especially thin ones) due to interpolation between probes located on the opposite sides of those. First approach I took was mapping all static ...
Pavlo Muratov's user avatar
3 votes
0 answers
120 views

Irradiance field approximation with black probes

I'm posting here after some time searching the Internet and reading presentations and papers, to find out the best options to solve the problem I have. I'm implementing irradiance field with ...
Alex's user avatar
  • 31
3 votes
0 answers
75 views

Why my cosine interpolation of a cube's face doesn't work?

NB please : executable use cases are available at the end of this question. I begin this question by showing you the problems of my program, then I explain how the latter works, and finally I end up ...
JarsOfJam-Scheduler's user avatar
3 votes
0 answers
281 views

Sinc interpolation and Ideal reconstruction example

I am trying to apply sinc interpolation on this data set. The patches in the left image is a snapshot of AutoCAD 3d faces. Lux values are calculated for centre of each patch that are in 0.3m x 0.3m ...
ali's user avatar
  • 740
2 votes
1 answer
609 views

How to obtain generalized barycentric coordinates for n-sided polygon?

Quadrilateral linear basis functions(generalized barycentric coordinates) are defined as: What are the steps to calculate the above functions? Is it possible to obtain basis functions for a 5 sided ...
ali's user avatar
  • 740
2 votes
1 answer
147 views

triangle barycentric coordinates interpolate edge dependent

Barycentric coordinates of a triangle are very useful for interpolating texture coordinates, for example. Each corner contains the texture coordinate and multiplies this coordinate by the barycentric ...
Thomas's user avatar
  • 1,285
2 votes
1 answer
318 views

Deriving formula for perspective correct interpolation

I am trying to derive the formula for perspective correct texture interpolation on my own while implementing my own software rasterizer (projecting an arbitrarily rotated triangle in camera space on ...
Sam's user avatar
  • 164
2 votes
1 answer
164 views

Interpolating HSV color with black

I'm interpolating RGB values by transforming them into HSV space and then back into RGB. I have trouble figuring out how to achieve ...
M.K.'s user avatar
  • 163
2 votes
1 answer
437 views

computing derivatives of sampled data

I am trying to calculate the derivatives of a sampled data set by following an example in this book. The data is a set of 2d quads(green area in below) and their vertices(4 each). The data is in the ...
ali's user avatar
  • 740
2 votes
2 answers
681 views

ScratchAPixel : Understanding how to use Perlin's permutations hash table

Consider this course : https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/procedural-patterns-noise-part-1/creating-simple-2D-noise . In sub-part Introducing the Concept of ...
JarsOfJam-Scheduler's user avatar
2 votes
1 answer
234 views

What is a common approach to smooth structures in textures?

I have a screen-aligned texture resulting from multiple rendering passes. It looks about this: I want the edges to appear smoother than they do now (but still keep their characteristic shape). When ...
Muad's user avatar
  • 165
2 votes
0 answers
49 views

Float point placement with anti aliasing

I have an image of size H,W, and I would like to draw a point on this image at x,...
Mercury's user avatar
  • 121
2 votes
0 answers
61 views

Vertex positions from particle position

I have a question about Nvidia Flex or any particle based simulation in general: The particles are created by sampling the mesh, which can result in fewer particles than there are vertices in the ...
Jojo's user avatar
  • 121
2 votes
0 answers
285 views

Using GPU instead of CPU in Scala

I wrote a program that displays points expressed in 3D in a 2D canvas, using perspective projection. The aim is to display a cube. Each face of the cube is drawn by linearly interpolating the points ...
JarsOfJam-Scheduler's user avatar
2 votes
0 answers
146 views

Interpolating normals during animation

I'm doing linear tweening of a cyllinder to a cone of equal radius and height in OpenGL. I know parametric equations of both of them, so I derived vertex normals accordingly. Now, I know, that proper ...
Drinkwater's user avatar
2 votes
0 answers
40 views

Make 3d objects from 3 projections in 3D Studio Max

In the early 3D Studio days before it got Max in its name it was possible to make a 3d object by defining its projections in xy, xz and yz plane. 3ds would then interpolate a 3d object from the ...
Igor Popov's user avatar
1 vote
1 answer
84 views

What causes blobby edges with alpha testing?

I'm trying to understand what causes the blobby edges when using alpha testing to create transparency with 1-bit alpha channels. The edges appear pixelated, but with rounded corners and diagonal lines....
TomKern's user avatar
  • 251
1 vote
2 answers
843 views

Geometric interpretation of this bilinear interpolation equation?

Bilinear interpolation can be achieved by interpolating two values across the x axis, and then interpolating between the results across the y axis, like in the image below (from https://blog.demofox....
Alan Wolfe's user avatar
  • 7,801
1 vote
1 answer
1k views

Perlin Noise with Smooth function vs Lerp

I tried implementing Perlin Noise using the Wikipedia as my main resource. From what I can tell my implementation of the ...
Archmede's user avatar
  • 491
1 vote
1 answer
2k views

Texturing an "infinite" plane

I am rendering an infinite plane as described in the following answers: https://stackoverflow.com/questions/12965161/rendering-infinitely-large-plane https://stackoverflow.com/questions/7380250/how-...
softbodies's user avatar
1 vote
1 answer
1k views

Bilinear Interpolation

I am trying to implement bilinear interpolation as described in the paper Spatial Tranformer Networks by Jaderberg et. al (see link to paper). They describe bilinear interpolation in Equation 5 as: $$...
user2835098's user avatar
1 vote
1 answer
160 views

Interpolating poisson disk samples in real time

If I have a regular sampling pattern there typically exist many reasonably fast ways to interpolate the results of the sampling procedure in between the sample locations. For example bilinear or ...
TravisG's user avatar
  • 171