POV-Ray : Newsgroups : povray.pov4.discussion.general : SDL2 : Re: SDL2 Server Time
22 Jan 2025 08:47:57 EST (-0500)
  Re: SDL2  
From: Bald Eagle
Date: 13 Jan 2025 14:30:00
Message: <web.67856984f5bf97863018e75b25979125@news.povray.org>
At this juncture, we really need a functional flowchart showing exactly HOW
POV-Ray goes from the SDL in .pov file to the final rendered image.

The only people that I know of who might have such knowledge (and who we're seen
post here "recently") are (in alphabetical order)

Chris Cason
Thorsten Frohlich
Jerome Grimbert
William Pokorny
Yvo Smellenburgh

If they could help lay things out such that we can get a head start on
understanding what really needs to happen to potentially rewrite everything from
scratch, that would be a big help.
Also, if they are in contact with other past members of the POV-Ray development
team, perhaps they can solicit some commentary from people that we haven't seen
in a while.

As far as I can tell (off the top of my head / rushed):
We have the parsing phase:
We have the parser that nibbles away at the SDL character by character,
identifying keywords and such.
All of that has to get filtered through error-handling routines.
Then the lexer/tokenizer converts all of that to (numerical?) tokens.
(guessing / speculating)
for every token, some sort of hierarchy is constructed
a bounding box is calculated

Then we have the render phase:
A ray gets shot from the camera to the coordinates corresponding to the current
screen pixel
The ray gets tested against "all" the bounding boxes (presumably there is some
kind of tree optimization)
If a bounding box is hit, then the ray gets tested against "all" objects in a
CSG (let's just call everything a CSG for now) and a solver gets invoked to
determine the ray-object intersection.
Once the intersection point is determined, the normal, texture, finish, etc get
handled.  This is likely the most complicated part, since we can have media,
transparent objects, ior, reflections, etc.
Stuff gets done with antialiasing
Pixel gets assigned an rgb color.

Please fill in the blanks and expand upon the generalizations, and correct the
errors.

- BW


Post a reply to this message

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