All Questions

4
votes
0answers
498 views

How does function for mouse in glutMouseFunc(mouse) work in openGL? [closed]

I have been trying to implement the following functionality in my code: There are 2 flags editMode and deleteMode, both set to zero. with the help of keys function in glutKeyBoardFunc(keys) the user ...
4
votes
0answers
170 views

Indexing gl_TessLevelOuter[] with gl_InvocationID on a tessellation control shader

I'm using hardware tessellation to render a terrain mesh with variable LOD. I have this snippet on my tessellation control shader: ...
15
votes
3answers
2k views

What's the current state-of-the-art algorithm for ray-tracing height-fields?

There have been lots of papers over the years on different techniques for drawing height-field terrain in a ray-tracer. Some algorithms ray-march the grid directly (or via a quadtree); others ...
11
votes
1answer
257 views

Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?

I am trying to understand why meshes that are smoothed in 3D studio (Modifiers/Smoother) end up having the same amount of vertices/faces before or after that process, as well as the exact same ...
15
votes
2answers
9k views

What is the simplest way to compute principal curvature for a mesh triangle?

I have a mesh and in the region around each triangle, I want to compute an estimate of the principal curvature directions. I have never done this sort of thing before and Wikipedia does not help a lot....
4
votes
1answer
146 views

Javascript color extraction library

I have a small project that needs to extract the perceptually-salient colors of an image, in javascript. There are a few libraries out there (color-thief.js, vibrant.js). The trouble is, I'm finding ...
1
vote
1answer
133 views

What are forms of affine transformations?

Please help me tackle the below question: Explain THREE forms of affine transformations using relevant examples for each case. The answers I want to see are scaling, rotation and reflection.
3
votes
1answer
2k views

How to crop with edge-detection using imagemagick [closed]

Let's say I have an image of an object against a white background. I want to crop so that the image fills the available space. This takes 10px off: ...
7
votes
1answer
551 views

DirectX12 CbvHeap

With directX12 they introduced heap descriptors. A way for us to describe the table for resources we wanted to send to the shaders. I'm admittedly very new at computer graphics and only tinkered a bit ...
8
votes
1answer
218 views

Perturbed image texture implementation from renderman language

