|
 |
Why is POV-Ray (development) in decline? Lack of developers? Realy? Look
at the wealth of include files.
What if we can compile an include file, use it as a dll? What if after
some time it gets integrated in the core?
simple scene
-> include file (sphere.nim imported, used directly)
-> plugin (sphere.nim compiled as shared lib, loaded at
runtime)
-> core feature (merged into core)
Then the author of the Nim programming languge published:
https://nim-lang.org/araq/relays.html
It clicked.
That woud make it possible to write torus.nim as an "extension". Add
`import torus` in a nim scene file. The parser would detect it, but does
not know it. Looks for the file in the right place, compiles it to a dll
and uses it
`torus.nim` would contain just the torus intersection algorithm, a
constructor and a few tidbits. In the future it will contain a proc that
will result in a mesh of a torus and a pies of code that extends a scene
parser with `torus`
so, shapes are relays. Lights are relays, cameras and materials are.
I've been discussing ratracing for quite some time with Claude, this
brought it all together.
A glimpse of the goal:
Scene SDL
│
├--> Raytracer backend (analytical intersection, BVH/R-tree) ←
reference
|--> Path tracer backend (physically based)
|--> OpenGL / Vulkan backend (realtime preview, all geometry meshed)
|--> STL / mesh backend (3D printing, watertight meshes)
|--> Audio backend (acoustic simulation)
Back-ends are also relays. When back-end is switched to vulcan all
shapes will be meshified.
So far very little is implemented. The little ray tracer does not
support plug ins yet and it just has one fixed back-end. Shapes etc are
relays.
The first code I got running with the help of Claude:
https://gist.github.com/ingoogni/c4ca054e37a79706ff9c05c75b435467
You'll find SQlite references in the code. Not implemented yet, but the
goal is to store a lot of data during tracing in a database. These data
can be used for example for post processing the image(s). Re-colour a
light source?
ingo
Post a reply to this message
|
 |