Reynolds
  • Member for 4 years, 2 months
  • Last seen this week
  • The Netherlands
glsl passing data array from vertex to tessellation control shader
1 votes

Change the output of the vertex shader to out vec3[2] dataArray; and the input to the tessellation control shader as in vec3[2] dataArray[]; That should work. Alternatively you could also define the ...

View answer
Understanding how gradient noise generation works
0 votes

The noise is defined using a rectangular regular lattice. This lattice contains cells in which the noise is evaluated using the four corner points of this cell. At every point of the lattice a pseudo-...

View answer
HalfEdge: How to get list of all faces from one face
1 votes

Observe that you can construct another graph by connecting the centroids of faces with centroids of adjacent faces. This is known as the dual. The edges of the graph between the centroids can be ...

View answer
What's the word for "how noticeable a particular part or pixel of an image is to a human"?
Accepted answer
4 votes

What you are looking for is saliency and in the context of computer vision/image processing saliency maps provide a measure of this on a per-pixel basis.

View answer
Catmull–Clark issue with plane corners
Accepted answer
1 votes

The procedure only works for closed meshes or closed parts of a mesh with boundaries. For vertices $V_{i}$ on the boundary of an mesh you have to use the following rules: $$V_i = \frac{V_{i-1} + 6 V_{...

View answer
Half-Edge Data Structure with holes
1 votes

The cube-like mesh shown in the images is a non-manifold mesh. Officially half edge data structures do not support such a topology. However, this case can be supported by continuing the boundary half ...

View answer
results of Curved PN-Triangles algorithm has visible edges
Accepted answer
2 votes

As mentioned in the paper PN-triangles are only $C^0$ smooth with respect to adjacent triangles (although they are $G^1$ at vertices). This means that a PN triangle mesh is continuous in position, but ...

View answer
How to do linear interpolation?
Accepted answer
0 votes

Since this is linear interpolation it boils down to solving a linear equation $y = a + b t$ You can substitute the following $y = y_s$, $a = y_1$(intercept) and $b = y_2 - y_1$ (slope) to get the ...

View answer
How to take the derivative of a Bézier curve?
3 votes

A simple example of taking a the derivative of a B'ezier curve can be shown using a cubic curve. $$C_3(u) = \sum_{i=0}^3 B_{3,i}(u) P_i,$$ where $u \in [0,1]$ and $B_{n,i} = {n \choose i} u^i (1-u)^{n-...

View answer
Determining the function of a radial gradient fill with midpoint
Accepted answer
2 votes

It seems to be just a scalar Bezier function to me, where the second coefficient is determined by $a$ $$(1-x)^2 + a 2 (1-x) x,$$ here $a \in [0, 1]$ is a normalized percentage. This gets you pretty ...

View answer
Subdivision scheme where the faces and edges have weights (not necessarily scalar weights)
Accepted answer
3 votes

What you are looking for is semi-sharp creases. You can find it in section 3 of this paper: https://graphics.pixar.com/library/Geri/paper.pdf Basically, each edge is given a sharpness value $s$. This ...

View answer
Why is the valence of regular vertices 6?
Accepted answer
4 votes

If require that all faces have the same number of sides $s$ and require that all vertices also have a certain valency $t$. We see that the following relation between edges, and faces hold for a ...

View answer
Let GPU write to itself
Accepted answer
2 votes

What you are talking about is transform feedback. With transform feedback you can capture primitives (vertices, triangles, lines) in a buffer such they can be used in subsequent draw calls. You don't ...

View answer
When unsetting a VAO, should you also unbind the associated VBOs?
Accepted answer
2 votes

No, you do not need to unbind the VBO's. VBO's are only added to the state of the VAO when that VAO is bound. So any previously bound VBO's will not alter the state of the VAO that you are going to ...

View answer
How do people come up with subdivision schemes?
Accepted answer
6 votes

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 ...

View answer
How to compute normal in quartic Walton-Meek's Gregory patch in tessellation shader?
4 votes

Computing exact derivatives of Gregory patches is hard due to the rational blending that occurs for the inner control points. Many people thus opt for an easier solution where the rational blending ...

View answer
Creating a Smooth 3D Mesh from a 2D Outline
1 votes

You could try the FiberMesh technique. Fibermesh takes 3D input curves and interprets them as the contours of the surface. It then creates a smooth surface by using an optimization technique. Here you ...

View answer
How to create 2D (directional) noise?
Accepted answer
3 votes

Why don't you just use Perlin noise twice on the same grid, or volume? Each with slightly different parameters (a phase shift, or different pseudo-random vectors). In this case both component of your ...

View answer
If you can use subdivision surfaces for 2D curves
Accepted answer
4 votes

Subdivision can be used for curves in 2D just as easily as for surfaces in 3D. Usually the subdivision algorithms applied to 2D are called subdivision curves. Subdivision curves do not suffer from the ...

View answer
Efficiently drawing multiple instances of 3D objects
Accepted answer
3 votes

What you are looking for here is instanced rendering. Instanced rendering coupled with attribute divisors is a very powerful tool to render multiple copies of the same object using only one drawing ...

View answer
Problems with Subdivision Surfaces
2 votes

Both T-splines and subdivision surfaces are capable of handling an arbitrary topology input mesh, whereas NURBS can only handle meshes with regular topology. Complex NURBS objects are therefore made ...

View answer
In texture mapping, should we set texture coordinate to every vertex or can I skip vertices in between?
Accepted answer
1 votes

Typically, texture coordinates are interpolated from the vertices of a triangle during rendering. This can be seen in two ways. evaluating your texture at vertices and the interpolating the result or ...

View answer
What noises can be sliced?
Accepted answer
2 votes

Worley noise, also known as cellular noise, has the same property. It just as easily implemented as Perlin noise and easily extends to higher dimensions. Thus the slicing of 4D Worley noise will ...

View answer
What is wrong with my glDrawElement code
Accepted answer
1 votes

glDrawElements specifies the second argument to be the number of elements to be taken from the buffer of indices, not the number of vertices. The correct number would be the number of triangles times ...

View answer
Can I get numeric data from a color map?
1 votes

I don't know of any software that could do this for you. However, it should be possible to reverse engineer the colour map to create a kind of look-up table structure. First, take a one pixel wide ...

View answer
How to obtain generalized barycentric coordinates for n-sided polygon?
Accepted answer
3 votes

Quadrilateral basis functions can be calculated using an outer product of the basis of two linear functions (1-r, r) and (1-s, s). The same thing does not apply for arbitrary $n$-sided domains. For ...

View answer
OpenGL - drawing icosahedrons and cylinders and combining them
1 votes

You could calculate the midpoints of the segments between the vertices (atoms) of the icosahedron. These are the positions of the cylinders. You would then need to determine the orientation and scale ...

View answer
Why does opengl perform clipping in clip coordinates?
1 votes

Clipping could be done in normalised device coordinates as all primitives with z-coordinates outside -1 to 1 are outside the clipping planes. However, there is no reason not to do it in clip ...

View answer
Parametrize set of unordered points in 3d space
2 votes

You could try natural neighbour interpolation or Sibson coordinates for this. These coordinates are based on a Voronoi tessellation of the points. The coordinates have been extended to an approach ...

View answer