All Questions

3
votes
1answer
98 views

Smooth shading on sphere approximation

In what way is a "cheat" when using smooth shading on a sphere approximation? I'm not understanding how it's a cheat to use smooth shading on this? Other questions that are lead after this may be: ...
4
votes
2answers
75 views

Should you measure mesh complexity in triangles or vertices?

I have seen people using either vertices or triangles as a quick heuristic to estimate mesh memory usage and mesh rendering time. I always thought vertices were better, because the number of vertices ...
1
vote
1answer
66 views

Do I need separate Graphics and Transfer commands?

I was following this tutorial on Vulkan https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer and I decided to do this bit: The buffer copy command requires a queue family that supports ...
0
votes
1answer
53 views

Bresenham's algorithm next pixel?

In line drawing, bresenham's algorithm was explicitly derived for lines with slopes between 0 and 1 in the first octant from point P1 to point P2, where the x value of P1 is less than that for P2. In ...
2
votes
1answer
20 views

What are the outcodes that would be assigned to these points?

In Cohen-Sutherland clipping, it assigns outcodes to the points on lines that are drawn to specify their orientation relative to the clipping window. In the diagram below, I'm confused on what ...
7
votes
2answers
759 views

Why are oct trees so much more common than hash tables?

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have ...
1
vote
1answer
75 views

Ghosting in volumetric lighting

Does anyone know any method to remove ghosting in volumetric lighting? When light move it leaves trail behind, i would like to remove it. Volumetrics are Bart Wronski style (in frustum) with ...
0
votes
2answers
50 views

Why is precalculating a distortion different from calculating it in the shader?

I have an application where I simulate a camera distortion. There are two ways to go about it: calculate the distortion per pixel in the shader or precalculate the distortion and store the distortion ...
0
votes
1answer
45 views

Why is glreadpixels only working in certain cases?

If I try to read the screen with glreadpixels and then draw the same thing again using gldrawpixels it works, BUT if and only if ...
0
votes
1answer
38 views

How does the Modified Phong Lighting Model from the Phong Lighting Model?

How does the Modified Phong lighting model also known as the Blinn-Phong differ from the Phong Lighting Model? How can I distinguish the two?
-2
votes
1answer
47 views

What are the 3 types of light reflection from surfaces in the Phong Lighting Model?

Can someone please explain what are the 3 types of light reflection from surfaces in the Phong Lighting Model? Maybe possibly using a diagram to help me understand it better?
0
votes
1answer
127 views

What is mipmapping?

I know OpenGL likes the texel resolution of textures be some power of 2 in each direction because of mipmapping. (They say that this is not a totally stringent condition, but it is preferred) Can ...
0
votes
1answer
87 views

Z-Buffer algorithm vs Painter's algorithm?

In hidden surface removal, how does the Z-buffer algorithm work vs. painter's algorithm?
1
vote
1answer
62 views

How are normals assigned to vertices in different types of shading?

I'm new to this forum and topic but wanted to figure out specifically how are normals assigned to vertices in flat shading, gouraud shading, and phong shading? Is there a difference between any?
4
votes
1answer
110 views

Why do polygons have to be “simple” and “convex”?

I'm new to computer graphics and just wanted a solid understanding of why? Why is it so important that polygons you push through the pipeline be "simple" and "convex"?
4
votes
1answer
94 views

How does GLSL code get “loaded” and “compiled”?

I just wanted to find out for sure how GLSL code gets loaded and compiled. Does the g++ compiler do it?
1
vote
0answers
17 views

PostScript to PDF [closed]

So I have this ps file and I am converting it to pdf using ghostscript ps2pdf . However some part of my ps file is being cropped in the conversion specifically the margins . How can I convert this ...
0
votes
1answer
62 views

Turtle in Python

I am new to turtle library in python . I created a pattern using turtle however I observed margin gaps around the rectangle that I created . How can I remove them ?
1
vote
1answer
49 views

Ask for help on understand an algorithm which combines stratified sampling and importance sampling of Monte Carlo

I cannot understand an algorithm which combines stratified sampling and importance sampling of Monte Carlo. It is introduced in Page 73 of a textbook "Advanced Global Illumination", 2nd edition, ...
5
votes
0answers
40 views

Ask for help on understanding a formula related to change of variable

Although I have tried for a long time, I cannot understand Eq.(11) of paper "Microfacet Models for Refraction through Rough Surfaces" written by Bruce Walter, Stephen Marschner, Hongsong Li and ...
1
vote
1answer
106 views

Is a single shader and 1x1 pixel white sampler more efficient than frequent switching between shaders with and without samplers?

I have some existing OpenGL code that I am porting to Vulkan. The question is somewhat relevant to both OpenGL and Vulkan. I am rendering some primitives using textures, some single channel, others ...
0
votes
2answers
107 views

FPS counter for a simple Vulkan app

What measurement/monitoring tools could I use to get the FPS values for a simple Vulkan app? Thanks in advance
6
votes
1answer
94 views

“Artist Friendly Metallic Fresnel” reversible?

