All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
30 views

Algorithm for randomly generating polyhedrons?

I want to randomly generate polyhedrons which need not be convex. What is the most efficient way for doing so? I can think of an algorithm for generating random convex polyhedrons, but am unable to ...
0
votes
1answer
35 views

Unity: Pass texture pointer from OpenGL to Unity

I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture ...
0
votes
1answer
52 views

WebGL Can't render anything, wrong projection?

I'm trying to understand and learn WebGL and computer graphics from button up, that is why I started to work on my own little library for that. I've spent couple of days looking for right answer and I ...
0
votes
1answer
38 views

Are non manifold meshes problematic for Virtual Reality?

A simple question. I know that non-manifold meshes are problematic for physics simulations, boolean operations, and 3D printing. I was wondering if they can be problematic for a virtual reality ...
1
vote
2answers
280 views

How are colors really mixed?

I'm kind of stuck on this one. When following a conventional, high-level shading tutorial, you'll come across these images that are like ambient + diffuse + specular = result, but I can tell that it's ...
3
votes
2answers
85 views

Programmatically generating bin files for GLTF models

I have a need to generate a series of GLB files. I have a base template for a GLTF file which I have to derive off of. The models thus generated will only have varying textures on them. The base mesh ...
0
votes
0answers
55 views

Using octree for cheking intersection of ray and meshes

I wrote the code for checking intersection of ray and meshes on scene. It consist of two parts - broad phase and narrow phase. In broad phase I build an oriented bounding box around each mesh and ...
2
votes
1answer
98 views

gl_FragCoord and glViewport

I've been scanning the specifications for both OpenGL and GLSL, and I can't find a definitive answer as to how exactly are gl_FragCoord's ...
0
votes
1answer
54 views

Vulkan: efficient way to update VBO mesh vertices?

I would like to change/add/remove some mesh vertices in existing VBO's (while deforming and remeshing 3D objects) . With OpenGL I would have to reload whole vertex VBO's. I suppose with Vulkan there ...
0
votes
1answer
32 views

How to make the lines of a (binary) image dotted or dashed?

Let's say I had a binary image (i.e. only contains black and white pixels). For example, this one: How would I make all the lines in this image dotted or dashed? In other words, the eyes would be ...
0
votes
0answers
19 views

Export images in sketchup models

I built a model on Sketchup and imported png images in it to fill some faces. At first time, I tried to fill with a texture pointing to the desired image but it wasn't centered. Then when I export my ...
2
votes
0answers
48 views

How to project an image on spherical surface with least possible distortion

I did not know where to ask, I will try it here. I work in a local planetarium and I wonder if it is possible to edit an image in such way, that when projected on spherical cupola (diameter 8 m), it ...
1
vote
1answer
41 views

Why BMP file format last line of image is first line on file?

I'm studying Microsoft Windows Bitmap File Format, extension BMP. I'm curious to know why scanlines are stored on file from bottom to up: the last scanline on image is the first line on file and the ...
1
vote
2answers
73 views

How to calculate interpolation between multiple skeleton poses?

I found out that I should use spherical linear interpolation to blend two poses of a joint. I cannot find what to do if I have hundreds of poses to blend except applying the SLERP iteratively. What ...
2
votes
1answer
63 views

Why the Bresenham's algorithm does not work for those two points?

I am using the Bresenham algorithm from wikipedia: ...
0
votes
1answer
56 views

Factor of 2 converting radiance to irradiance

For a Lambertian surface, the radiance at a point is $$L = \frac{\alpha}{\pi}\cos\theta_i E_0$$ If we have an infinite flat surface, albedo = 1, illuminated directly normal, then we get $$L = \...
0
votes
2answers
77 views

Any good sources on advaced/special rasterization algorithms and techniques and theory behind them?

I spent quite some time looking for books on rasterization of vector graphics and related challenges. The best I found is "Raster Tragedy in Low Resolution",which is old and focused on fonts. There ...
0
votes
0answers
30 views

Where to store a very small set of shading constants in D3D12?

