
Ray Tracing with POV-Ray: 25 scenes in 25 days (2013) - todsac
https://github.com/spcask/pov-ray-tracing
======
klodolph
I loved POV-Ray in the 1990s and early 2000s. The thing is—it’s ridiculous to
try and make something remotely complicated or organic with POV-Ray, unless
you are using some modeling program that can export to POV-Ray format.

POV-Ray scenes were dominated by procedural textures and geometric primitives,
for the most part. The rendering engine was very strong, and supported all
sorts of features like area lighting, depth of field, motion blur, global
illumination, caustics, volumetric lighting, etc. All of these were supported
way back in the day before they became more common in other engines, and of
course, using these features made your render times horrific back on
early-2000s single-CPU machines.

The way a lot of us did modeling in POV-Ray was with a pencil and some graph
paper. Without a good modeling program, you were setting yourself up for a ton
of work. So I’d try to get the most out of simple models, and make it look as
good as possible with lighting.

Funny enough, if you are used to CSG then you may need some time to adapt to
modern workflows. Blender supports CSG, of course, but there are some caveats
that you should pay attention to.

~~~
CrLf
POV-Ray was my introduction to programming, before actual programming. Graph
paper and a lot of trial and error.

My longest render was 50 hours for a single 640x480 image, with caustics and
area lighting. 50 hours of a Pentium 100 MHz buzzing near my bed.

~~~
holoduke
How long would it take now on a modern machine? :) 5 , 10min?

~~~
elihu
If you ran exactly the same code on a modern machine I'd say that's a pretty
reasonable guess.

You'd get a big speedup just by going from single-threaded to multi-threaded
execution. Probably the biggest boost would be to use modern methods. It's
possible to do path tracing at interactive frame-rates on modern hardware;
some of the optimizations can include not doing very many samples per pixel
but to rely on denoising algorithms that can take advantage of the redundancy
inherent in the image to smooth out the graininess of course global
illumination effects. There are a lot of other algorithmic improvements too;
modern acceleration structures, techniques to preferentially sample rays that
are most likely to impact the final result, etc..

POV-Ray is amazing software, but it wasn't really ever meant to be an
interactive renderer. It kind of leans towards maximum extensibility over raw
performance. Modern renderers are usually much faster.

~~~
SomeoneFromCA
I doubt you'll get any speedup from multi-threaded execution, unless it is
also multi-core.

~~~
klodolph
It’s hard to find processors these days that aren’t multi-core. I can’t
remember the last time I saw a single-core computer.

(Or are you talking about the difference between “multi-threaded execution”
and “multi-core execution”? That wouldn’t make sense. Threads are how you
execute code on multiple cores.)

------
erjiang
Wow, the state of the art in 3D rendering has changed dramatically. The state
of the art in _open source_ 3D rendering has changed even more dramatically.

Compare these screenshots from 2013 (although I think POV-Ray was looking
pretty dated by then) to renders that come out of Blender's Cycle renderer
now.

The big change is that everyone has moved to "physically based rendering" that
do path-tracing for propagating light through a scene. Old-school raytracing
cannot know how light indirectly bounces off a wall, for example, leading to
artificial-looking shadows and flat lighting.

Anyways, anyone interested in making neat little 3D scenes like in this GitHub
should try out Blender - it's shockingly easy to make realistic renders
compared to several years ago.

Edit: Blender's Cycles rendering engine seems to have been included with
Blender since 2011. POV-Ray probably represents 2000s-era tech, although I
think it can do more than what's demonstrated in this post.

~~~
TylerE
That's rather unfair to POV-Ray. These are hardly representative of what it's
capable of.