While implementing the "Artist Friendly Metallic Fresnel" paper by Ole Gulbrandsen (http://jcgt.org/published/0003/04/03/paper.pdf), I read that it is fully reversible: (section 2.3.2): for all r,g ...
1
vote
1answer
66 views

Overlaying a grid on to a height map

What is the method used in overlaying a grid (agonostic of the grid type) on to a height map? It seems it's some sort of projection, but what are the technical details in how to implement it? An ...
1
vote
1answer
140 views

How do I create a Win32 window with a Vulkan context?

I am aware of libraries that already do this (like GLFW), but I would actually prefer do all of the window and context creation by myself.
2
votes
2answers
57 views

Writing data to a shader resource at runtime in DX12

I'm hoping to port my existing toy raytracer to a window so that I can see samples accumulate over time. And then port over to Pixar's pmj02: https://graphics.pixar.com/library/...
2
votes
1answer
70 views

Given a picture of a unit square at an arbitrary angle and position, how can I reconstruct the distance and orientation?

To simplify, assume faces and corners of the square are labeled and the camera lens if whatever makes this simplest (a 90 degree field of view projection?) The application: using a known and labeled ...
1
vote
1answer
109 views

Flood-Fill and scanLine algorithms are line-based floods but I want square based floods

I have a flood-fill algorithm (Flood-fill) to fill a 24x24 matrix as follows (matrix is 24x24 here but will be much bigger in production): ...
2
votes
0answers
80 views

How does Voxel Cone Tracing solve the rendering equation? [duplicate]

so I am not new to interactive graphics programming, but I wanted to try out advanced techniques. Currently I am struggling to understand how the author of the 2011 paper "Interactive Indirect ...
5
votes
1answer
181 views

What algorithm to reassemble a broken image?

What algorithm can I use to reassemble a broken image? Is there any technique? algorithm? Can I use graphs? machine learning? computer graphics?
1
vote
1answer
88 views

total internal reflection implementation in pbrt-v3

I've been implementing a path tracer, referring pbrt-v3. However, I'm a bit confused about its implementation. Code is here. It seems when we sample to do transmission, it tests if it meets a total ...
3
votes
2answers
132 views

Luminance and Radiance in computer screen

I am currently building a graphics engine. I have a slight confusion on the imaging pipeline of computer screen. My question is how does computer transform the colour in the final frame buffer to ...
1
vote
1answer
102 views

Translate an arcball camera upwards or left-right

This problem is giving me a really hard time. I'm always looking at the origin and have a camera that moves around it in an arcball mode. That part works beautifully: I'm calculating the camera ...
2
votes
1answer
80 views

Project vertex onto plane

What I have: a plane given by its normal$\ n $ and a point on the plane$\ p $. a 3D-point$\ v $. a direction$\ d$. What I need: the projection of$\ v$ along$\ d$ onto the plane. How can I ...
1
vote
1answer
63 views

Drawing Directed Lines (with arrow endings)

I am working on a simple graph viewer with OpenGL. My problem with is directed edges. I tried to draw arrow endings with GL_TRIANGLES but somehow my calculations are off. I've used direction cosine ...
1
vote
1answer
69 views

Is it possible to access adjacent vertex data in tessellation evaluation shader?

I'm trying to render thick cubic Bezier curves using the whole OpenGL 4.5 pipeline: I render a patch with 4 control points. Vertex shader is simply pass-through to tessellation control shader. ...
1
vote
1answer
43 views

In texture mapping, should we set texture coordinate to every vertex or can I skip vertices in between?

I am working on a texture mapping problem. I use vtk C++ library for my work. I have a very dense mesh with lots of vertices. I want to apply image texture to this mesh. Should I set texture ...
2
votes
1answer
76 views

LoopBlinn Cubic Curve Rendering - Serpentine arteffect

I am trying to implement the Loop-Blinn cubic curve in java using the following source codes GPU-Curve-Rendering and WebCore. Both of them are showing few arteffects and i cannot figure out why. Here ...
4
votes
1answer
78 views

Conversion from cubic catmull-rom spline to cubic b-spline

I have a bunch of points that are the control vertices of a cubic catmull-rom spline. I would like to convert these to the control vertices of a cubic bspline. I believe I can do this using this ...
0
votes
0answers
21 views

How to rotate camera in CAD package application

I can rotate camera to change the view for the first person. But as I am working on a camera object for a cad package this isn't a first person or walk-through. I am not sure how to rotate the camera ...
1
vote
1answer
65 views

preserving z-values during projection?

Consider this figure for projection. There are two equations that give value for the xp and yp coordinates: $x_p=x.\frac{(z_{vp}-z_{prp})}{h}+ x_{prp}.\frac{(z-z_{vp})}{h}$ and $y_p=y.\frac{(z_{vp}...
1
vote
1answer
134 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 ...
3
votes
1answer
138 views

High variance in path tracing specular objects

I'm testing my path tracer for specular surfaces. Images rendered with my own code have very noisy appearance, and I think they look like variance. I use point light and the bunny is of mirror ...
2
votes
0answers
44 views

Binary representation of Pascal's triangle [closed]

I recently learnt about the binary representation of Pascal's triangle. Here is what it looks like I am a java learner. Is there a way for me to find the java source code to graph this binary ...
0
votes
1answer
108 views

finding the projection matrix for one point perspective

I found the derivation for two point and three point perspective here on this site, even though it says review on one point perspective, it doesn't give a link to previous pages, but I'd like to ...
0
votes
1answer
137 views

perspective projection transformation matrix

In one text, the derivation for perspective projection goes like this: If $x',y',z'$ represent any point along the projection line,and $x_{prp},y_{prp},z_{prp}$ are the projection ...
3
votes
0answers
110 views

ray-triangle intersection precision - c++

I'm building a software renderer but I think there might be some problem with my ray-triangle intersection accuracy. I implemented the algorithm referring to ...
2
votes
1answer
90 views

Ask for detailed derivation of a formula in “Advanced Global Illumination”

Attached is page 34 of "Advanced Global Illumination", 2nd edition, by Dutre et al. I don't understand how (2.22) is derived from (2.21) and the given incident radiance distribution $L(x\leftarrow\Psi)...
2
votes
2answers
133 views

How can I draw this style of grid?

I'm trying to write code (in any language) to render this 3D grid, matching the look and colors as closely as possible:
0
votes
1answer
41 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): ...

15 30 50 per page