# All Questions

2,970 questions
Filter by
Sorted by
Tagged with
495 views

### How does UV unwrapping work?

I would like to project the triangles of my mesh to a 2D surface. I would like to minimalize the distorion, avoid breaking connected polygons if possible, and also maximalize the used space on the 2D ...
46 views

### Accelerating dose calculation for a radiation therapy planning system

During radiation therapy, appropriate radiation is fired from various positions around the patient. Radiation therapy planning determines the values of the radiation at various positions. This ...
38 views

### Closest sphere on segment

I am trying to get a segment closest point on a surface and display a circle (or sphere in this case) at that position. I actually get the correct position but I can't get a uniform sphere based on ...
46 views

### How does on the fly LOD work?

In the Unreal Engine 5 tech demo, they mention, that there is no need to manually generate LOD levels for each model, because the on the fly LOD system will generate polygons from the original mesh, ...
37 views

### Interpreting Image Processing Math Equation

I am reading "Image Processing and Analysis" by Chan and Shen, c 2005 SIAM. They introduce some notation I'm not 100% sure how to interpret: $$u_0(x)=u(x)+n(x), x=(x_1,x_2) \in \Omega$$ They ...
77 views

### Using Bresenham's circle algorithm (or another alternative algorithm) to draw an arc

I'm trying to create some graphic functions for a ZX Spectrum (Z80) machine in assembler. I already have the basics except for the arc. I need a fast algorithm to draw an arc, ideally one that uses ...
41 views

### How are digital painting canvas rendered?

Digital painting and raster graphics software like Krita and Photoshop have a canvas where you can paint with brushes. From a programming perspective, how is this canvas rendered? Can it be included ...
65 views

I am trying to get up to speed with the NV_mesh_shader extension from NVidia (on my RTX2080). Samples are rare, so I tried to come up with my own small sample. I am rendering a sphere (20 triangles) ...
46 views

### Force int array to compact memory

I have following structure which i use as an uniform buffer object. ...
49 views

### How to use PCA to reconstruct 3D Mesh？

Given a set of human body mesh {S_i}, for each S_i, the points are N*3, we can do PCA on that. We can use PCA to reduce the dimension of {S_i}, for example to k dimension. Let the main direction of ...
79 views

### Has anyone found an analytic solution to the product of spherical gaussians from Xu et al?

In section 4.2 of this paper: http://cseweb.ucsd.edu/~ravir/274/15/papers/a209-xu.pdf Xu et al approximate the product of 2 anisotropic Gaussian distributions. I want to know if someone has found not ...
47 views

### Converting Vertex and Index buffers to a File Format

I have many sets of vertex and index buffers that I’d like to render on to the screen. Ideally each model in different locations with-in world space. I’m actually doing a statistical study on spatial ...
51 views

### Why does processing dense geometry consume less power than simple geometry?

In The Road to PS5, Mark Cerny states: It's counter-intuitive, but processing dense geometry typically consumes less power than processing simple geometry. Why is this the case?
53 views

### Do you have to group and optimize your draw and shader calls in Vulkan?

This is in reference and contrast to the discipline (or more or less requirement) of opengl to group draws that use the same materials together, to minimize making many draw calls or many switch ...
24 views

### How to measure the reflectance of a material without using a Spectralon

I am trying to measure the reflectance% of a surface (it is made of Teflon and is very white). I am using a line spectrometer. I believe the piece can replace an expensive Spectralon for some ...
35 views

### Calculate the position and rotation needed to have a camera look at a certain region

I have a 2D region defined by 4 points in 3D space. I want to position my camera so that it looks at the region, with a settable variable determining which side it looks at, where looks at means that ...
33 views

### Per-object screen space uv issue

I am currently trying to sample a texture in screen space. This works well : ...
64 views

### How to keep an object constant in screen space?

If you open the modern Blender UI and select for example scaling, and then you use the scroll wheel to "zoom" (move the camera along the radial axis). You will notice that the size of the 3D widget ...
49 views

### glutSolid* source code

I am trying to build a dedocohedron in OpenGL, and I know that there is a built-in function in GLUT for the purpose. I was wondering if there is a way to either see the sourcecode for those functions, ...
71 views

### Math for adaptive supersampling for raytracing