I am trying to implement (in C#) an image perturbation algorithm presented in the book "Texturing and modeling - K. Perlin et al" (page 91 if anyone has it), which distorts an image. The following ...
4
votes
2answers
381 views

Blit and scroll

Could anyone please explain to me how drawing works with respect to scrolling? Suppose there is a window, which has an area where one can draw to (a "canvas"). Are there two copies of this canvas? ...
4
votes
1answer
224 views

Earth curvature and horizon in modeling large scenes

If I want to model a large environment, how can I solve the problem of earth curvature and horizon? I use an environment map for the sky, but for the ground what can I do? Do I have to model the ...
4
votes
1answer
2k views

DirectX 12 Constant Buffer Binding

I can't really seem to figure out how to bind two constant buffers to my shaders. I have them described like so. One in slot b0 and the other in slot b1. ...
4
votes
1answer
148 views

Does light particle loses energy when it hits something?

I have some material which I want to represent as a collection of spheres (atoms) and a particle of light (photon). I'm firing this particle and checking for the collision against atoms. What should ...
7
votes
1answer
952 views

Are draw calls executed in parallel or sequentially or both?

This a follow up for a question I answered on GameDev SE. The question was simply Is glDrawArraysInstanced in OpenGL parallel when drawing those instances? My answer was in the lines of "the GPU ...
9
votes
0answers
401 views

How correct is rendering in XYZ / linear RGB space?

I have a spectral power distribution (SPD, 5 nm steps) for all light sources in the scene and SPDs for the reflectance of all surfaces under any light / viewer angle in question. I'm going to ...
4
votes
2answers
98 views

Is there any open code to get information about COLLADA or OBJ files? [closed]

I need a source code that takes as input a COLLADA file and/or an OBJ file, and gives as output basic information about the file, such as file size, model dimension, volume and if possible texture ...
8
votes
1answer
344 views

How does Smith multiple scattering interact with diffuse subsurface scattering?

The Multiple Scattering Microfacet BSDFs with the Smith Model paper describes a statistical model for replacing the masking-shadowing functions in microfacet BSDFs (which account for paths with more ...
13
votes
4answers
659 views

Projected grid water horizon detail

I'm trying to implement an ocean scene with C++ and DirectX11. Currently I have a projected grid, Gerstner waves and a basic shading. My problem is that when I aim my camera horizontally, so I can see ...
1
vote
1answer
65 views

How to design something like this? [closed]

I am very eager to know what technology might been used to implement this piece of wonder: Any idea? I think, it's ray tracing. What do you think?
3
votes
1answer
158 views

First quad being re-used?

I had posted about this issue in a previous question, however, I thought instancing was causing it, whereas even using normal uniforms or a SSBO (which's what I'm using right now) causes it, which ...
1
vote
0answers
61 views

How is smooth animation accomplished? [closed]

How are objects moved smoothly from point A to point B given matrix transformations that describe next position?
4
votes
0answers
57 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 ...
10
votes
2answers
207 views

Why for perfect reflections a surface must have G2 continuity?

Why for perfect reflections a surface must have G2 continuity (class A surface)? I would like a mathematical answer.
11
votes
1answer
769 views

What is the difference between importance sampling and mutiple importance sampling?

I can't understand math equations. I'm a graphic designer. What is "importance sampling"? What is "multiple importance sampling"? Could you explain easily, using illustrations and no math equations? ...
5
votes
1answer
1k views

How to render the wireframe of a cube without the diagonals on the faces?

I'm developing with OpenGL 4.1 and have good understanding of the modern pipeline. I was thinking on doing it with GL_LINE_LOOP for each face, but I think this will require several draw calls which ...
4
votes
0answers
290 views

Incorrect instanced rendering

Previously, to render a bunch of quads, I was simply using a few uniforms (one for a model matrix and another for the texture layer ID). However, I'd rather not have to loop through each quad and set ...
8
votes
1answer
678 views

Optimal memory access when using lookup tables on GPU?

I'm exploring isosurface algorithms on GPU for a bachelor's project (specifically concentrating on just binary in/out voxel data rather than real-valued fields). So I have a CPU implementation of good ...
2
votes
1answer
123 views

Is there some book about how to design a 3D math lib? [closed]

3D math covers vector algebra and matrix algebra, which are easily calculated on paper, but not so easy when coding them effectively. I only leant some basic algorithms on matrix in my Data Structure ...
4
votes
1answer
339 views

glMultiDrawArraysIndirect does not work when specifying an offset

I'm trying to use glMultiDrawArraysIndirect to render a batch of object. In my example I have a cube and a sphere (in this order) in a ...
8
votes
1answer
2k views

Screen capture of game video

I'd like to "hook" into a running game, say Mario Bros, and capture each frame rendered... saving that frame to an image file. A good example of something similar is FRAPS. --Note: I don't want to ...
4
votes
1answer
564 views

Dx12 Vertex Buffer incorrect

I'm playing around with directX 12 and I'm having some problems loading geometry in. I have a std::vector vertices definition and I do exactly what the dx12 template does with it. ...
3
votes
1answer
170 views

Does this type of memory-mapping for a display exist?

Most information about memory mapped displays on the net are about those in which there is essentially a location in main memory for each pixel on the display. A hypothetical 1024 x 512 display would ...
10
votes
1answer
903 views

Pipeline to create Voronoi Meshes

I would like to implement a Maya plugin (this question is independent from Maya) to create 3D Voronoi patterns, Something like I just know that I have to start from point sampling (I implemented the ...
4
votes
1answer
968 views

How to convert a thread ID into Screen Space Coord in an OpenGL Compute Shader?

I've written an implementation of the sphere tracing algorithm in OpenGL 4+. As an experiment/toy project, I'm re-implementing it using the OpenGL 4.3 compute shader, but I'm having trouble with the ...
4
votes
2answers
106 views

Storing shadow data

Given a 3D space and a light source, I use ray casting to determine the shadows generated in the scene. If I'm to store the shadow data (boundary of the shadow, object which cast the shadow, etc.) ...
6
votes
1answer
190 views

Does prerendering actually help performance?

In PC game development, after loading models, textures, shaders, etc in a loading screen, some games will render the models once to an off screen target to make sure the driver and gpu have done all ...
7
votes
1answer
1k views

Energy Conservation for Blinn-Phong BRDF

I am trying to sample from the Blinn-Phong BRDF. For testing, I use a spherical light source (Lambertian emission) sitting on a specular plane. Here's a reference image using energy-conserving Phong ...
3
votes
1answer
169 views

What is the basic difference between Radar Screen, CRT and Oscilloscope displays? [closed]

What is the basic difference between Radar Screen, PC CRT Monitor, and, Oscilloscope displays? All of them use CRT. So, what is the difference?
8
votes
2answers
223 views

What does it mean by a Constraint-based Graphics System?

Scratchpad was a constraint-based graphics system. What does it mean by a Constraint-based Graphics System?
1
vote
1answer
39 views

Scaling models for 3D print [closed]

So I need to print out this model, however with default sizes, one of the pieces is too large for my printer (M3D). I will need to scale it down.. the question is, do I need to scale the rest of the ...
13
votes
1answer
91 views

Thorough, accessible material about Fourier basis functions and Spherical Harmonics?

Spherical harmonics appear in several computer graphics techniques. I feel that in order to be a better computer graphics developer, I need to have a deep understanding of what they are and how they ...
5
votes
1answer
226 views

Can't get output from a GLSL code

I'm trying to learn GLSL, I'm following this tutorial. I've done everything according to the tutorials but I can't get any output from my code. As you see I'm checking for both compile errors and ...
12
votes
2answers
286 views

Ray Transformation to Object Space for Motion Blur

My raytracer supports a wide variety of objects. To intersect them, I use the standard technique of transforming rays into object-space. This works fantastically until I add motion blur. I model ...
7
votes
1answer
772 views

OpenGL Compute Shader generating triangle indices: How to get correct element count for glDrawElementsIndirect?

I have a sequence of compute shaders that generates an indexed mesh.The last one of those writes the generated indices like this: ...
4
votes
1answer
105 views

Parametric line intersection test

I have the following question in an exam review and I am looking for feedback about how to approach the solution. Any advice will be highly appreciated. "Using a parametric line intersection test, ...
7
votes
3answers
8k views

How to combine rotation in 2 axis into one matrix

I already know about the matrices I have to use in order to perform rotations. If I have to rotate in z-axis and then in x-axis, I would do it in 2 steps. My question is, is it possible to combine ...
3
votes
3answers
236 views

Transform a point into another point

I have the following problem: Give a matrix that will transform the point $(x,y,z)$ into the point $(\frac{2}{x+y}, \frac{5y + z}{2x + 2y}, 3)$. I have been reading my book to find a way to solve it ...
7
votes
1answer
2k views

Detect in-focus regions of an image

Is there any strategy to detect the region of an image that is sharp and in-focus, in order to separate the out-of-focus background? I've tried using edge detection methods but without any success. ...
7
votes
2answers
343 views

Moires patterns despite using mipmaps

I am working on Silverlight app. I am trying to render floor covered with tiles. Although I am using mip maps I am still getting awful Moire patterns, when trying to render big area. What I am doing ...

15 30 50 per page