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]

a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects

0
votes
1answer
58 views

Nvidia RTX ray tracing OpenGL extension

I can't seem to find any OpenGL headers for the RTX ray tracing extension, seems like they only want you to use Vulkan and optix with RTX
0
votes
0answers
27 views

Picking object using ray tracer in opengl using inverses

I have a scene with many objects and I'd like to be able to pick them out using ray tracing. I used to have just model transformations happening in the vertex shader and I was able to pick out the ...
0
votes
0answers
21 views

Raytracing infinite hair strand in modulo space (curly version)

I'm working on a hack for hair rendering, I basically trace modulo voxel to get infinite grid intersection. It's basically a division from the entry point to the hair center using the delta of the ...
0
votes
0answers
39 views

Explanation Morgan's McGuire Screen Space Ray Tracing method

I tried to implement the Morgan's McGuire method, but my attempts failed. He described his method here: Screen Space Ray Tracing. Below is my code and screenshot. SSLR fragment shader: ...
0
votes
0answers
40 views

ray intersection of surfaces created by swiping a curve (shader)

What I want is to swipe any curve into a plane, axis aligned. I made 2d intersection of the cross section then the 2d hieght extruded: - first I want to compute ex: the xz intersections - then using ...
0
votes
0answers
35 views

Ray Sphere Interesection Distances WRONG

The discriminant is not working. This code produces incorrect distances from ray to sphere, but it can tell whether or not the ray does strike the sphere. HOW HARD IS THIS I'VE BEEN TRYING TO DO THIS ...
0
votes
0answers
33 views

Ray trace problem

...
1
vote
0answers
31 views

Projecting a moon texture to the background

I want to display a 2d moon image to the background. I have a normalized direction for the center location of my moon texture. I also have the normalized view direction from the camera for each pixel. ...
0
votes
0answers
29 views

Issue in projecting mesh onto the image

I have a triangle mesh which I read from ply file and build AABB tree using it. ...
0
votes
0answers
22 views

Ray tracing camera view

Is it possible to change the orientation of the camera ( like Matrix.CreateLookAt) in the context of ray tracing without recalculate all the rays? The problem now is the application would to have ...
0
votes
3answers
582 views

What's the difference between Raytracing and Physically-based-rendering?

I know raytracing is a technique based on the route calculation done by the light, following the rays through the interaction with the surfaces, and that Pbr is a collection of render techniques that ...
0
votes
1answer
91 views

How to make a shattering effect similar to Housemarque's Nex Machina?

After playing Nex Machina for a while, the shattering effect which turns monsters and scenes into cubes really fascinated me and I can't hold my curiosity to explore how they made it. I have tried to ...
4
votes
1answer
85 views

Camera rotation deforms objects

I'm working on a ray-tracer in C++ with an adjustable camera for a university assignment. I'm entirely new with graphics and I'm struggling with one thing. I have a matrix as a mat4 object (4x4 ...
5
votes
3answers
906 views

Ray tracing and Z buffering in graphics

I am a high school student taking computer science as a subject, and someone who is very interested in the game development industry. I am currently writing an essay on Raytracing and Z-buffering by ...
2
votes
1answer
324 views

Voxel traversal intersection float position

I have a 3D grid of cubes, and using the algorithm from this paper http://www.cs.yorku.ca/~amana/research/grid.pdf I've been able to get the integer coordinates of the first tile intersected by a ...
0
votes
1answer
435 views

Calculate 2D tile map tiles within a “field of view” cone

I need to calculate which tiles make up a "cone", originating at my player and extending outward for a specific tile distance. My player can only face North, South, East, West and I'm not sure yet on ...
1
vote
1answer
278 views

Given a point on the surface of an OBB, return normal of the face

So I have this class OBB which implements a test function that determines whether a ray hits it. If it does, a passed in struct ...
2
votes
1answer
79 views

How does one model the sun in a ray tracer?

How is sun modeled when doing ray-traced rendering? Is it part of the scene, like a sphere with a centre in some far location or it is just considered as a point? Also regarding sending shadow rays ...
1
vote
1answer
206 views

DirectX shader - how to spread raytracer computation over multiple frames?

I'm playing around making a shadertoy style SDF raytracer in HLSL and to make it run faster on high resolutions (1080p and up) I'd like to spread the computation over multiple frames. Right now I ...
-1
votes
1answer
88 views

FInd out if AABB is left/right/below or obove a ray

What algorithms are there to find out in which quadrant of the ray an AABB is given a roll value? My idea was to rotate the cube by the negative rotation of the ray and move it by the negative ...
2
votes
1answer
109 views

How to use Bidirectional path tracing on sky dome for rendering indoor

Is it possible to use bidirectional path tracing to render an indoor scene where the light source is skylight(no sun) coming through a window? I think I roughly know how this is done if the light ...
0
votes
1answer
378 views

Calculate distance from the centre to the edge of a cube in OpenGL

I'm trying to calculate the distance between a central point on a cube and anywhere on the surface of the cube, depending on the location of a second 3D point. I have two vertices in 3D; ...
3
votes
1answer
82 views

Hit detection for partially covered object?

Say you have a character standing behind cover such that some of its body parts like a shoe or a palm is still outside the cover. An explosion takes place close to the cover . In real life this ...
4
votes
1answer
111 views

Ray-tracing Moveable Objects

I am fond of creating graphics and animations using the frameworks on the iOS platform; lately, I discovered that, in order to create better visual designs, those higher-level of frameworks do not ...
0
votes
0answers
277 views

How should i go about rendering voxels?

What i would like to do is something like this: And iv'e considered just brute-forcing it with raytracing and octrees and such. However, is it fast enough? What would be the fastest method for ...
0
votes
1answer
33 views

