# All Questions

2,089 questions
31 views

### Hodge Decomposition in fluid simulations

I have just started implementing a fluid simulator based on the navier stokes equation. I am following Jos Stam's paper to do so. In this paper, it says that the velocity field must be mass conserving....
35 views

### What is shader warming, and why does Direct3D seem to avoid it?

I am involved in a project that had been modified to run on Apple and Linux computers, when it was originally Windows only. Specifically, Metal and Vulkan renderers have been written alongside the ...
30 views

### Surface fairing, implementation detail

I'm reading through Polygon Mesh Processing, section 4.3 (Surface fairing). The reference I mentioned defined defines "Surface Fairing" as The goal of surface fairing is to compute shapes that are ...
44 views

### Computing perspective directly

Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation. in other words we will simply try to project the model onto the screen plane following perspective. ...
38 views

### Understanding bad shadows with voxel ray tracing

I have a voxel raytracer that is generating some weird shadows and I want to understand what is the source of the problem. The image is voxelized, resulting in: I then generate Hard shadows from the ...
39 views

### How to apply wire texture for realistic rendering of embroidery?

I am building an algorithm which takes a bitmap image as input and render the image as an embroidery design. The different steps are : Vectorize the image, I keep only 5 colors (Done) Generate ...
72 views

### For shader math, why should linear RGB keep the gamut of sRGB?

sRGB is often contrasted with "linear RGB." Images are stored on disk and passed to displays in sRGB, which is approximately perceptually uniform in intensity. Shader math is done in linear RGB, ...
28 views

### BSDF sampling versus light sampling

I wish to understand the specific application of Multiple Importance Sampling (MIS) to weighting BSDF sampling and light sampling together. Refer to the following diagram from these Stanford course ...
38 views

### Choosing corner values for trilinear interpolation

I'm caching distances for SDF functions in volume textures for faster rendering, and I'd like to use trilinear interpolation for smoother edges. I know that I'll need distance values at each corner; ...
44 views

### Compression of user-drawn “whiteboard” image

I need to store user-drawn images from an online whiteboard. The amount of data gets huge quickly which is obviously not good. What I need is to store something drawn through a tablet for example in ...
98 views

### Ray tracing implicit surfaces using Sturm's theorem

I am trying to render implicit surfaces given by a polynomial equation $F(x,y,z) = 0$ using Sturm's theorem. Plugging the parametric ray equation $r(t) = o + td$, where $o\in\mathbb{R}^3$ is the ray ...
46 views

### How do I derive this transformation

If I had two right handed frames where one has vectors [i, j, k] and another with corresponding vectors [u v w], how would I derive the transform M[i j k] <-- [u v w] when applied to any point P in ...
83 views

### Normal Artifacts On Grazing Angles

I am currently experiencing a very obvious artifact that only occur when I use normal maps. However it only occurs when looking at surfaces on very grazing angles. Here is a picture of the artifact: ...
50 views

### Defocus blur: Computing the pixel plane distance

I'm following Peter Shirley book, Ray tracing in one weekend. In the last chapter, he talks about how to make defocus blur by using thin len approximation. His camera class accepts a parameter called ...
17 views

### OpenCL - Kernel outputs image correctly but values don't show up on Host side

So once again it's related to my previous path tracer project. The path tracer routines are inside the kernel and for simplicity I'm just outputting a predefined color value ignoring all the lengthy ...
65 views

### Relatively new to OpenGL, need guidance/tips on an assignment with interactive user input

I'm currently taking a Computer Graphics class at university, and have been given an assignment which involves loading an obj file and manipulating it with keyboard and mouse controls (eg. arrow keys ...
4 views

### qt - loading 3d model - precompiled headers problem [migrated]

I'm newbie in Graphics, I want to load 3d model (ex: .off) an use it data with cgal I'm using Qt creator on Fedora OS. I tried this example: http://www.codersource.net/2011/01/29/loading-3d-files-...
77 views

### why doesn't a ray hitting a sphere at only 1 point count as a hit in sphere/ray intersection?

To give context to the question, I am reading Peter Shirley's Ray Tracing in one weekend. In his code for sphere/ray intersection, when the quadratic formula returns only 1 solution, he discards it, ...
60 views

### What noises can be sliced?

A well-known property of Perlin noise (with FBM) is that if you take a slice of it, the result is still Perlin noise. So, by taking successive slices of 4D noise, you get smoothly shifting 3D noise, ...
32 views

### fastest way to bucket triangles into a grid?

What is the fastest known method for bucketing triangles into an unbounded regular 3D grid? Specifically, I need an array of buckets. Random queries (which bucket is here) are not necessary, as this ...
36 views

### Understanding of Camera Up Vector

Assume eye position e, gaze direction g, view-up vector t, right-handed base. As the graphs shows: $w=-\frac{g}{||g||}$ $u=\frac{t\times w}{||t\times w||}$ $v=w\times u$ I am really confused ...
66 views

### How to simulate elastic material with restoring shape

I'd like to simulate a rubber-like material. This material if deformed would experience a restoring force to its original shape, a bit like a school rubber ereaser. I tried with a spring-mass system ...
19 views

### How to apply SSRT to an existing image with associated depth map?

I have the following image and depth map from a CV paper: I want to know if there is an existing way to apply screen space rendering to a pre-existing image. Before someone yells ate me saying "Why ...
54 views

### Can i compile my shaders to SPIR-V without using glslangValidator?

