POV-Ray : Newsgroups : povray.off-topic : The Raysnail - WIP, a probability based raytracer with (limited) support for PovRay SDL files : Re: The Raysnail - WIP, a probability based raytracer with (limited) suppor= Server Time
8 Oct 2024 06:15:36 EDT (-0400)
  Re: The Raysnail - WIP, a probability based raytracer with (limited) suppor=  
From: Hj  Malthaner
Date: 17 Jul 2024 14:38:48
Message: <66980fb8@news.povray.org>
On 7/17/24 19:15, Bald Eagle wrote:

 > I hope you'll have some time to document your discoveries about 
coding > your
 > raytracer and BRDF model(s), but especially the parser part.

The BRDFs are still making my head spin. I understand the concept, but 
struggle with the actual math to come up with proper BRDFs for new 
materials of my own. So, let me point you to the source instead, the 
lectures that I had been using myself:

https://raytracing.github.io/

The third book is about importance sampling and Monte Carlo integration. 
It has probability density functions and also scattering functions for 
the most important materials, like a diffuse reflecting material, a 
specular reflecting material (metal/mirror) and a material which both 
reflects and refracts (glass/transparent material).

If you want to look at some code, this developer also has made a 
raytracer based on above mentioned lectures and added additional materials,

https://github.com/miguelggcc/QBVH-Rust-Ray-Tracer

Of particular interest will be the Blinn-Phong material and the 
Ashikhmin-Shirley material:

https://github.com/miguelggcc/QBVH-Rust-Ray-Tracer/blob/master/src/material.rs

In regard to the parser, I want to say thanks to the people who wrote 
the PovRay documentation. Each SDL element is documented with a snippet 
of a grammar, which can be converted almost one to one into a recursive 
descend parser. So the documentation is already there. I'll try to keep 
the identifiers used in the parser code close to the ones used the 
documented grammar, so the code will look familiar to those who looked 
at the grammar from the documentation before.

I think the real need for documentation will come once I try to support 
macros and similar advanced SDL features.

To be fair though, my code needs more comments in general.

Luckily github supports having a Wiki for a project, so there is a place 
to write down discoveries, pitfalls to avoid and interesting solutions.

 > There are several
 > of us here that are intensely interested in all of that.

I was under the impression it could be of interest :)

PovRay has a great legacy, and one of the features that really set it 
apart for me was the SDL. This, together with all the mathematically 
exact objects, as opposed to approximation by polygon meshes as most 
other raytracers do.


Post a reply to this message

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