r/raytracing

90s Ray Tracing
â–² 56 r/raytracing+1 crossposts

90s Ray Tracing

Just rendered with "old" Imagine 2.0 for Windows.
THERE IS NOTHING LIKE SPHERES AND REFLECTIONS to take me back in 90s mood 😄

u/luminimattia — 3 days ago
â–² 49 r/raytracing+1 crossposts

Done implementing raytracing in my ship building game

Takes a few seconds to render but well worth it !

Also I use HDRP and could not find a good way to have an infinite ocean which works with path tracing, so I can only use a large flat plane for now, if you guys know about solutions for this issue I'm all ears.

u/Myrmecoman — 6 days ago
â–² 31 r/raytracing+2 crossposts

A python-numba based ray tracer

This is python-numba based ray tracer, along with a BVH implementation.

This ray tracer can render this image, with 1080p quality, 16 rays per pixel, 5 bounces per ray, in a bit less than 5 minutes. What do you guys think?

The repo for this project is available at https://github.com/RonnyGN/RayTraceTriangles, people can find the documentation in the README.md of this repo, along with somewhat well written comments throughout the project.

u/Busy-Astronaut8118 — 5 days ago
â–² 57 r/raytracing+1 crossposts

Experimental real-time path tracing in Metal: ReSTIR-style sampling, path reservoirs, and capture overhead

I’ve been experimenting Real Time Path Tracing on my Metal Path Tracer project.

Current pieces:

  • Wavefront path tracing architecture
  • ReSTIR DI / ReGIR hybrid experiments
  • Path reservoirs
  • Radiance cache
  • Path guiding
  • Aggressive denoising
  • 720p interactive rendering
  • Scenes: Living Room, San Miguel, Bistro.

One practical issue I hit: macOS native screen recording adds enough overhead that heavy scenes no longer represent the actual interactive experience. OBS seems less disruptive in my tests, so the video is qualitative only.

For context, I previously posted about this Metal path tracer here:

Link

The current branch/repository is not public yet, so I’m not linking source code for this update.

Many thanks

u/dariopagliaricci — 7 days ago
â–² 10 r/raytracing

Low resolution real-time ray tracing

Hello, I am a former hobbyist game dev.

Due to unforeseen circumstances, I had to stop programming and have decided to start again.

The forthcoming query is merely out of curiosity, my understanding of graphics programming is as good as non-existent.

I have seen that ray tracing is computationally intensive. This is true for rasterisation as well, thus GPUs are used on account of their ability to run instructions in parallel.

I found this demo by Mr. Binji.

https://binji.github.io/raw-wasm/raytrace/

I am planning to create an FPS LAN multiplayer on Wifi in the style of the image attached in the post and the demo in the link (Pixelated outlines, may be low poly but soft bodies and sphere too,) I am hoping for low resolution, something around 640x480 or 320x240 or even less.

I am curious about the viability of ray tracing at these resolutions. More so when software rendered.

Thanks!

Update 1:

I have learned linear algebra these past few days. I am now able to understand all the concepts in Mr. Binji's code. I am also able to keep up with 'raytracing in a weekend'.

I conclusion, i have found that graphics programming becomes much simpler, atleast conceptually,once you understand all the mathematical transformation which are undergoing to obtain the final image. Partly because the entire process becomes incredibly compact.

I meant, for raytracing, the process is just his simple:

1.Take a ray from camera through pixel on screen to the world.

Problem: pixel is screen space,

Sol:transform it to camera's relative space.

How first normalise the coordinates

x/w,y/h

Then shift the origin to the center

x/w-0.5,y/h-0.5( since x and y are now in 0 to 1 range, 0.5 is exactly half)

But!

The y axis is inverted

So we mul by -1

X'= x/w-0.5,Y'= 0.5-y/h

Now just solve intersection of C+t(X',Y') with the scene geometry, get the point of intersection, take dot product of normal and ray from point to light source, this gives a scalar value, 'brightness'

Take another ray from this point to light source, if it is intersected, point is in shadow, so don't light or up.

Then from this point shoot a ray again, reflection of the primary ray and repeats to the no. Of bounces you need while reducing the colour contribution each time

----------------------------------------------------------------------------------------

-- do after you have done step 1 above

ray=vec3(0,0,0)

scale=1.0

--calc hit, light & shadow, shoot ray n times

for i in 3:

hitpoint=hit(ray,objects)

if not hitpoint:

color=bg*scale,break¹

light

shadow

ray=reflect(ray,normal)

scale*=0.2

----------------------------------------------------------------------------------------

u/NoEmergency1252 — 11 days ago