🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Path tracing in Vulkan

Started by
116 comments, last by taby 8 months, 3 weeks ago

taby said:
I got the cosine-weighted rays working:

Looks good - are you doing explicit sampling, or each ray waits until light is hit?

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Advertisement

Thanks. I am currently doing explicit sampling, I think.

The full source is at:

https://github.com/sjhalayka/cornell_box_textured/blob/main/raygen.rgen

Yay!

Looks good - it still seems to be a bit bright to me (it can be okay though - I might be a bit blind on this one though, and very subjective in my case). Do you use any kind of tone mapping? Also, the caustics doesn't seem correct to me (center is too reddish, and going away towards blue - assuming that material of sphere is glass though (IoR 1.55)).

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

It is not pure white because there Is chromatic aberration. I will use the same parameters for the 3 channels and send you a screenshot, when I am home. 🙂

P.S. thanks for your time and expertise.

Alright:

I tried to approx build quick scene in someone's implementation of smallpt, this is the result you should get with the colors you have (used the ones in the image file - which are full red, full blue and full white). One refractive and one reflective sphere, also blue on the left, red on the right. This is done in smallpt (well… the GPU variant). I'd recommend you to build the same scene even with smallpt that runs on CPU (or similar implementation), and let it run with enough iterations. Use that as your ground truth and compare against it. You don't need to do PMSE or such metric - just to compare the colors.

At least that's the approach I've chosen when working with GI algorithms.

Note: Your red/blue wall should stay fully red/blue no matter what (as long as those are really from the texture, i.e. red being (1,0,0) and blue being (0,0,1)) - there is no way for those to get any white-ish color under normal circumstances. Of course I might be wrong and that data source are not materials or they're processed in a different way!

EDIT: And this is related to note - in real world perfect materials that have absolute absorption in any channel does NOT exist, this is why I often use (in Cornell box tests) materials colored with red being (0.8, 0.2, 0.2) or such. You might be doing that too. That's often reason why the walls get ‘white-ish’ in terms of color.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Indeed, the colour is reduced in saturation. maybe I’ll figure that out next. thank you for the guidance.

Yes, if the refraction is wavelength-independent, it forms pools of pure white.

I see, it might be interesting if you do that with prisms (you may end up with dispersion effect).

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Better, or worse?

This topic is closed to new replies.

Advertisement