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
95 questions
1
vote
1
answer
173
views
How the intersection of BVH boxes can determine whether or not a triangle appears?
I'm programming a Ray Tracer using Rust and OpenGL, I've already made Ray Tracing work in the basics by converting the data to an SSBO and sending it to the Shader in a basic way... The problem is ...
2
votes
0
answers
160
views
What is wrong with my path tracer in Vulkan?
I wonder whether some of you have ever stumbled upon the same problem as I have. I am trying to write a simple path tracer in Vulkan, using only diffuse BRDF for now until everything works as intended....
0
votes
1
answer
149
views
what is "viewport" mentioned in the raytracing in one weekend book?
I'm trying to make a simple raytracer following the raytracing in one weekend book, but I couldn't understand why is he using what is called a viewport, he define it as a virtual rectangle, why don't ...
1
vote
0
answers
72
views
Cannot transform vectors from viewport to world
I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions.
However, i stumbled upon a very ...
0
votes
0
answers
80
views
Implicitly ray traced cone texture mapping -- Trying to avoid atan
I am kinda looking for some ways out of this little rabbit hole.
I wanted to experiment with high fidelity per pixel cone drawing and shading. I have an application (radar) that really only needs cone ...
0
votes
0
answers
47
views
Ray-Sphere Intersection Always States Ray Origin Is Point Nearest Sphere Center
I am writing a simple graphics engine using Rusts WGPU. I have a Sphere rendering at the origin of my scene like so:
...
2
votes
1
answer
166
views
How should I bind various types of material data to the ray tracing rendering pipeline in DirectX12?
My problem is a bit complicated. When doing ray tracing rendering, all data in the scene needs to be prepared. In addition to texture resources, each object to be rendered will also have its own ...
0
votes
0
answers
72
views
INSANE Slowdown when implementing MSAA
I am trying to implement MSAA in my very simple raytracer. However, when I do, my program gets and insane slowdown. I am working in Metal, and on the Metal HUD, I can see that my frametimes drop from ...
0
votes
1
answer
145
views
Transforming a ray to NDC coordinates
I am trying to have ray tracing with a mesh using NanoRT and I want to be able to allow for a model transform on top of my view and projection transforms.
I have successfully transformed my ray from ...
1
vote
0
answers
845
views
More performant 2D raytracing than Radiosity?
Currently if you want real-time 2D ray-traced scene lighting, you're limited to a few options: geometry based SDFs or Scene Based Radiosity. However 2D Radiosity is really the only choice if your game ...
1
vote
0
answers
432
views
How can transparency be implemented in a Minecraft-like game without sorting the vertices?
I'm working on a minecraft clone with OpenGL and I've been trying to implement the rendering of textures with transparency for several days now with out succes.
What techniques can be used to achieve ...
1
vote
0
answers
69
views
how to efficiently raytrace a rectangle side in 8bits without mul and div?
Imagine you are on a hardware that is 8bits like the nes or the game boy,
NO mul no div, only add and shift.
Given a rectangle or integer size nk*mk,
where k is the size of the underlying grid, and P ...
1
vote
2
answers
298
views
I'm following a tutorial but I don't get the same result; why are the raytraced shadows not working?
I followed this tutorial called "Ray Tracing in One Weekend" by Peter Shirley. And I implemented the java version of it for studying Ray Tracing.
Everything was all right until Diffuse ...
2
votes
0
answers
157
views
Struggling with 3D math concepts. Would like practice [closed]
Hello fellow game developers!
I graduate this October with my Bachelor’s of Game Programming and Development. I took the required Calculus and Linear Algebra. While I passed the classes I feel like I ...
0
votes
1
answer
717
views
Is ray tracing performance dependent on polygon count
I want to know if mesh polygon count affects raytracing performance, by Raytracing I mean Nvidia's RTX or similar hardware accelerated raytracing.
So If I have a scene with high poly objects and total ...
0
votes
1
answer
187
views
Moving the bulk of a recursive ray tracer function to the gpu, using DirectX12 not DirectX 12 DXR HLSL
So I'm wanting to generate images by ray tracing. I've done so, but the main ray function is recursive. I know one can make a non recursive function out of a recursive function using a stack, but is ...
0
votes
1
answer
576
views
Compile shader and root signature of a ray tracing shader into a single binary using DXC
I'm new to DXR, so please
If I got it right, when we want to compile a ray tracing shader using the DirectX Shader Compiler, we need to specify lib_6_* as the ...
0
votes
1
answer
1k
views
Specifying a root signature in the HLSL code of a DXR shader
I've noticed that I cannot specify a root signature in the HLSL code of a DXR shader. For example, if I got a ray generation shader with the following declaration
...
0
votes
2
answers
567
views
Ray tracing the Next Week - Cornell Box
I'm so excited to learn ray tracing and did a lot of fun. But I'm stuck at rendering empty Cornell Box scene.
It has some darker color along the bright color and it's seem different with the image in ...
1
vote
1
answer
633
views
Determining first voxel ray intersects
I'm trying to implement the Fast Voxel Traversal Algorithm on a uniform grid of axis-aligned rectangles. Having read the paper, I understand how the traversing works, but not the initialization. I've ...
0
votes
1
answer
59
views
Texture uniform does not work
So im programming a raytracer at the moment and Im passing a 3d texture from the cpu to the gpu but the gpus texture has not the same values
The uniform part (its made in Unity):
...
0
votes
2
answers
1k
views
Rotating camera in 3D without yawing diagonally
I'm programming a C raytracer. I'm having trouble getting the camera to rotate the way I intend.
I would like the camera to rotate by pressing keys:
F & H rotate left & right around the world'...
1
vote
1
answer
1k
views
Ray-Box (AABB) is slower than without
I'm trying to write my own ray tracer. The last days I tried implementing a bounding box algorithm for it. But I'm getting a much slower frame rate with the bounding boxes turned on. I think it has ...
0
votes
0
answers
154
views
What is the most efficient way to find hit point of BOX and internal Ray?
most efficient AABB vs Ray collision algorithms
I found this topic on AABB ray test. Some of them could find hit point of external Ray and BOX.
I did my version for both external and internal ray, but ...
3
votes
1
answer
863
views
Rotate Object in world space - Raytracing
I’m programming a C raytracing project.
I’ve been wanting to implement object rotations (square, cylinder) for several days but I can’t do it.
For each object I have its position (x, y, z) in the ...
1
vote
1
answer
537
views
intersection of primitive in a unit wrapping 3D space
is there people good enough for a math problem (for a shader)?
I want to write an algorithm that would intersect primitives (triangles, squares, circle, sphere, cube, cylinder) inside a unit wrapping ...
0
votes
2
answers
443
views
Why don't raytracing algorithms include the speed of light?
From what I understand about ray-tracing, it is instantaneous in its speed from the light source to the user. Is there a type of ray-tracing where the "rays" move at the speed of light or are affected ...
0
votes
2
answers
163
views
What is the most efficient way to trigger an action based on proximity?
I am developing a 3rd person platformer that entails a grapple hook system.
This grapple hook system relies on a series of 'grapple-able' points.
I would like these points to shine every so often.
...
27
votes
2
answers
9k
views
Why do some games show lights shine through walls?
In some games, I see lights shining through walls, even if I set video quality on high levels.
A couple of examples of games I recently played are Borderlands 2 (missile explosions) and Call of ...
0
votes
1
answer
237
views
understanding the basics of raytracing
I have got a sphere in my world space. I don't understand how can i find my sphere using my X and Y on my screen, because i don't understand what the value Z of my ray assuming the fact that we use ...
0
votes
1
answer
103
views
Displaying debug line in custom raytracer implementation
Not sure if I should post this here or on the Math forum, but I will try my luck.
Some background. I made my custom raytracer. The processing happens purely on the CPU for now, no GPU interaction ...
0
votes
3
answers
424
views
How does real-time raytracing draw reflections of off-screen geometry?
I know what raytracing is, but I'm a bit curious how games are able to reflect off-screen geometry using raytracing in real-time.
I tried looking up the technical details but most of the articles are ...
4
votes
0
answers
206
views
How does raytracing triangle meshes with RTX work internally?
Raytracing a huge bunch of triangles the naive way (ie. testing each ray against every single triangle) would be humongously slow, which is why raytracers use optimizations to greatly reduce the ...
0
votes
1
answer
870
views
How do I test for intersection of a ray and part of a capped cone / cone frustum?
The formulas to calculate the intersection between a ray and a capped cone / cone frustum are already widely known (see http://lousodrome.net/blog/light/2017/01/03/intersection-of-a-ray-and-a-cone/ or ...
3
votes
2
answers
5k
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
0
answers
88
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 ...
1
vote
0
answers
63
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. ...
1
vote
3
answers
5k
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
1
answer
229
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
1
answer
248
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 ...
4
votes
3
answers
4k
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
1
answer
1k
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 ...
1
vote
1
answer
1k
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
1
answer
601
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
1
answer
179
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 ...
2
votes
1
answer
468
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
1
answer
211
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
1
answer
347
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
1
answer
1k
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; ...
2
votes
1
answer
144
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 ...