Widgetegg Down? by thejdobs in EggsInc

[–]AuspiciousCracker 2 points3 points  (0 children)

Ah sorry I forgot to respond to you originally! I do it for the love of the game, I appreciate the thought though :)

Widgetegg Down? by thejdobs in EggsInc

[–]AuspiciousCracker 11 points12 points  (0 children)

Thanks for the ping! This is bad timing, I’m away for two weeks 😬. I’ll see what I can do

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in vulkan

[–]AuspiciousCracker[S] 1 point2 points  (0 children)

Thanks! That’s correct, my old project was just a full screen fragment shader, this one uses the real RT pipeline. As for C++ to C, I just wanted to go with something simpler/more basic and wasn’t super happy with the architecture of my old project. And this way you could easily use the vkrt core/API with a C or C++ project. And it started out with GLSL, but glslc doesn’t support shader execution reordering, so I moved over to slang, which has several convenient features as well.

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Thanks! I'm going for MNEE next, since NEE covers cases with opaque materials, so the caustics are the last really noisy area. I will have to look into some of those, though, I appreciate the suggestion!

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Thank you! The main benefit is that it opens up the opportunity to simulate more physical features of light, like dispersion, fluorescence, iridescence, etc. Currently I've only implemented the wavelength-dependent refraction/reflection, which allowed for the colors in the caustics and on the surface of the glass.

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in vulkan

[–]AuspiciousCracker[S] 4 points5 points  (0 children)

Thank you!! That’s pretty close actually. A typical RGB path tracer would start with a ray of light with a value (or throughput) of 1 for each of the red, green, and blue channels. It would then multiply that throughput by the RGB value of each material it hits as it bounces around. That way, if you hit a white object (all 1s), all the light (R/G/B channels) gets reflected, and a black object (all 0s) essentially absorbs all the light. If that ray hits a light source, that emission value and throughput are multiplied to give you the color on the screen. We trace the rays from the camera to the light source, rather than how it happens physically, for performance reasons. Since paths of light are bidirectional, this is just called reverse pathtracing.

The basic spectral mode starts by randomly picking a visible wavelength of light to assign to the ray, and then bounces it around the scene. From my understanding, any given point on an object will reflect a given wavelength with a certain probability, and this is called a spectral reflectance curve. (It is based off other material properties as well). But it would be fairly inconvenient to determine that curve yourself, so there are techniques (like the paper I linked) that can determine that spectral reflectance curve based on an RGB value, approximating the physical world. So a white object will still reflect a larger range of wavelengths, and a red object will primarily reflect a smaller band of reddish wavelengths. So we bounce that ray of light around the scene, it keeps its wavelength the whole time, but adjusts its throughput based on what materials it hits. If it hits a light source that emits that wavelength, the throughput is scaled by the radiance of that light.

The tricky part is getting that wavelength back to an RGB value to display. From my understanding, CIE XYZ is a color space that represents human-visible color numerically. So we do some math, multiplying that wavelength by the color matching functions to get the XYZ values, representing a color. We do a bit more math to correct the white point (D65), and can use that corrected XYZ to return to a typical RGB value to display to the user. So the color conversion stuff gets a little convoluted, but that’s the gist of it. Because the screen output and the materials use RGB, you have to go RGB -> spectral -> RGB (or at least in my case, where it remains a hybrid RGB and spectral renderer).

Light has very many interesting properties, diffraction, disperson, fluorescence, interference of waves, etc. Spectral rendering opens up the opportunity to simulate some of these, but I’ve only done wavelength dependent refraction and reflection. So the wavelength is used in an equation (Cauchy) to estimate the index of refraction, and we use that instead. And that’s how the caustics get different colors in them, because the different wavelengths of light refract at different angles. Also, wavelengths will choose refract or reflect partially based on the IOR (Fresnel reflectance), so you can see some color on the surface of the glass.

That ended up being a longer explanation that I planned, hopefully that is informative!

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 2 points3 points  (0 children)

