All Questions

0
votes
1answer
13 views

Mimic shadertoy in WebGL

I was following this guide for drawing circles using shadertoy. Now I am trying to mimic the examples behaviour in WebGL. Here is a working shadertoy example I try to mimic. The code is not mine, see ...
0
votes
0answers
19 views

How to do CSG on 3D triangulated objects, originally stored as a .obj file, using openGL or other libraries?

What I would like to do is to create a crater on a field. To do so, I thought that creating a universal crater object (something cone-shaped) and then subtracting it from the field on a specified ...
2
votes
1answer
40 views

Compute shader textures compared 2D float4 arrays

I am wondering is there a difference in performance between using floating point textures as my 2D float4 array vs just passing in 2D float4 arrays? 2D float arrays eliminate the need to do texture ...
1
vote
1answer
19 views

3D object to slices like in medical scan

I am novice lacking professional terminology. I want to create from 3D object (let's say from polygon mesh) a slice through to PNG file in order to create something like reverse medical MRI scan from ...
0
votes
2answers
61 views

An algorithms for covering a 2d polygon with a predetermined number of rectangles?

I am looking for an algorithm that is able to cover with non-overlapping rectangles in a pre-defined number and minimum area a generic 2d-polygon. Polygons are usually free-hand draws, so they can be ...
-1
votes
0answers
13 views

Applying perspective divide on x and y only?

In the derivation of perspective matrix, z-value is shifted to w-value so that when perspective divide is applied to the result of matrix-multiplication with position values, the value of z can be ...
9
votes
2answers
918 views

Sub-pixel antialiasing rules

I recently had an issue with sub-pixel anti-aliasing of text, which produces very harsh colours and made me wonder how it is meant to be done properly: I've drawn some cases of a black tile ...
1
vote
1answer
67 views

How can I transform an ellipse into a circle?

I have an ellipse which has -45 degree axis. How can I transform the ellipse into a circle? Can I use shear transformation along the x/y axis?
2
votes
2answers
71 views

Unfold a 3D mesh to a 2D plane

I'm trying to unfold a 3D mesh onto a 2D plane. My general idea to do this, would be to cycle through all the faces of the meshes and perform a hierarchical transformation. So I would start at the ...
0
votes
0answers
17 views

Arrange common items to spell out words

This seems like a pretty easy thing to do, but I've never done anything like it and I would rather not reinvent the wheel - so I'm looking for example code in pretty much any language or an algorithm ...
1
vote
1answer
24 views

How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?

I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is S...
4
votes
1answer
52 views

3D coordinates of intersection point in clipping for a rasterizer

When doing clipping in homogeneous coordinates, we need to find the coordinates of the intersection of the viewing frustum with the line to be clipped. This can be done easily if we want those ...
0
votes
0answers
18 views

Why did most or all vector graphic devices not support some type of curve input parameters?

In the case of classic plotters, it seems the hardware would have been able to handle (something like bezier) curves with the correct software, but instead curves were drawn very slowly using a large ...
2
votes
0answers
26 views

how many watts are in the SPD of the color white?

Please help. I'm trying to implement a ray tracer, going by the PBRT book and got stuck on an issue that I fail to find the answer to. My scenes are made from objects and light sources. From that, I ...
9
votes
3answers
968 views

What's a proper way to clamp dither noise?

When reducing color depth and dithering with a 2 bit noise (with n=]0.5,1.5[ and output=floor(input*(2^bits-1) + n)), the ends of the value range (inputs 0.0 and 1.0) are noisy. It would be desirable ...
2
votes
1answer
216 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 ...
0
votes
0answers
19 views

Why need a $h$ parameter in the Geometry Function of a BRDF

Geometry Function in the specular BRDF term is defined as $G(l, v, h)$. Why need a $h$ since $h=\frac{l+v}2$. $f_{spec}(l,v) = \frac{F(h,v)G_2(l,v,h)D(h)}{4|n\cdot l||n\cdot v|}$ from "Real Time ...
4
votes
1answer
386 views

Computing a lookAt matrix by passing a vec3 to a camera object

I am following this tutorial on how to implement a first person camera. So far I was able to implement the entire (C++) class in TypeScript and it works as it is supposed to. Problem What I was not ...
3
votes
1answer
166 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 ...
2
votes
0answers
21 views

GL_DEPTH_CLAMP has no effect (reverse z)

In an effort to improve cascaded shadow maps, I have looked into using GL_DEPTH_CLAMP and moving the near and far plane just around the actual view frustum instead of the global bounding box. But the ...
4
votes
0answers
60 views

Learning light transport using Q-Learning

I am trying to reproduce the results obtained by Dahm et al. in the paper Learning Light Transport the Reinforced Way. This method takes advantage of the similarity between the Bellman equation (Q-...
0
votes
1answer
43 views

What are the parameters measure the performance of a rendering? [closed]

Let's say I designed a housing model and rendered it using a rendering engine. how can I measure the performance of my rendering?
1
vote
1answer
170 views

How to match Blenders polynomial lens distortion model with GLSL?

I'm trying to re-implement Blenders (libmv) polynomial lens distortion model using shadertoy, in order to apply the lens distortion in another application ideally by generating a STMap for that. I ...
2
votes
0answers
23 views

HalfEdge data structure in openmesh, create_face function explanation

Does anyone have experience with open-mesh or computational geometry and can kindly explain what exactly happens in the function below? ...
3
votes
2answers
210 views

Clipping circle and polygon and generate a CAD drawing

I'm developing a CAD drawing generator using C# and netdxf library (https://github.com/haplokuon/netDxf) The app first performs boolean operations (specifically - union & subtraction) on polygons ...
2
votes
1answer
48 views

Why is cos(𝜃) in the denominator in the reflectance equation and in the numerator in the shading equation?

Background: I'm reading https://learnopengl.com/PBR to learn about PBR. In the theory slide (https://learnopengl.com/PBR/Theory), the author has the reflectant equation as The theta (the angle ...
2
votes
1answer
76 views

Floating Point Operations in Line Drawing Algorithms

When it comes to line drawing, DDA is the simplest and most intuitive algorithm, the core idea being: compute the slope of the line for every increment in x, increment y by the slope However, DDA is ...
3
votes
1answer
92 views

Why the ray tracing result looks weird?

I followed the book Ray Tracing in One Weekend and implemented a simple ray tracing procedure. There are 100 random samples every pixel for antialiasing, but the render result looks weird: There is a ...
0
votes
1answer
27 views

Rendering 3-D point clouds obtained from depth maps as a 2.5D video

Suppose I have code to generate a bunch of frames, each of which is a depth map(I have access to the matrices which represent depth) which in turn is used to generate a point cloud. One frame would ...
-1
votes
1answer
82 views

Unsolved Problems in CQ to this day?

What problems haven't been solved yet when it comes for instance in rendering,deferred rendering, Volumetric lighting, ambient occlusion or in any other interesting area. When i say unsolved problems, ...
0
votes
1answer
85 views

How to simulate a line laser diode?

I'm interested in simulating the way a laser line deforms when it strikes an object and runs along the surface of it. Which concepts would be involved? Is there any 3D modeling software out there that ...
4
votes
1answer
108 views

Do straight lines always remain straight when projected with a perspective camera?

If I have a straight line in 3D space and I use a camera matrix to do a perspective projection into a 2D plane/screen will the resulting line always be straight too? If I project the start point and ...
2
votes
1answer
289 views

Feeding vertex data to a compute shader

I'm writing a CAD program in vulkan. In my current design, I have line paths represented as large vertex buffers for rendering. I would like to implement an algorithm for extruding the path outwards, ...
0
votes
1answer
67 views

Adding vbos to a vao once it has been created

Is it possible to add vbos to vbos after their creation? For example (pseudo-code): ...
5
votes
1answer
116 views

Blur with alpha transparency

I'm writing a simple box blur for a graphics library. The formula makes the average of a range of pixels by adding the ARGB amounts and then dividing by the blur range For example, with a blur range ...
3
votes
0answers
29 views

NURBS Weights De Boor's Algorithm

I am having trouble implementing an algorithm for 3rd degree NURBS. I have been able to program 2nd degree ones from the equations described here but I am not able to derive an equation for Rational B-...
0
votes
1answer
52 views

Sphere Texture Mapping Algorithm

I am trying to generate UV coordinates automatically to map a texture on a sphere. The problem is with seams when going from 0.8 to 0.2 there is a discontinuity and interpolation in fragment shader ...
1
vote
1answer
49 views

How to implement physically based unit in pbr renderer

According to this note, Frostbite use photometry unit in their calculation. I am trying to mimic this feature, but I am not sure what transformation need to be done. I will try to explain what I have ...
3
votes
1answer
67 views

Why is it easier to inverse transform every object in a scene than to transform a camera?

My lecturer for a computer graphics (raytracing) paper has stated that 'It is easier to apply the inverse transform to the world than it is to apply the transform to the camera.' The example given was ...
0
votes
1answer
47 views

Very efficient/fast marching cube implementation

I was wondering if there's any known technique/algorithm that would compute a mesh generated by the marching cubes but hierarchically (like a divide and conquer strategy), in the implementation I know ...
0
votes
1answer
60 views

How to draw depth-based volume in real-time

Normally when we talk about realistic transparent volumes, we care about refraction (and total internal reflection), and we care about scattering. But there's a much simpler case of volume ...
1
vote
1answer
51 views

Organic 2d tree generation

I'm looking for a code to generate organic 2d trees like thiskind of shapes Gerard Ferrandez has an example to generate some tree but not organic like the picture shape https://codepen.io/ge1doot/pen/...
1
vote
1answer
23 views

Identify plane of symmetry in 3D mesh

Is there an efficient way to identify the plane of symmetry in a 3D mesh? Preferably with existing code / software but if anyone knows how to implement it that would also be helpful. Example of the ...
0
votes
1answer
32 views

Difficulty including GLM into Visual Studio with OpenGL

I have been trying to implement GLM (math library) into Visual Studio with OpenGL. I have followed and watched many online resources that point me to include only the GLM folder inside the ...
1
vote
1answer
37 views

How to translate the center of an equirectangular projection?

I'm trying to perfectly align two or more equirectangular photos of the same place taken from slightly different positions. Using an example provided by openMVG I managed to get the relative position ...
6
votes
1answer
133 views

Do occlusion queries respect the stencil test at all?

In a project where I want to select visible objects using using a screen-aligned polygon and various conditions for what "selected" means with regards to that polygon, I'm basically drawing the ...
3
votes
2answers
123 views

Why does opengl use 4d matrices for everything?

What I managed to figure out is that the first 3*3 is used for rotation and scale and the 1*3 at the end is used for position, but what is the bottom row used for? is it only for clipping related ...
0
votes
0answers
16 views

Open source tools for extracting hi-res images from video

I found recently an article in which they describe a technique to extract high resolution images from a standard quality videos. The technique exploits the fact that in a typical video the camera ...
2
votes
1answer
52 views

2D Line of Sight + Visibility Calculations

I am currently working on an algorithm to calculate visibility in a 2D top-down level. The level contains actors, with position and "sight" information walls, ...
0
votes
1answer
72 views

smallpt: ray scattering and Importance Sampling

Introduction For those familiar with smallpt by Kevin Beason: In path tracing, when rays hit a surface, they are scattered and the theta angle (the angle between the normal to the surface and the ...

15 30 50 per page