8BPP Cow

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
a9m
Posts: 11
Joined: Wed Jul 22, 2020 5:37 am

8BPP Cow

Post by a9m »


This demo features 3D rendering to a 256x240@8bpp surface with full transformation calculation, texture mapping and per-pixel depth buffering. The model is a decimated Spot test model  with 512 vertices, 1020 triangles and a 256x64 texture.




So, I wrote this just to get familiar with this system and figure out how to write and optimize a 3D math for it. Also, it would makes a nice reason for me to get up and do some coding streams, as shown here:
















Only runs on r39 since I can't find documents for older versions. There's still bunch of incorrect pixels due to depth buffer precision problems.




Controls:





  • A/D - Move camera left/right


  • W/S - Move camera up/down


  • Q/E - Move camera backward/forward (Z value should be an unsigned number but the UI only displays signed numbers)


  • J/L - Rotate left/right (yaw)


  • I/K - Rotate up/down (pitch)


  • U/O - Tilt left/right (roll)




  • Add wire-frame rendering stage before full rendering for a preview


  • Full rendering can be interrupted by a camera change


  • Add joystick support


    • Left/Right - Move camera left/right


    • Up/Down - Move camera up/down


    • L/R - Move camera backward/forward


    • Y/A - Rotate left/right (yaw)


    • X/B - Rotate up/down (pitch)


    • Select+L/Select+R - Tilt left/right (roll)




Attachments
8BPP Cow
8BPP Cow
8bppcow.png (9.87 KiB) Viewed 5092 times
8bppcow.prg
8BPP Cow
(22.23 KiB) Downloaded 282 times
a9m
Posts: 11
Joined: Wed Jul 22, 2020 5:37 am

Re: 8BPP Cow

Post by a9m »

Update: I added a version where all calculations are accelerated by an upcoming FX Update. This requires the latest development build of the emulator and isn't supported by web emulator at the time of this post.

I can't edit the top post for some reason so here are web links:
Without FX Update Try It Now!
With FX Update Try It Now!
Attachments
8bppcow_fx.prg
(22.98 KiB) Downloaded 289 times
mortarm
Posts: 298
Joined: Tue May 16, 2023 6:21 pm

Re: 8BPP Cow

Post by mortarm »

Utterly facinating. A mooing presentation. Yes, I'm milking it for all its worth. :D
Post Reply