raytracing Questions

4

Solved

I'm writing a ray tracer in java and I'm trying to implement refraction, but I'm getting confused by the information I'm finding on the subject. If I have a 3D vector for the incoming ray of light,...
Broddy asked 20/4, 2015 at 21:15

6

Solved

I am trying to determine whether a line segment (i.e. between two points) intersects a sphere. I am not interested in the position of the intersection, just whether or not the segment intersects th...
Selwyn asked 14/1, 2010 at 5:10

2

Solved

Trying to write the following recursive call: vec3 trace(vec3 origin, vec3 direction, vec3 illum, int order) { float dist; int s_index = getSphereIntersect(origin, direction, dist); //if lig...
Sandie asked 25/4, 2017 at 4:20

3

I am doing ray tracing and I do the refraction of the ray using the following relation (I got it from PDF called "Reflections and Refractions in Ray Tracing"): But I have seen it in another PDF...
Broome asked 23/10, 2013 at 17:25

3

Solved

For a ray tracer project, I've been researching algorithms dealing with finding the intersection between rays and triangles (defined by three vertices). What I've found so far is that the Möller-Tr...
Waverly asked 31/5, 2017 at 3:31

6

Solved

So I'm at a point that I should begin lighting my flatly colored models. The test application is a test case for the implementation of only latest methods so I realized that ideally it should be im...
Reeducate asked 8/9, 2010 at 11:28

1

I've implemented a SAH kd-tree based upon the paper On building fast kd-Trees for Ray Tracing, and on doing that in O(N log N) by Wald and Havran. Note I haven't done their splicing and merging sug...
Lull asked 28/7, 2016 at 13:14

2

Solved

I'm working with Python/numpy/scipy to write a small ray tracer. Surfaces are modelled as two-dimensional functions giving a height above a normal plane. I reduced the problem of finding the point ...
Sundown asked 26/10, 2012 at 13:43

2

Solved

I am testing if a ray intersects a triangle. For the time being, I'm using the following code to test if there is an intersection between a triangle, and the ray from origin to the midpoint of the ...
Aldredge asked 27/1, 2015 at 7:47

1

Solved

As far as I know, all the techniques mentioned in the title are rendering algorithms that seem quite similar. All ray based techniques seem to revolve about casting rays through each pixel of an im...
Ruben asked 1/5, 2021 at 14:10

1

Solved

I recently wrote a compile-time ray tracer using constexpr functions with C++17. The full source code can be seen here. The relevant code for this question looks like this: constexpr auto image = [...
Detradetract asked 30/3, 2021 at 19:34

1

Solved

I have tried to write a simple ray tracer in the fragment shader. I have this function that is supposed to create a diffuse sphere as follows : Here is the function : vec3 GetRayColor(Ray ray) { R...
Exhilarant asked 6/1, 2021 at 14:51

1

Solved

According to my understanding, modern computer monitors mainly display images in raster ways, that is, what we see on the screen are all dots or pixels. What confused me is that we often said ray t...
Delitescence asked 24/11, 2020 at 19:19

2

Solved

I am working on a ray tracer and I got around to adding cylinders to the scene. The point I am stuck at is finding the surface normal vector in the point the ray hits. I need this to be able to do ...
Unstick asked 28/3, 2016 at 16:21

5

I've been looking at Kevin Beason's path tracer "smallpt" (http://www.kevinbeason.com/smallpt/) and have a question regarding the mirror reflection calculation (line 62). My understanding of the r...
Bazan asked 16/3, 2014 at 1:29

1

Solved

[Please look at the edit below, the solution to the question could simply be there] I'm trying to learn OpenCL through the study of a small ray tracer (see the code below, from this link). I don't ...
Brauer asked 8/10, 2020 at 8:25

1

I am trying to write a real time ray tracer using compute shaders in opengl 4.3. I know that this is a rather popular question. I have checked this, and this, but the architecture provided over th...
Hanway asked 27/5, 2020 at 8:2

2

Solved

I've been working on my raytracer again. I added reflection and multithreading support. Currently I am working on adding refractions, but its only half working. As you can see, there is a center ...
Maggard asked 28/9, 2014 at 16:35

4

Solved

How do I calculate the intersection between a ray and a plane? The following code produces the wrong results. float denom = normal.dot(ray.direction); if (denom > 0) { float t = -((center - ra...
Hemotherapy asked 31/5, 2014 at 23:59

2

Often, we see the following picture when talking about ray tracing. Here, I see the Z axis as the sort of direction if the camera pointed straight ahead, and the XY grid as the grid that the cam...
Arnettaarnette asked 14/9, 2019 at 5:12

1

Solved

I am trying to ray trace a sphere inside a cube. The cube is simply constructed out of 12 triangles with normals. The cube has unit coordinates and unit normals. So within its local space (between...
Suds asked 21/7, 2019 at 14:14

1

Solved

I am currently working on a basic raytracing program using C, and i have managed to so some simple shapes ex, sphere/box/plane/cone/..., and i also did some shading to them using phong illumination...
Gerdagerdeen asked 21/7, 2019 at 16:20

4

Solved

I am looking for acknowledgement on my perception of a method regarding determining whether a point is located inside a triangle or not in 3D. Given a ray in the form R(t) = e + td and a set of th...
Hillard asked 31/5, 2016 at 12:5

4

Solved

I'm dusting off an old project of mine. One of the things it had to do was -- given a Cartesian grid system, and two squares on the grid, find a list of all squares that a line joining the center o...
Megaphone asked 13/7, 2010 at 1:16

2

Solved

I am attempting to call one of many functions based on the value of a variable. The variable is set during runtime, so code on the CPU will not work. Using an if/switch statement will be slow due t...
Arkwright asked 25/12, 2015 at 23:41

© 2022 - 2025 — McMap. All rights reserved.