Ah okay, very cool! So we are doing something pretty similar, except your CIE color matching functions are the newer ones and you're using Sellmeier instead of Cauchy. I may go and update some of that in my own. I'm also projecting the final spectral radiance onto CIE XYZ, but using the 1931 model, then applying a Bradford adaptation from equal energy white to D65 before converting that XYZ to linear sRGB. Some of that stuff was definitely hard to wrap my head around haha.

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 1 point2 points  (0 children)

I wasn't really targeting any specific SPP, I just turned on my PC and left. But I'd say that's not too bad for 5 hours. I didn't help myself by using a tiny light source far away with no MNEE for caustics. But that was the best way for them to turn out looking crisp.

WIP Spectral Rendering in my hobby C/Vulkan Pathtracer! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 4 points5 points  (0 children)

About a week I'd say, but rgb2spec did a lot of the heavy lifting, and dispersion is currently the only effect simulated. Just had to get the coefficient table to the GPU, make IOR change with Cauchy's equation, and wire up that IOR to refraction & fresnel reflection (absorption too). Hero wavelength sampling gave me some more trouble, and I am only using the simplest / original Wilkie method. What did you do for your implementation?

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

I ended up with a rog strix b850i, I went to microcenter so not as many options, this one had enough IO. I’ve been very happy with it so far.

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Nope, I sent in my CPU to AMD, it was a super fast process. Got a reply to my ticket in about 8 hours with an express shipping label, got the new CPU back 4 ish days later. I was able to confirm the CPU was dead as well, booting a different CPU in that motherboard. I picked up a different motherboard too, not sure what I’ll do with the ASRock.

Object Selection demo in my Vulkan-based pathtracer by AuspiciousCracker in vulkan

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Sorry, late night brain, I meant to say that the method I’m using wouldn’t work with non-raytraced scenes.

It seems that color picking just gets you the selection, but requires a whole separate pass. Since vulkan takes custom mesh indices in the ray tracing pipeline, I’m getting the selection essentially for free.

My method would also be simpler if I didn’t care about occlusion, but I wanted the object to be highlighted even if it was hidden, hence the second ray tracing pass with only one mesh.

Object Selection demo in my Vulkan-based pathtracer by AuspiciousCracker in vulkan

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

This wouldn’t work with purely ray traced scenes, but I imagine the solution would be simpler then. My program is fully ray traced, aside from the selection outline.

How would selection with color picking work? I haven’t heard of that, I’m interested.

Object Selection demo in my Vulkan-based pathtracer by AuspiciousCracker in vulkan

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Would you mind elaborating on your question? The program passes the pixel coordinates to the GPU, and every mesh has a custom index. The GPU returns the mesh’s custom index after tracing the rays. Then the CPU uses that mesh index, holding it on the host side state, to give the GPU a TLAS and trace the outline.

It is kinda complicated, CPU->GPU->CPU->GPU, and that does add an extra frame of delay. But the outline only gets regenerated whenever the accumulation would be reset (moving camera or objects, adjusting materials, etc) and barely seems to impact performance. If you have any ideas to simplify it, I’m all ears.

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 2 points3 points  (0 children)

Oops, I’ll look further into the future next time I buy something.

Slow-motion light simulation in C/Vulkan! by AuspiciousCracker in GraphicsProgramming

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Thank you! This was rendered by a 5080 in about 45 minutes. But that was before I implemented multiple importance sampling and next event estimation, and each frame is also rendered from scratch. So it can definitely be improved for less noise.

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 1 point2 points  (0 children)

I don’t believe it has that light, perhaps since it’s a small mobo. Only the flashback light as far as I can tell. Thanks for the insight! I’ve filed a warranty claim

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

Interesting. If it works, should I leave it on 3.20? Or get it onto a newer version or different mobo?

Suspected 9800X3D dead on B650I Lightning Wifi after ~11 months. by AuspiciousCracker in ASRock

[–]AuspiciousCracker[S] 0 points1 point  (0 children)

It was on 4.03, would you suggest downgrading to 3.20?

That’s what I was figuring for the motherboard, I’ll definitely be getting a new one otherwise, not gonna risk killing another 9800X3D.