[Coco] Raytracing on the CoCo
L. Curtis Boyle
curtisboyle at sasktel.net
Fri May 17 00:21:04 EDT 2019
What kind of math is it using? Would using 6309 code help (or a 6309 aware C compiler)?
Sent from my iPhone
> On May 16, 2019, at 9:42 PM, Walter Zambotti <zambotti at iinet.net.au> wrote:
>
> I think it does six reflections per pixel.
>
> There are six semi transparent reflective balls inside a semi reflective transparent cube.
>
> I am considering doing the math on the pc and sending the resulting pix map to the coco.
> Just to see the image quality.
>
> Walter
>
> Sent from my Xperia by Sony smartphone
>
> ---- mcnd96 via Coco wrote ----
>
>> Cool story. Thanks for sharing. Don't forget a backup power supply. Would not want to get to day 600 just to lose power!Sent from my Verizon, Samsung Galaxy smartphone
>> -------- Original message --------From: Mark McDougall <msmcdoug at iinet.net.au> Date: 5/16/19 6:46 AM (GMT-05:00) To: coco at maltedmedia.com Subject: Re: [Coco] Raytracing on the CoCo On 16/05/2019 2:08 pm, Walter Zambotti wrote:> I've been playing with Joel Yliluoma' raytrace C++ for DOS and have> converted it to the CoCo.> It is designed to output to a 16 color palette with dithering! Ok so might> look good on the CoCo!!!> On my i7-3740 2.7Ghz it produces a 320x192 frame every 2.8 seconds. No GPU> acceleration. With acceleration 18+ frames per second.> On OVCC running at 184.16mhz it takes 9.3 seconds to draw one pixel.> Times that by 320x192 pixels and that blows out to 6.67 days to draw one> On a 1.8mhz CoCo that would be 675 days.Back in the mid-80's before every man and his dog was doing raytracing, we had to write a simple renderer in the Computer Graphics course at uni. We had to share access to the computer in the lab which had hires colour graphics, so it was prudent to prototype code at home where possible (not that half the class had a computer at home!)I don't know if Pascal was mandated but the lectures used Pascal example code snippets so for the assignment itself, Pascal it was.Although I had a CoCo 1, my father had bought me a TRS-80 Model 4P to use specifically for uni work, and at the time having used the rather excellent Turbo Pascal on Montezuma CP/M 2.2 on the 4P for earlier assignments - besides not having Pascal for the CoCo - the choice was clear. Although the 4P only had monochrome graphics, I had the Grafyx Solution hires board for it and used dithering in lieu of different colours.The assignment required the implementation of just spheres and an infinite checkerboard. For the 4P prototype I reduced the number of reflections to (IIRC) just 2, mainly because of the dithering and set it off. Some 30+ years later I can't quite recall how long it took to render a single scene, but it was in the multiple of hours if not overnight. It certainly wasn't several days (4MHz Z80), though of co
> urse the code was much simplified and nowhere near 500 lines long!I am surprised at how slow Joel's code is on the CoCo, but then again the complexity of the scene and the objects it can handle could blow out the calculations by orders of magnitude quite quickly I suppose! OK so I take it back - I'm not surprised.Has there ever been any other raytracing (rendering) attempted on the CoCo that anyone knows of? I wonder how my simple assignment would perform? I think many, many years ago I rescued the floppy, if not the code, from that assignment but these days I'd have no chance of locating it. Not that it would be difficult to re-code from scratch with a bit of a refresher!Interesting stuff!Has anyone got a spare CoCo3 they can set aside for a couple of years to render a scene and save it for prosperity? Would be cool to know that it took 2 years to render - without cheating on an emulator!!! You'd want to make sure there were no bugs in the save code first though... ;)Regards,-- Mark McDougall<http://retroports.blogspot.com.au>-- Coco mailing listCoco at maltedmedia.comhttps://pairlist5.pair.net/mailman/listinfo/coco
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list