Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions specific to raytracing (as opposed to scanline rendering), the 3D graphics technique of intersecting rays from the camera with objects in the scene.

0
votes
0answers
22 views

Why am I getting those artifacts in my branchless/flattened GLSL raytracer?

I sat down this afternoon and tried to make a branchless WebGL ray tracer based on smallpt. For a strange reason that I can't understand at the moment the raytracer accumulates to this: The only ...
2
votes
1answer
129 views
+50

Should direct illumination and path tracers render the same scene equally bright?

I am using the book Ray Tracing from the Ground Up by Kevin Suffern to build my first ray tracers in Java. Based on the theory, I expected that direct illumination and simple path tracers render the ...
0
votes
1answer
47 views

Where should the ray origin be put in perspective camera ray tracing?

Where should the ray origin be put in perspective camera ray tracing? The following gives a picture of the ray tracing in the perspective camera setting: http://www.cs.cornell.edu/courses/cs4620/...
0
votes
0answers
31 views

Dragging an object on a plane with respect to the camera

this is a long description but I hope the solution is simple: I have a 3D pointCloud with a vtk box (displayed at 0,0,0) and I want to drag the box on the XY plane with my mouse cursor (Zero movement ...
1
vote
1answer
109 views

how to render colored glass object?

I want to know how to deal with the color of object,Should i use diffuse reflection on the surface?
1
vote
0answers
41 views

How exactly do soft shadows get generated using a voxel cone tracing rendering technique?

Let's assume we have voxelized a scene, and all of our materials have an opacity level of 1. The reuslt would then look like: If we raytraced the final volume that gets generated after rasterization. ...
0
votes
1answer
62 views

Self intersection artifacts in 3D image raytracing

I am developping a voxel raytracer for global illumination. I have been successful in multiple aspects but there is a problem I am not sure how to solve. The model works as most other Voxelization ...
0
votes
0answers
42 views

How to ensure that the raytrcing coordinate system is teh same as the projection one?

I have 2 shading models right now, one is using voxels the other one is the standard projection absed renderization method. Putting them side by side I have noticed that no matter what I do one is ...
1
vote
1answer
99 views

Difference between BVH and Octree/K-d trees

So I'm currently reading up on acceleration data structures and so far I've heard there are 2 main schemes. Object Subdivision and Spatial Subdivision. The Bounding Volume Hierarchy belongs to the ...
2
votes
0answers
169 views

Circular pattern aliasing in voxel ray tracer

I am doing a voxel based raytracer. In other words, I first voxelize the scene using rasterization and I proceed to raytrace the volume in a 3D image to generate a final frame. Currently I noticed ...
0
votes
1answer
33 views

Pathtracing line and point primitives?

So I'm in the midst of implementing a path-tracer. I have chosen to use Assimp library to load models and scene information. According to it, it will provide mesh data and meshes may contain point, ...
2
votes
1answer
81 views

Weird artifacts in my ray tracer

I am getting weird artifacts in my simple ray tracer that I made using the book Ray Tracing in One Weekend by Peter Shirley. Example: (circular pattern on the ground and black tint on the spheres.) ...
3
votes
2answers
124 views

Why does _ray_ tracing work?

Perspective projection (or at least non-orthogonal) is by far the most common in photo-realistic graphics. When we use perspective projection, the (equally thick) slices of volume visualized by each ...
1
vote
0answers
39 views

Tail Recursive Monte Carlo Raytracing

I am writing a raytracer in F# using montecarlo sampling I would like to make my recursive calls tail recursive but I am not sure of this is possible with MC raytracing as one has to evaluate sampled ...
0
votes
1answer
66 views

How to assign/calculate triangle texture coordinates

Below is a triangle with its vertices and uv coordinates. These are read from the input model file. I don't understand why the texture comes in different orientation than the image. here is the ...
0
votes
0answers
39 views

How to properly modify a ray in a raytracer to achieve camera rotation

I am trying to make a particular kind of raytracer, but there is some strange bug occurring when I attempt to rotate the camera. As you can see, there is some important distortion ocurring when the ...
3
votes
2answers
133 views

Illumination model used in the “Raytracer in a weekend” series

I was going through the raytracer in a weekend book by Peter Shirley and the subsequent book raytracing the next week and I couldn't make out what was the illumination model that was being used here. ...
1
vote
0answers
49 views

How to calculate solid angle subtended by a pixel?

How is the solid angle subtended by a pixel calculated? both in perspective and fish eye lens.
5
votes
1answer
119 views

Grainy image in my simple ray tracer

The wall on the left of the red ball is perfectly reflective wall. In the first image there's a point light that lies on the plane of the reflective wall and in the second image, it's 0.01 units ...
3
votes
1answer
211 views

Importance sampling microfacet GGX

I have a renderer where the BxDF interface is Sample(), PDF(), and Eval(). The Lambertian BRDF is working well, and I believe I have properly implemented Eval for GGX based on another user's question, ...
2
votes
1answer
75 views

Is the microfacet GGX BSDF normally implemented as separate BRDF and BTDFs?

I'm trying to build a toy path tracer using something similar to Disney's BSDF, where many materials can be represented as combinations of properties like color, metalness, roughness, transmission, ...
3
votes
1answer
133 views

What is the use of epsilon in the Möller–Trumbore intersection algorithm?

The Möller–Trumbore intersection algorithm compares the determinant with an epsilon. What is this epsilon and how is its value chosen?
3
votes
1answer
107 views

Can a glass plate act like a lens?

I am trying to implement rough dielectrics on my renderer. I compared the results of my renderer and Mitsuba renderer. However, a thin glass plate which is a cube scaled by (0.4, 0.4, 0.01) magnifies ...
-1
votes
1answer
49 views

How to test my triangle intersection implementation?

I've been thinking about this question for a quite long time.And my implementation seems to be correct for some cases but wrong with few others. How can I comprehensive test the algorithm? Is there ...
3
votes
1answer
102 views

Do we ever consider the size of the pixel to calculate the color in Ray Tracing?

From what I'm reading, it looks like a ray tracer views a pixel as one color and computes that color using the ray starting in the center of that pixel. Yet a pixel has a width and a height. Do we ...
2
votes
3answers
453 views

How is a projector handled in a Ray Tracing environment?

I want to create a scene where a room includes a projector and a white screen. How is a Ray Tracing environment functioning in such a setup? Is the light from the projector going through a slide and ...
1
vote
1answer
100 views

Issues with Multi-threaded Raytracing

I'm having some issues with my multi-threaded ray tracing implementation. It seems to only render about half of the image. Here is the picture: Here is the code: ...
4
votes
0answers
154 views

Wrong output while implementing GGX importance sampling

I'm receiving a non-energy conserving output while trying to importance sample the GGX Distributionof the Microfacet model, which is generally 3-4 times bigger than the resulting PDF I'm following ...
4
votes
0answers
82 views

What techniques are used to build ray intersection acceleration structures on the GPU?

What improvements and alternatives have been developed since HLBVH was introduced in the 2010 paper HLBVH: Hierarcihcal LBVH Construction for Real-Time Ray Tracing of Dynamic Geometry by J. Pantaleoni ...
3
votes
1answer
254 views

Ray tracing: transforming ray to object's local space for intersection test

Im writting a raytracer, for which I want to be able to test intersections with implicit surfaces (in my case spheres). Without applying any transformation it works great, but I would like to upgrade ...
1
vote
1answer
82 views

What is the algorithm used in pbrt-v3 for triangle intersection?

Where's this algorithm come from? Any references? And a specific question, when the authors compute the transformation from world space to ray-triangle intersection coordinate space, what's the ...
2
votes
1answer
78 views

Rays (~1k) intersecting triangle meshes (~100k) with ca. 100 vertices each

I am looking for a way to efficiently compute ray-triangle intersections for a large number of rays (~1k) and a large set of triangle-mesh bodies (~100k) with each composed of several hundred faces. ...
1
vote
1answer
79 views

Light Falloff through a grid

I'm playing with a grid-based lighting system, where light is transported and accumulated through a grid. I initially tried attenuation based on ...
1
vote
0answers
68 views

Ray Tracer Shadowing

So I'm working on an assignment where we have to design a simple ray tracer. The program has two objects that it can use, sphere and cube. It can render the cube and spheres, it also does shading on ...
1
vote
1answer
136 views

Tone mapping bright images

I am rendering the sun in an image, and the sun comes out white and is basically very unrealistic. I have tried searching for tone mapping algorithms but I'm very lost. Can someone guide me to do ...
1
vote
1answer
85 views

What's wrong with my computation of the intersection of a ray with a sphere

I am learning GLSL and trying to raytrace a sphere. Here is a fragment shader. It correctly discards fragments which are not on the sphere, but when I try to calculate the point of intersection (and ...
5
votes
1answer
114 views

Reduce kd-tree's nodes' bounding box sizes to their shapes' extents?

I've implemented a ray tracer that uses kd-trees for acceleration. To help debug kd-tree construction, I also created a crude OpenGL view of the same scene that shows the axis-aligned bounding boxes (...
4
votes
2answers
129 views

Inconsistent shading in pathtraced image

I am currently building a pathtracer, which has support for vertex normals and face normals. There seems to be an issue when it comes to rendering objects with triangles exported from Blender. ...
4
votes
1answer
109 views

Classify acceleration structure using surface area heuristic

My professor gave me the following example exam question: Given 4 spheres with diameter = 1. Their centers are located on coordinates (2,4,0), (4,2,0), (4,6,0) and (6,4,0), as seen in the ...
2
votes
1answer
218 views

How can I implement this BSDF?

I am trying to implement a path tracer, but I have some problem. The class Spectrum is color. I implemented a mirror material like this: ...
1
vote
1answer
45 views

How to get the nearest polygon face and height of intersection point

I have multiple 3D polygons meshes (sketchup format) in the world, for any specified point (x,y,z), how do I get the direct closest polygon face below this point? and how to get the height for the ...
1
vote
0answers
39 views

Is this the correct application of model transformation?

Suppose I want to perform translate in the following order: Scale by $S$ Rotate by matrix $R_1$ Rotate by matrix $R_2$ Translate by $T%$. When I apply the matrix, should the overall transformation ...
1
vote
2answers
87 views

AABB bounding boxes

Here's a constructor to construct a axis-aligned bounding box given two opposite vertices on the bounding box, from Pharr's Physically Based Rendering, Third Edition. ...
4
votes
1answer
91 views

How do you deal with clipping when rendering to a limited colorspace?

In my naïve raytracer experiment I work internally with RGB values, and after all the tracing has been done, I end up with raw RGB triplets that I need to write down to some image format with a ...
1
vote
0answers
45 views

How does anti-aliasing work, in general, for raytracing? [duplicate]

I am working on a raytracing Java program for fun. Here's one rendering: As you can see I still have to implement anti-aliasing (and there are huge geometry problems I won't get in to). How would ...
3
votes
1answer
280 views

Probability density function while using spherical coordinates

I'm following this tutorial where at somepoint the derived PDF for spherical coordinates for a Lambertian surface is \begin{array}{l} p(\theta, \phi) = \dfrac{\sin \theta}{2 \pi}. \end{array} But as ...
4
votes
1answer
133 views

Simple Intersection Algorithm for Ray and 3D Bézier Curves of Varying Thickness

I'm trying to get an algorithm for intersecting a "tube" (a 3D cubic Bézier curve extruded by a possibly-changing radius) with the following required properties: Computes intersections of ray and a ...
6
votes
1answer
164 views

Ray tracing - partial derivatives for texture lookup

I'm doing some ray tracing on GPU using a fragment shader... How can I calculate texture coordinates partial derivatives with respect to screen coordinates so I could perform filtered texture lookup ...
2
votes
1answer
200 views

Vector Math for Raytracer

So i am working through the book "Raytracing in one weekend". At the point where i am at we want to check if a ray hits a sphere. For that we have the equation: ...
5
votes
1answer
108 views

How to prevent moire artifacts in this light casting algorithm?

I am writing a 2D light casting algorithm with OpenGL compute shaders. The algorithm is simple: For each light source shoot out light rays from it, the ray begins at the light coordinates, it ends at ...