How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar to ...
-1
votes
1answer
613 views

Project camera-to-pixel ray in world coordinates

I'm trying to implement a very simple ray tracing function but I have a problem with projecting the camera ray (from camera to pixel) to the world space. In the screen coordinates have the pixel ...
0
votes
1answer
49 views

Limit Quaternion/vector3 axe in a certain interval

I have some trouble to understand, and handle Quaternion and Vector3. I'm improving the tutorial Tank of Unity: EDIT: Because a video explain so much better, there is a link to the 30 secondes video ...
0
votes
0answers
147 views

How to convert Non-Axis Aligned Bounding Boxes to AABB

I'm trying to write a raytracer to render boxes (cubes) that are arbitrarily rotated, i.e. not necessarily axis aligned. While I'm reasonably comfortable ray-tracing an axis-aligned cube, I don't know ...
2
votes
1answer
121 views

Bidirectional Path Tracing questions

I'm coding a Bidirectional Path Tracing application for school in C++ and I have some questions (I haven't found useful explanations on the web) 1) Why does the EyePath have one more vertex? 2) When ...
4
votes
1answer
110 views

Ray tracing - BRDF using Cornell measured spectral data

I wrote a ray tracer that implements various BRDF models (Oren Nayar, Lamber, Torrance Sparrow and so on). Now I'm trying to implement a BRDF from measured data. I choose the Cornell database data ...
2
votes
2answers
502 views

Efficiency - Cubemap or Raytraced reflection?

I'm an amateur in 3D game development. The thing I want to know is shading related. For reflection purpose, which will be the efficient way? Either "Realtime render to Cubemap" or "Ray trace based" ...
3
votes
1answer
92 views

How can I calculate the U,V texture coordinates on a disk at infinity given only a view vector and a vector pointing to the disk's center?

I'm using an approach similar to Bruneton's paper on atmospheric scattering for rendering my sky and am trying to extend it to add a textured moon. Long story short, the paper works by essentially ...
3
votes
2answers
2k views

How do I test for intersection between a ray and a cone?

I decided that writing a ray-tracer in my game was a brilliant idea, and so now I am looking for code to use for ray to primitive intersection tests. I have based my effort on this very nimble yet ...
9
votes
3answers
555 views

BRDF and Spherical coordinate in ray tracing

I developed a ray tracer that use standard phong/blinn phong lighting model. Now I'm modifying it to support physically based rendering, so I'm implementing various BRDF models. At the moment I'm ...
0
votes
2answers
118 views

Poor CUDA performance, raytracing

I use CUDA 7.5 to learn the basics of raytracing. So far I've done nothing but constant color no-lighting spheres-only raytracing. But my delta time is already 14 - 16 ms for 800x600 resolution - 1 ...
0
votes
1answer
587 views

Getting ray using gluUnProject or inverted MVP matrix

I've read a lot of topics here, on SO, opengl.org etc. Example how gluUnProject should work (from NeHe tutorial): ...
1
vote
2answers
250 views

Cursor position to a 3D ray using angles

I've been stuck for a month trying to get gluUnProject working. After my attempts to use gluUnProject failed (as well as attempts to implement gluUnProject functionality manually) I implemented method ...
1
vote
1answer
563 views

Ray tracing - glossy reflection

Here I am again with my ray tracer for ipad. Now I'm trying to add glossy reflection to an object. How do i implement it? I read some documentation online like these: http://www.cs.cmu.edu/afs/cs/...
1
vote
2answers
458 views

Raypicking / raytracing in OpenGL

Alright, so before you down vote saying that OpenGL doesn't support rays for rendering, please read: So I want to detect a quad in opengl 1.1( I don't want to use opengl 3.0). I wanted to detect it ...
0
votes
1answer
126 views

Ray tracing - texture and phong lighting

Other questione releated to my ray tracer implementation for iPad. If I have a polygon that has a texture and a material, how do I calculate the color using Phong lighting model? Is the texture used ...
2
votes
1answer
738 views

Ray tracing - draw polygon (square/bounded plane)

I'm going on with my own ray tracer as an iPad app for a school project. This is the result with soft shadow, antialiasing, pure reflective and pure transparent object: Now i want to change the ...
1
vote
1answer
2k views

Ray tracing - soft shadow

I'm implementing my own ray tracer as an iPad app for a school project. At the moment this is the result: I need to add the last requirement, soft shadows, but I can't find a complete reference ...
2
votes
1answer
932 views

Simple Doom style engine question

I've just started making a 'raycast' engine, a pseudo 3D FPS engine similar to Wolfenstein/Doom. I haven't done much reading so my implementation is likely very naive. My current working prototype ...
0
votes
0answers
101 views

A simple “beam tracing” simulation

I am trying to implement a simple beam tracing simulation. Basically it models the path of a beam within a pipe: In the picture, the beam starts emitting from p1, hitting the boundary at p2 and ...
2
votes
1answer
556 views

C++ Ray Traversing in 3D Voxel game

I'm currently working on a Voxel game in 3D and need a tad bit of help to figure out what Voxel the player is looking at. This is the data I currently have: ...
0
votes
1answer
6k views

How to calculate ray polygon intersection? [duplicate]

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
0
votes
0answers
614 views

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
8
votes
1answer
369 views

Specular banding with high specular power

We're having some issues with our ray tracing in DirectX, especially with some serious banding issues with specular. With high specular power (above 8) banding starts. I'm wondering if this is an HDR/...
0
votes
1answer
316 views

Degenerate AABB (axis aligned bounding box), does this always intersect?

I'm studying ray-AABB intersections and I'm asking myself: what would happen if one of the dimensions of the axis aligned bounding box was degenerated? For instance: ...