My rendering engine heavily uses implicit rendering techniques, so I have relatively little constant data to upload every frame (just 240 bytes of rendering settings; surface parameters are passed ...
0
votes
0answers
58 views

Programmatic rendering of 3D animations

Many years ago I used POV-Ray to render some 3D animations. I liked POV-Ray's Scene Description Language (SDL) as I could generate the required files programmatically using other languages (e.g. Perl)...
2
votes
0answers
100 views

Recreate geometry from normal map

I have a group of low polygon meshes, with associated normal maps. The normal maps were created by baking from high polygon meshes, which I no longer have access to. Is it possible to recreate ...
4
votes
0answers
132 views

Pre-filtered environment map, deriving the equation

I'm reading through this article, and more specifically I'm trying to derive the equation that would explain the implementation the following shader (still in the same article): ...
3
votes
0answers
84 views

Microfacet GGX not integrating as expected

I'm trying to complete a look-up table for an energy-conserving variation of microfacet GGX as implemented here: https://patapom.com/blog/BRDF/MSBRDFEnergyCompensation/ I have a (pretty standard) GGX ...
2
votes
1answer
66 views

How is this normals map supposed to work?

I have come across this image that's labelled a bump map to be used with a 3D model. It looks like this: In this map, which is an RGB map, it seems we have pixels whose normals face upwards shaded ...
0
votes
0answers
29 views

gradual transition of light intensity formula

Imagine I have an x value that ranges from 1-100. The light source is pointed at x=50. From points 35 to 65 I want intensity to be 1 At the ends (ie 1 and 100), intensity should be 0 What formula ...
4
votes
1answer
73 views

Dealing with interpolated normals within a raytracer

I am trying to render a teapot within a simple raytracing that can handle reflection, refraction, and shadowing from point and directional lights. I am very confused about one detail of the raytracer ...
3
votes
1answer
118 views

Calculating the gradient of a triangular mesh

This question is regarding a homework assignment (want to be upfront because many people on stack exchange don't like helping with homework questions). I have a triangular mesh, which is defined by a ...
2
votes
1answer
56 views

Confusion about data types in Jensen's subsurface scattering paper

I am currently trying to implement Jensen's paper on subsurface scattering, but I am getting confused when I am trying to implement it in my pathtracer. I have questions about the data types of ...
0
votes
1answer
65 views

Nice way to make noise seamless (without tampering with the noise generator)

Here's the problem : I have multiple noise generators in my program I Can't change. Perlin Noise, Diamond Square, Voronoi, etc. Unfortunately for me, I want the noise to be tileable, no matter the ...
3
votes
1answer
58 views

Wrong color in .ppm file

I'm going through the rasterizer tutorial from Scratchapixel, but I encountered a problem with the generation of the .ppm file. Since something was off, I reduced the example to the bare minimum, so I ...
0
votes
0answers
40 views

How do I represent the grid patterns of the image in the included figure with a DITHER MATRIX?

The problem statement is: "Represent the grid patterns in [the the figure linked below] with a dither matrix." The figure is: https://www.docdroid.net/d90WXko/figure.pdf Apparently, according to the ...
3
votes
1answer
128 views

Can microfacet BRDF (including ggx) represent perfect mirror?

Perfect mirror's brdf is simple, $F\frac{\delta(\omega_i-\omega_r)}{|\cos(\theta_r)|}$ as in http://www.pbr-book.org/3ed-2018/Reflection_Models/Specular_Reflection_and_Transmission.html As shown in ...
4
votes
1answer
98 views

Camera Model View transformation in Ray Tracing

I am implementing my own simple ray tracing and I came across some sort of confusion. When defining the verticies in the world I multiply them by the modelView transformation system (the matrix ...
1
vote
0answers
35 views

Optimisation of Geometry Pass

I'm trying to optimize a geometry pass for a game using dx11 and deferred rendering. (All test are performed on Nvidia GTX 1060 at fixed clock rate) After profiling with NSight it seems to have very ...
1
vote
0answers
30 views

Are there some methods of preventing tools like FotoForensics from detecting manipulations?

I am asking this question purely our of curiosity. I do not look for step-by-step tutorial on how to manipulate a photo and making sure that it will be hard to detect it. I was wondering, because ...
0
votes
1answer
42 views

Local Coordinates of Deformed Lattice

I'm making a lattice based volume FFD and I'm having trouble with gaps in my data resulting from doing a typical deformer. I think I need to go through the voxels in the deformed lattice and then find ...
0
votes
0answers
35 views

Cover a polygon with least amount of parallelograms

I am solving the task that is as follows: Input: a polygon. Can be any kind of polygon without self intersections. Can be a non-convex and with holes inside. Goal: to cover it with 2 (at least) or ...
2
votes
1answer
49 views

How does Next Event Estimation work with transformed lights?

I am relatively new to path tracing, and I am trying to implement next event estimation. I am following the Monte Carlo integral used to compute the direct illumination from an area light: $$\frac{1}{...
2
votes
0answers
16 views

Should I use common resource bindings across all my shaders in HLSL/D3D12?

Will unaccessed bindings consume cache or bandwidth? I want to improve cache usage by splitting the per-path information in my renderer across different resources, but I also want to keep my binding ...
0
votes
0answers
29 views

Is it possible to have multiple descriptor ranges in a single descriptor table?

Let's say I have the following registers in my HLSL 5.1 shader: Texture2DArray g_texture_array : register(t1); Texture2D g_texture[10] : register(t0); I had in ...
1
vote
1answer
67 views

Difference between isnan and comparison to self

In GLSL, what is the difference between isnan(x) and !(x == x)?
6
votes
0answers
75 views

Noise shaping for dithering with gamma?

The context of this question is correct dithering of color with gamma correction. In dithering we add (shaped) noise $n$ to a signal $s \in [0, 1]$ based on a random variable $r \in [0, 1]$ $$s' = s +...
1
vote
2answers
69 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 ...
2
votes
1answer
92 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 ...
0
votes
0answers
28 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 ...
0
votes
0answers
26 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 ...
1
vote
1answer
28 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...
0
votes
1answer
68 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 ...
2
votes
1answer
70 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 ...
0
votes
0answers
24 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 ...
3
votes
2answers
147 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 ...

15 30 50 per page