Ray-Tracing Experiments

Inspired by the upcoming Ray-Tracing Kajam event, I decided to start fooling around with some ray-tracing code.

I'm still feeling inspired by DOS limitations, so I'm rolling with that.  But I'm not so interested in making a Wolfenstein-a-like, which is a classic ray-tracing type of thing.  I also don't think I'm capable of making something as awesome as Death Taxi 3000, which is just a phenomenal piece of work.

So my mind settled on trying to get a height-map, voxel-style terrain rendering on something like a 486 PC.  Still a significant challenge, but something I feel I can get my head around.

The trick to anything like this seems to be getting your data/algorithm simplifications right to make life easy for the CPU.  To that end, over the last few days, I've been playing around trying to see the effect different simplifications have and I think I'm onto something:

 


This experiment was done on a modern workstation running Linux.  It's a 256x256 height map with lighting baked into a 256x256 colour map.  Compared to a faithful voxel render, the graphical glitches are many, but I suspect they would be forgiven in the context of a DOS game.

I am still ray-tracing every pixel, which I believe would be a non-starter on a 486, and I'm currently using floats.  The switch-over to fixed point shouldn't be a problem and I have ideas about how further approximations could allow me to work my way up a column without having to fully trace every row.





Comments

Popular posts from this blog

Micro:Bit and SPI display

DCS World with TrackIR under Ubuntu

Polygon Triangulator!!