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

Questions tagged [raytracing]

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

1
vote
1answer
37 views

How do I convert a hit on an infinite plane to UV coordinates for texturing in a Raytracer?

I am trying to convert a ray hit on an infinite plane, defined by an origin and a normal vector, into UV coordinates, so I can find the appropriate texel at that point. Code I have is close to ...
6
votes
1answer
83 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 ...
2
votes
2answers
47 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/...
0
votes
0answers
18 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 ...
3
votes
1answer
115 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
90 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 ...
7
votes
1answer
3k views

Raytracing: why are the spheres in the image below appear stretched?

Some context. Above are the code and the resulting image for it in Peter Shirley's Raytracing in one weekend's book. As you can see from the code, he adds in some spheres. And yet in the final image ...
5
votes
0answers
130 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 ...
1
vote
1answer
92 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 ...
3
votes
1answer
92 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, ...
1
vote
0answers
34 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 ...
1
vote
1answer
60 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 ...
1
vote
0answers
53 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 ...
2
votes
1answer
58 views

How do we approximate the integral of the measurement contribution function in Metropolis Light Transport?

In Metropolis Light Transport, we need to approximate the integral of the measurement contribution function. I've read that this can be done using a traditional approach like path tracing. However, ...
0
votes
0answers
71 views

What is wrong with this GGX sampling function?

I wrote a small Shadertoy path-tracer a few days ago to teach myself PBR transmission/reflection, and I decided to use Heitz's microfacet sampling model since it's cleaner than the one in PBRT. I'm ...
2
votes
1answer
94 views

How can we convert a probability density according to solid angle to a density according to area?

In Chapter 14.5.3 of Physically Based Rendering - From Theory to Implementation (3rd edition), the authors claim that a probability density $p_\omega$ according to solid angle can be converted to a ...
0
votes
0answers
37 views

What's the definition of the “emitted importance” in the measurement equation?

Let $M$ denote the set of all surfaces in the scene $\nu_M(x)$ denote the unit outer normal$^1$ at $x\in M$ $\Omega_x$ denote the upper unit hemisphere at $x\in M$ oriented according to $\nu_M(x)$ $\...
0
votes
1answer
71 views

How does Primary Sample Space Metropolis Light Transport work?

For simplicity, assume we're only dealing with surfaces which have either a Lambertian or perfectly specular material. Morever, assume that the only type of lights are area lights (i.e. surfaces with ...
2
votes
1answer
81 views

Light field rendering for 3d software?

Is there any 3d software that supports rendering an artificial scene to a light field image? With that I mean an image capturing light from more than one point in a scene, more lika a spherical ...
0
votes
1answer
99 views

OpenCL ray tracer: which is better, geometry code on device side or on host side?

I am writing a ray tracer using openCL, and following this tutorial http://raytracey.blogspot.com/2016/11/opencl-path-tracing-tutorial-2-path.html However, I find that the author has two copies of the ...
1
vote
1answer
137 views

Problem of understanding the coordinate systems involved in ray tracing

This picture depicts my current immagination of the coordinate systems involved in ray tracing: Explanation: So the green rectangle is the [-0.5, nx-0.5] x [-0.5, ny-0.5] coordinate system and you ...
4
votes
1answer
103 views

Using multiply and accumulate of 4x4 matrices for ray-triangle intersection tests on GPU

Is it possible to gain performance boost using new 4x4 MAD from NVIDIA'a tensor cores for ray-triangle intersection tests? Really there are two questions: Is it possible to modify some of the ray-...
3
votes
1answer
119 views

Is there ongoing research on Markov Chain Monte Carlo algorithms (other than Metropolis-Hastings) for use in ray tracing?

Metropolis Light Transport is an application of the Metropolis-Hastings algorithm. Its variants differ only in the used "mutation strategy". Is there ongoing research on other Markov Chain Monte ...
0
votes
1answer
112 views

Bright artifacts in ray tracer rendering seemingly caused by reflections

I've been working on a new ray tracer recently, but after adding reflections I'm seeing these strange small highlights on my models, particularly on the ear of the silver rabbit below. I've read ...
1
vote
1answer
161 views

How does a path tracer with next-event estimation work?

I am trying to implement a simple path tracer with next-event estimation in Java. The general idea is to trace a ray through the scene as usual (using a cosine distribution to determine the next ...
0
votes
0answers
79 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
212 views

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
119 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 ...
2
votes
1answer
125 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
74 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
83 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 ...
4
votes
1answer
713 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
180 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
37 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
122 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
135 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
45 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
126 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
74 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
158 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
66 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
160 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
449 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
147 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
240 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
113 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
60 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
134 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 ...