Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
81 views

Ray tracing in One weeked: issue with metal reflection

Problem I am following the book Ray tracing in one weekend , and I got stuck after the implementation of the material Metal. I checked my code many times, and it looks exactly like the code ...
0
votes
0answers
39 views

Optimizing sphere tracing, ray-traced hulls vs. gradient volumes

My rendering engine uses sphere-traced SDFs for surface representation and path-tracing for shading, so fast intersection times are important. I'm creating lots of organic/procedural surfaces, so I ...
0
votes
2answers
66 views

How to set equivalent PDFs for cosine-weighted and uniform-sampled hemispheres?

I'm trying to add BRDFs to a very basic path tracer. Starting out, I'd like to convert just the Lambertian material, with two different sampling methods, to ensure that everything is working right. ...
2
votes
1answer
56 views

Bump mapping with triangles and height maps

I'm trying to add bump mapping to my ray tracer, and I'm currently struggling to add bump mapping to it, as I don't seem to get the transformations from texture space to world space correctly. I have ...
1
vote
3answers
196 views

How to calculate ray

In ray-tracing technique critical point is to calculate rays which came out from eye $E$ to target $T$ through pixel $P_{ij}$ on viewport. The "viewport" is represented as rectangle divided to square ...
1
vote
1answer
118 views

Get intersection Ray with square

I have a class Ray and Square public class Rayo { public Point origen; public Vector direction; Square{ X,Y,Widht, height; } I need intersection between this ...
2
votes
1answer
71 views

Rendering Equation for photons carrying flux

I am trying to understand the mathematical/physical foundations of photon mapping better. In the forward photon tracing step it is established, that the rays are carrying portions of total power (...
2
votes
1answer
80 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
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 ...
2
votes
2answers
56 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
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 ...
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 ...
3
votes
0answers
109 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 ...
8
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
143 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
111 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
97 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
43 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
64 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
61 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
61 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, ...
2
votes
1answer
100 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
1answer
87 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
123 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
127 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
157 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
125 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
135 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
127 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 ...
2
votes
1answer
286 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 ...
3
votes
1answer
245 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
131 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/...
2
votes
1answer
151 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
112 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
118 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
45 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 ...
5
votes
1answer
1k 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 ...
3
votes
0answers
188 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
40 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
170 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
138 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
54 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
226 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
91 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
184 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
74 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
201 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
609 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
242 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
309 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?