I'm making a cross-platform application, and i need my shaders to be compiled to SPIR-V for both Opengl and Vulkan. It seems that the only way to do so is to call a separate program, called "...
44 views

### Merging/Clipping Signed Distance Fields

I have multiple separate shapes for which I have generated signed distance fields by merging and clipping them against each other. Is there a generic analytical solution for merge and clip operations ...
68 views

### Is it possible to emulate Vulkan on a non Vulkan compatible gpu?

I don't think there is much to explain here, since the question is pretty much in the title, but i'll try to explain myself better: My current laptop's gpu does not support Vulkan, so i was wondering ...
53 views

### How to raytrace triangular faces when camera is not at origin?

I've watched the Pixar In A Box, Maths of Rendering Tutorial on Khan Academy. I've started writing a raytracing program and have come to the point where I must solve for ...
76 views

### PBR and Specular Aliasing

I have been following LearnOpenGL.com 's tutorials on PBR. Everything makes sense and I wrote up a shader for my physically based renderer. I noticed that the results look great, however all of my ...
35 views

### Has anybody extended parametric surfaces to volume density representations usefully?

Current mainstream technology does not really model the density functions very well. Yeah, we can use volumetric grids, FEM, voxel representations and particle clouds that define densities. But these ...
62 views

### Z-buffering implementation with small triangles

For research purpose, I have to implement z-buffering algorithm to render 3D face models. But I got a problem that the triangles are too small to be rendered (i.e. there is no pixel covered completely ...
59 views

### Difference in pixels between different monitors' sizes

If I have an image of x/y resolution and display it on a monitor, does this mean that between a 15-inch monitor and a 42-inch, the same amount of pixels (x/y) will be displayed, only that each pixel ...
88 views

### How to compute normal of surface from implicit equation for ray-marching?

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation. For instance, we can consider the equation of an ellipsoid given as:  \frac{x^2}{a^2} + \frac{y^2}...
43 views

### Compute emitted importance of a pinhole camera

In section 16.1.1 of Physically Based Rendering the authors describe how we can check, if a given ray $r$ corresponds to one starting from the film area. They implement this check such that it works ...
29 views

### Problem with simple realtime SSS shader - Combining light depth map distance with traditional lighting models

The article Chapter 16. Real-Time Approximations to Subsurface Scattering explains on point 16.3 how you can simulate the absorption of translucent materials from a depth map created from a point ...
70 views

### Are MMORPGs, specifically WoW, limited by their latency in terms of FPS?

It sounds crazy, but I've been doing a lot of reading on exactly why WoW performs very poorly, even on a 1080Ti / 8700k OC'd and overall, a high-end machine. Overclocking the CPU yielded great ...
33 views

### Translate vtkCellLocator

I would need to translate a vtkCellLocator, without rebuilding it entirely. I suppose that it should be possible to apply an offset to all the buckets in the octree. Do you know if is it possible to ...
41 views

### Evenly distributed point cloud for a grass renderer on a sphere

I'm trying to add some details like grass, rocks, trees, etc. to my little procedurally-generated planet. The meshes for the terrain are created from a spherified cube which is split in chunks (...
45 views

### Sample color calculation in rotated grid supersampling

I'm rendering a scene using scanline method. In order to get rid of aliasing we need to render a scene with higher resolution (2x, for example). I'm trying to figure out how to calculate the color of ...
33 views

### Is “generative art” the best term for describing graphical techniques like ASCII art or photo mosaics?

I'm researching generative art using computers, and I'm looking to see if there's a more specific term for types of image manipulation techniques like ASCII art or photo mosaics that can narrow down ...
113 views

### Procedural terrain: What's the best approach to calculate noise in the GPU?

A few years ago I started creating a procedural planet engine/renderer for a game in Unity, which after a couple of years I had to stop developing due to lack of time. At the time i didn't know too ...
89 views

### Why are depth buffer values clamped to (0, 1)?

This is a simple question. I know that in OpenGL or other graphics API, the values stored in the depth buffer are automatically clamped to (0,1). I just want to know why people do this instead of ...
25 views

### How can I register an articulated model to noisy predictions?

Given point sets $Y$ and $M$, I'd like to register articulated $M$ to $Y$ without changing the edge distances of $M$. The point correspondences between $Y$ and $M$ are known and points have a fixed ...
67 views

### How to handle GUI in a path traced renderer?

This isn't a pure CG question but it's more of a programming one related to CG. The main problem that occurs is both the GUI and the rendered scene need to be drawn regularly by swapping buffers. If ...
105 views

### Generate mesh from pointcloud data

Given point-cloud data : For example. position + color and normal. What will you use to generate mesh of this data and keep reasonable quality for real time cases ? Additional info to consider: ...
27 views

### Speed of different access methods reading a picture

Suppose there is a cpu with a cache line of 64 Bytes. Now you need to access all the data of a 2D image stored in the main sequence of the line by pixel. The image size is 1024*1024, of which there ...
26 views

### Targeted pixel updating in Java GUI

What’s the best approach for targeting specific pixels of a displayed GUI image in Java? For example writing a real-time mouse highlighter, editing certain pixels without refreshing the entire frame.
2k views

### Why normal map is blue and purple in color?

I am learning about normal mapping I understood that RGB values converted into XYZ,but my question is how it is converted, and why the normal map is blue and purple in color ?
52 views

### Which of these 2 general designs for a game engine is better?

I have roughly seen 2 different ways rendering engines are commonly handled (there could be more). And was wondering which general design is better for a general purpose engine. Central Handler ...