POV-Ray : Newsgroups : povray.off-topic : The Raysnail - WIP, a probability based raytracer with (limited) support for PovRay SDL files : The Raysnail - WIP, a probability based raytracer with (limited) support for PovRay SDL files Server Time
12 Oct 2024 18:03:47 EDT (-0400)
  The Raysnail - WIP, a probability based raytracer with (limited) support for PovRay SDL files  
From: Hj  Malthaner
Date: 17 Jul 2024 12:07:12
Message: <6697ec30$1@news.povray.org>
I've been using PovRay for many years, and I want to say I'm very happy 
about the 3.8 release. Thanks a lot for that!

Something though that I had been missing in PovRay is what is known as 
global illumination or path based lighting. Radiosity, supported by 
PovRay, is very similar, but not quite the same.

First I've been looking into PovRay's sources to see if I can add such a 
feature. But at the time I knew too little about both, PovRay coding and 
the math behind path based lighting. So I put that idea to rest.

Recently I found a series of lectures, starting with "Raytracing in one 
Weekend". It came with example code simple enough for me to understand. 
But the real stunning point was, the third series of lectures was just 
about what I had been looking for -  Monte Carlo integration of incoming 
light and path based lighting (unidirectional). Aptly named "The rest of 
your life."

Since some months I'm trying to learn Rust, and found that someone had 
translated the example code (C++) from the first two lecture seasons to 
Rust. So I tried to get my brain working once more and implement the 
features of the third lecture season by myself. Much headache, I'm bad 
at this sort of math, but it works now. Some examples are here:

https://github.com/Varkalandar/raysnail/wiki/Raysnail-Render-Examples

Now I had an Raytracer with the desired feature, admittedly a very 
simple one. But I also had a lot of PovRay scene files which I had 
written over more than a decade. I wanted to continue using these, or at 
least continue in a similar manner.

And that's why I am posting here, it could be of interest for you. I've 
started to implement a parser for PovRay scene files. It can't parse 
much yet, but there are no technical limits on that level, it just takes 
time to expand the parser. PovRay SDL is huge.

Here is an example file that the parser can read right now:
https://github.com/Varkalandar/raysnail/blob/e248884b4eb38f1d0f0dab8bca592c05516a5dde/sdl/example.sdl

The Raysnail will render this result from it:
https://private-user-images.githubusercontent.com/62077919/349234580-362117c3-13d9-44ce-a770-0a04d76021f3.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMzE0NzQsIm5iZiI6MTcyMTIzMTE3NCwicGF0aCI6Ii82MjA3NzkxOS8zNDkyMzQ1ODAtMzYyMTE3YzMtMTNkOS00NGNlLWE3NzAtMGEwNGQ3NjAyMWYzLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE1NDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwMmZlY2VmNTc5NzA3NTExMDQ4NWRiZDM4OWUzY2E5NWQ5YmMzOTlmZjk5NmVjZGU2ZjNhNDZiMGEzYzJmNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.M5Dyb6tp2I3chY8uO2nfikF-8xV2n4akmlvWGeV0dmQ

If the link doesn't work, please go here and scroll to the bottom of the 
page, the image is included in the examples:
https://github.com/Varkalandar/raysnail/wiki/Raysnail-Render-Examples

So far so good ... but there are also many issues. One is, that I don't 
think I can emulate PovRay materials one to one. I can emulate a lot, 
but there will be differences, based in the different approaches that 
PovRay and the Raysnail implement to handle materials.

Other problems are that typical lights in PovRay are point lights, 
infinitely small and invisible. The Raysnail needs lights with a certain 
size to work. I likely can emulate PovRay lights by having really tiny 
lights in the Raysnail, but they will still be visible as bright dots.

Long message. In short, I have a raytracer in the works. I am trying to 
support PovRay scene files as good as I can. If you are interested in 
this project, or have any sort of feedback, please let me know.

The code is here, not really cleaned up, but well, it's what I have:
https://github.com/Varkalandar/raysnail

Thank you for reading.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.