BACKLIGHT: The Relativistic Raytracer
An anonymous contributor writes "Antony Searle, a physics student at the Australian National University has issued the first public release of BACKLIGHT. From his web page: "In essence a four-dimensional raytracer, [BLACKLIGHT] produces scenes demonstrating the optical effects of special relativity - delayed observation, angular aberration, Doppler shifting and the headlight effect." Check out the Movies section as well. "
I grabbed it...
unzipped it...
and hit a
g++ -o backlight backlight.cpp
and sure enough...not a whimper as
the 320k+ src file compiled
havent run it yet... but it compiles gracefully
I suppose it's immediate use would be
for photo-realisitic rendering in Quake for
10-year-old kids who play Quake at nearly
the speed of light.
> runon 7 ./backlight csg.srs
BACKLIGHT Relativistic Raytracer v2.9
Copyright (c) Antony Searle 1997-8
Opening csg.srs
Scene contains 1 camera(s) and 1 inertial frame(s)
[snipped]
Bitmap::SaveTGA: csg.tga (320 x 240) successfully saved
8 seconds elapsed
c++ -O6 -g -mpentium -malign-loops=2 -malign-jumps=2 -malign-functions=2 backlight.cpp -o backlight
EGCS 1.0.3 (RedHat 5.2/i386). You obviously need
a pentium or something similar, but most of those
flags will help on most platforms, I expect.
backlight aberration.srs (Pentium MMX, 200MHz):
no optimization: 118 seconds
optimization: 71 seconds
Actually, it runs right out of the box on linux,
/mnt/fd0, ignoring drive A:
using wine:
hannes@bistromatic:/dos/d/backlight > wine "backlight.exe csg.srs"
Could not stat
BACKLIGHT Relativistic Raytracer v2.9
Copyright (c) Antony Searle 1997-8
Opening csg.srs
Scene contains 1 camera(s) and 1 inertial frame(s)
Parsed successfully
Entering bounding routine...
Showing heierachy...
frame {
union {
intersection {
sphere, bounded by , 1.73205
sphere, bounded by , 1.73205
}, bounded_by , 1.73205
...
Completed line 236
Completed line 237
Completed line 238
Completed line 239
Bitmap::SaveTGA: csg.tga (320 x 240) successfully saved
34 seconds elapsed
hannes@bistromatic:/dos/d/backlight > xview csg.tga
hmmmm. Guess the 250Mhz R10k Origin2000 wins for now (8 seconds).
Anyone care to post benchmarks for a P2/450 or Alpha?
I compiled mine with -mips4 -n32 on an O2k, works faster.
IIRC you can compile a backwards-compatible binary for 5.x by specifying -mips1 -32.
Does anyone know if there is a quantum billards game, another of Mr. Thompkins's adventures? Would be a great way to introduce people to quantum mechanics.
doesn't it, tho?
It is interesting. I was thinking of writing a game with relativistic effects but at the time I was programming in DOS with MASM. I think I would have tried it, but then I got into linux and my time just evaporated.
So much for that black hole animation.
Does anyone have the IDO for IRIX 5.3 or 6.2 who might be willing to compile this puppy for those of use who don't have it?
Looks cool.
Spaciba!
I'll try to check it out tonight...
Gorillas did a good job with bananas... :)
pb Reply or e-mail; don't vaguely moderate.
I liked the movies. My Xanim was *really* choppy though.
~ ~^~~^~
I wonder if there is a way to simulate the effects on the actual waves of light, shifting them to higher frequencies and such. That would be spooky, we would start seeing Radio and TV stations as points of light, I wonder what we'd see looking backward.
freaky...
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~
ABORTED effort:
Close all that you have.
My 8th grade science project incorperated red/blue 3d stereo effects. I remember wishing (and I still wish) I could see an animation of a hypersphere rotation. The Scientific American I got it from had some stills.
~
My hypersphere project was mothballed when I couldn't figure out a good way to simplify a hypershpere into a frame.
(not bragging, just showing how its been a long standing interest of mine)
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~^
ABORTED effort:
Close all that you have.
Maybe one day...
At the moment quake doesn't even model Newtonian
physics 100%.
I read that a forthcoming game "Max Payne" will be the first to bother giving bullets velocity, mass etc, and
actually model their paths -- the current model is to make the bullet instantaneously hit the first object in its path.
This is really nifty. If there's someone out there who's into modeling and raytracing, could you make a short clip visualizig the Picard maneuver?
Very cute -- I'd seen 4D raytracers before, but never one that incorporated relativistic effects. =)
David E. Weekly (dew)
David E. Weekly
Code / Think / Teach / Learn
h4x0r for
that i understand any of that, but i think the movies look pretty neet!
--Dave
Celeron 300a @ 463
bl-op csg.srs -> 8.12sec with x11amp playing ( no stutter at all), rc5des chunking ( nice -19), afterstep, gnome panel, netscape, etc.. 101 processes in all and 10meg into swap w/128meg ram.
I'm compiling egcs19990103 to see if it will improve any more.
Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
Hey, is this cool or what?
Plus, it compiles on Linux "out of the box."
gcc -o backlight backlight.cpp
Chris
"Wherever you go, there you are."
I hope someone will port this to Linux! It would be awesome to have this in Linux!
NaTaS
Natas of
-=Pedophagia=-
http://www.mp3.com/pedophagia
Also Admin of
http://loki.linuxgames.com
Check out John Walker's web site at:
http://www.fourmilab.ch/cship/cship.html
He started posting this stuff a couple of years ago. I believe he has made the resources available. It's a wonderful site.
All opinions expressed are mine, if you want them it'll cost you.
Thnks for your interest everyone.
Re Quake Mod - real time is a BIG problem (certainly can't be raytraced!)
Re John Walker's page, I think it is just plain wrong. And POV-Ray can't be readily modified...
Feel free to e-mail me with questions/comments
acsearle@ozemail.com.au