How do I determine how many (jittered) rays to trace for a given pixel, as a function of the statistics of a small initial set of test rays? Also, what size should the initial set be? (it's currently ...
46 views

### Finite difference wave equation shown in paper is wrong?

I'm trying to produce wave surface animations, and I came across this paper: Fast_Water_Animation_Using_the_Wave_Equation_with_Damping. In the paper they go to provide the following equation: At ...
41 views

### 2D metaballs with marching squares and linear interpolation

I struggle do understand how linear interpolation works in the marching square rendering algorithm context. I created simple example in GDScript (Godot) of random floating metaballs to demonstrate ...
344 views

### What is a vertex normal used for?

I'm new to the graphics area, and when it comes to the light part, the concept of vertex normals confuses me a lot. First, I cannot imagine how a vertex could have a normal, and second, when ...
46 views

### What modern C++ Unit Testing Framework do you use for highly parallel image, 3D and higher dimensional matrix processing workloads? [closed]

Most of the existing open-source libraries such as OpenCV, Tensorflow, and Pytorch use Google Test. I would like to know about strong alternative testing frameworks that thrive under a similar ...
62 views

### BC7 texture with alpha has the same size as BC7 without alpha

So i've a made a texture. I've saved the RGB one with BC7 compression, then added alpha channel[specular map] with varying levels of grayscale, and saved the file again as RGBA with BC7 compression. ...
23 views

### How to transform x-y-z red-green-blue arrows and draw them on 2D screen?

I'm making a raytracer and want to print debug arrows Blender example: Old version of 3d max: How do I do the same having camera forward, up and right vector? I think I need some kind of matrix ...
52 views

### Implementing monte carlo path traced refractions problem

I am writing a forward monte carlo path tracer with the added feature of specular refractions for transparent materials, I have managed to come this far but something is not quite right and I am ...
79 views

### Best practice for managing many shaders and merging multiple shaders into one?

I have managed to greatly minimize draw calls on my recent project, but as I'm adding more shaders, I see that I have to switch more times and that is causing a lot of draw calls. What is the best ...
95 views

### Why does the red color channel lose the most details during jpeg compression

I have an e-commerce website dealing with flowers and cakes. We get our photoshoot done inhouse and also the post-shoot editing of images. While we upload them on the website all images go through the ...
36 views

73 views

### How do I make sure my cosine-weighted sampling works fine?

I'm working on a pathtracer and while it's working mostly fine, I'm getting different outputs with cosine-weighted sampling and uniform sampling : Uniform sampling is on the left, cosine-weighted is ...
39 views

### Normalization technique to increase spread of data in rgb space

I am visualizing a dataset. My technique is to encode the data into a rgb image with the channel range [0, 255]. The data clusters in a narrow range relative to [0, 255], however, so I'm not getting ...
124 views

### volume raymarching - aligning sample coords with the 3d texture

I'm implementing a volume raymarcher and the unlit basic version seems to be working fine. This article helped a ton grokking the view-to-volume-space transform: http://www.lebarba.com However, it ...
93 views

### Problem on understanding gamma correction

I am struggling understanding gamma encoding/decoding. So the colors I see and the values I get from a color picker application(like MS Paint) are already in sRGB space(correct?). Assume the color ...
55 views

### With vsync enabled where does the wait happen in OpenGL?

When having vsync enabled I'm imagining that OpenGL has an explicit wait function to try and keep the frame rate constant. If so where is this function implemented exactly? After running some tests <...
53 views

### Consistent Video Depth Estimation from Monocular Lens to approximate LiDAR?

If the iPhone had LiDAR sensors, it would be possible to generate a 3D point cloud that you could theoretically use to furnish a 3D AR reconstruction of your surroundings. E.g. you could create an AR ...
56 views

### What's more optimal - sampling one channel at a time or all channels at once?

I'm going through and optimizing some of my glsl code for a project, and have come across a scenario several times that I am not sure how best to optimize. In summary - Is it faster to sample a ...
113 views

### Shader that transforms a mercator projection to equirectangular?

I am new in the OpenGL - GLSL and trying to make a shader that taking a mercator projection texture as a source and converting it to an equirectangular projection texture. Sample input: (1024x1024) ...
18 views

### How Quantum works exactly in MagickCore?

It's been long I have been trying but I guess I will give up now, I am not able to understand some stuffs + documentations seem wrong. For example, In Magick++, the QuantumRange equations they ...
33 views

### C++ code to subdivide skinny 3D triangles into more regular triangles

I am currently in the search for a C++ function that takes a triangle and some input control data (e.g. max area) and returns a list of triangles that are as equilateral as possible. I know there are ...
65 views

### Help me understand the voronoi shader

I am trying to understand the voronoi shader implemented in the Book of Shaders in the Tiling and iteration section: https://thebookofshaders.com/12/ Specifically how do these lines calculate the ...
15 views

### Custom Create Maps in OpenGL

I am trying to create some procedurally created terrains for which i need to create noise maps. How do I create a texture of noise map in OpenGL and then pass that in my vertex shader as a heightMap? ...
46 views

### How to properly combine diffuse and rough specular BRDFs in a path tracer

Looking around here on various sources (including related questions on this site), if my understanding is correct, when implementing a path tracer with a material which has both a diffuse term and a ...
68 views

### Creating glsl library

I have different functions for example normalmapping which I use all the time... Now I thought about making a small glsl library. My problem: I don't want to have all functions within the same "...
33 views

### How to find the BRDF of a rough specular surface

So I know that the BRDF for a diffuse material is `albedo/π', and I know that the BRDF for a perfectly specular surface is only non-zero on the reflected direction. How would I find the BRDF for a ...