Look through the old IRTC archives, for instance:
[http://ftp.irtc.org/stills/index.html](http://ftp.irtc.org/stills/index.html)

People were doing stuff like this
([http://oz.irtc.org/ftp/pub/stills/1999-04-30/13hystri.jpg](http://oz.irtc.org/ftp/pub/stills/1999-04-30/13hystri.jpg))
in 1999.

~~~
beering
Using this very nice POV-Ray render from Wikipedia:
[https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Gl...](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Glasses_800_edit.png/440px-
Glasses_800_edit.png)

It features a lot of effects (radiosity, HDR maps, etc.) which are added on
top of its basic functionality. There's been a big shift in how rendering is
approached, from the old way of adding a pile of special effects onto your
original non-realistic renderer, to a newer way of simulating light as it
physically works and using that as the foundation of the renderer.

And there's still a lot of in-between as well, but having gone from 3ds Max's
scanline renderer to 3ds Max + Mental Ray, to Blender + Cycles, it feels very
different to use.

There are still some effects that Mental Ray (and it looks like POV-Ray) can
do that Cycles can't. Photon-mapped caustics seems to be one, although I think
LuxRender is FOSS and can do that.

~~~
TylerE
> It features a lot of effects (radiosity, HDR maps, etc.) which are added on
> top of its basic functionality

Huh? POV-Ray has supported radiosity for literally decades, since sometime
around 1995.

~~~
anthk
Yep, I'm tired of these kids saying PovRay coudn't do shit as if PovRay had in
1997 the same capabilities of an Irix machine from 1987. They couldn't even be
more wrong with that.

I remember seeing photoreallistic images made with PovRay in 1997 you coudn't
even do with a GPU today in real time.

Kids today have a lot of ignorance on the 90's technologies, guess why they
confuse the 80's and the 90's a lot thanks to that shitty vaporwave culture,
having fake nostalgia on something they never truly experienced.

Man, I was playing 720p video under a Divx code in early 00's with a Pentium3
and multimedia was on its heayday, thus, people showing up a CGA pallete has
no sense, it already was retro back in the day, you had those in the old MSDOS
games you were running under W98 or DOSEmu under Linux, among the rest of the
emulators for the ZX Spectrum and MSX for example.

Sorry for my rant, but I had to say it. The late 90's had nothing to do with
early 90's, the technology shift we've seen it was outstanding. From DOS under
a 286 in my early Elementary school, to W98 emulating Pokémon in my pre-HS
days among recording TV streams in a computer, all of that in 5-6 years.

From 30Mhz and 5 1/4 floppies to ~450/600 MHZ a bunch of GB in 1999. For sure
PovRay could do a lot more than these kids think.

~~~
morsch
> From 30Mhz and 5 1/4 floppies to ~450/600 MHZ a bunch of GB in 1999.

From rare instances of people accessing their local BBS at 9600 Baud to
accessing a worldwide communications network as a matter of course, often at
broadband speed.

The past 20 years really have been rather dull in comparison.

~~~
holoduke
When you are inside a time or period not a lot of change is felt, but once you
look back you can see incredible changes. You mention that last 20 years are
dull. I think that the last 10 years are the era of smart phone revolution. A
pretty big thing. Certainly belongs in the top 50 most impactful inventions
and adoptations in human history. In 200 years from now the late 00s will be
seen as the start of global connectivity.

~~~
joefourier
I haven't felt a lot of incredible changes in the last ten years. In 2010 I
had an iPhone 4, and I don't think there is a major qualitative difference
between it and the latest smartphones. The computing performance may have
improved since, but apart from loading increasingly bloated websites faster
and allowing for higher-quality photographs, I haven't felt any major changes.

Otherwise, the changes in lifestyle since 2010 have been incremental at best.
10 years ago I could buy most things online, watch YouTube videos, consulted
Google maps, had smartphone text, audio and video chat. Now I can watch videos
in 4K and the internet connection is faster, and although computer graphics
have indeed improved, it is nothing like the leap from 1990 to 2000.

The only new exciting development is virtual reality, which is unfortunately
still fairly niche.

There is a larger difference from 2000 to 2020, but you could do a version of
the above in 2000, only in a more inconvenient and expensive manner than
today, while they would be largely impossible in 1980.

~~~
mcphage
> Otherwise, the changes in lifestyle since 2010 have been incremental at
> best. 10 years ago I could buy most things online, watch YouTube videos,
> consulted Google maps, had smartphone text, audio and video chat. Now I can…

Now _almost everyone_ does that. That’s the difference.

------
trevortheblack
If anyone is interested in getting started on Ray Tracing _today_. I recommend
Peter Shirley's _Ray Tracing In One Weekend_ Series.

[https://raytracing.github.io/](https://raytracing.github.io/)

(I edited the later editions)

~~~
s800
Another recommendation: DKBtrace, which is a predecessor to Povray, has easier
to grok code. IMHO.

------
nikodunk
I love POV ray so much. It's what originally got me into programming in the
late 90s/early 2000s. Found out about it from a PlayStation 1 Magazine.

~~~
Macuyiko
It holds a special place in my heart as well. In 2002, my parents gave me a
book "Multitool Linux" [1] which wasn't a spectacularly well received one,
containing a mix of wildly different topics, but this was exactly what I
needed as a teen experimenting with Linux for the first time. One of the
chapters was about POV-Ray, and I remember being amazed with this newly-
discovered canvas. I spend hours looking at images others had created and
wondering how they'd pulled it off. I think I never got much further than
rendering small animations on my (if I recall correctly) 400Mhz pc. Good
times.

(As an aside, I'd completely forgotten the title of the book, although vaguely
remembering the cover and time frame. It's so hard to find older stuff using
Google when only having some vague descriptions. I found it by remembering
that I read a book review years later and after some digging around could
locate the review back to [https://www.linux.com/news/book-review-multitool-
linux/](https://www.linux.com/news/book-review-multitool-linux/) based on the
style of writing, which I remembered. I must have read that book to pieces.
The chapter using Wireshark was also amazing to me.)

[1]
[https://books.google.be/books?id=g0CPF6MEFcUC&printsec=front...](https://books.google.be/books?id=g0CPF6MEFcUC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)

------
selfsimilar
I credit POV-Ray with getting me into programming in the early 90s. A
fascination with computer graphics led to Fractint, POV-Ray, and dreams of
someday being able to play Kai's Powertools and SGI machines. I think I even
had a subscription to some black and white POV-ray zine. Can't remember what
it was called though.

------
EvanAnderson
POV-Ray was the reason that I wanted a 486 DX back in the mid-90's, and not a
puny FPU-less 486 SX like my friends had.

I didn't do much with it, ultimately, but I really enjoyed noodling around w/
POV-Ray. Rendering a bunch of TGA files and then stringing them together into
an animated GIF (or was it an FLC?) was a major exercise.

I recall 15 y/o me trying to explain it to the "oldster" who my father
purchased the PC from (a guy who was probably in his late 30s). "No-- there's
no camera. It's a _virtual_ camera that I place in code for the scene. UGH!
You don't understand!" (To be fair, this was a guy who mainly sold PCs and
accounting software and wrote code for dBase/Clipper...)

~~~
Synaesthesia
Lol I made really great FLC files of those 4D fractals, Quarternions, which
you could animate by changing the parameters. Good times

------
weinzierl
This is a bit off-topic but I really love POV-Ray and I think it is a fun fact
people reading this thread might like:

POV-Ray was actually run in space by none less than Mark Shuttleworth when he
was on the ISS in 2002.

[1] [http://www.povray.org/posters/](http://www.povray.org/posters/)

------
ujeezy
I got into POV-Ray in the late 90s when I wanted 3D graphics for my Geocities
page. I was in over my head in every dimension (scripting, math, artistic
ability), but it was incredibly rewarding, and the newsgroup gave me a very
positive early impression of what a community can feel like on the internet.

------
thefifthelf
I entered some of those irtc comps. Povray appealed to the programmer and the
artist in me. Writing algorithms (macros) in povray to create trees or place
raindrops made you really look into how nature works. It's a challenge that
requires a certain mindset.

------
beagle3
I printed the source code of POV-Ray in 1989 when it was still called DKBTrace
(named after its' author, David Kirk Buck) and studied it carefully over a few
weeks. It was my introduction to the underlying implementation of (then)
modern OO - Turbo C++ 1.0 was released in 1990. It was also my introduction to
CSG.

Ah, the nostalgia. Thanks, David, and the entire POVRay team.

------
gorgoiler
(Edit: oh wow, it’s really heartening to read how POVRay has such a positive
impact on so many others as well, almost 30 years ago!)

There is a special place in my heart for POVray. After BBC Basic, it was the
first coding I ever did all the way back in ‘94.

The thrill of changing an object from opaque to glass, and the anticipation of
watching the ray scan grind to a treacle-like pace as it passed over any glass
objects. Happier times, simpler times!

May it live forever.

------
oceanghost
My lord, had no idea POV-ray was still around. POV-Ray and Fractint inspired
years of asembley graphics programming when I was a teenager...

------
ur-whale
This has not aged well. Modern OpenSource renders like e.g. luxcorerender
produce way more realistic images:

[https://luxcorerender.org/gallery/](https://luxcorerender.org/gallery/)

~~~
anthk
And povray could do that far earlier than luxcorender.

[http://hof.povray.org/](http://hof.povray.org/)

------
brandonmenc
After BASIC, POV-Ray was the next programming language I learned. Lots of fond
memories.

------
jordache
how is POVRay used in modern workflows these days?

It's extremely counter intuitive to articulate a 3d scene in code. Maybe for
some applications, exactness in the 3d scene via code is useful.

~~~
elihu
As far as I know, it's not. The turing-complete scene description language and
the many ways of representing geometry that makes POV-Ray so powerful and fun
to use also makes it very difficult to interoperate with other tools.

POV-Ray is mostly used by hobbyists, students, and people who need to
visualize some data and need a tool that can be easily scripted for their
needs.

------
SomeoneFromCA
Povray has a nasty problem though - it cannot generate scenes from stdin. The
file has to be on the disk.

