View Single Post
Old 25 September 2018, 16:30   #5
Registered User

Join Date: Apr 2018
Location: Wales, UK
Age: 39
Posts: 76
Hello again

Sorry, I haven't put anything up. I've been a bit busy with Nim and other things. However; I post more frequently on AmigaBill's discord.

So I decided to move over to C (then probably Nim when it's a bit more stable), and the bulk rendering code in assembly. I've added in Chunky to Planar support, which works great, and I've also added in triangle drawing, which is half assembly/half C.

So today and bit of yesterday, I was working on 3D to 2D projection, and here it is.

Nothing to special. There is no culling at all, and no depth buffer as well. But as many OpenGL/DirectX programmers will say, once you have a triangle on the screen - you're 90% there; or at least I say it.

(And I'm know I'm being a bit cheeky with Visual Studio and WinUAE, but my A1200 takes ages to compile in C )

Secondary, I've been reading on BSP and Occlusion Culling. I've decided to use Unity (of all things), to be the Editor for the maps. I've written a little BSP algorithm, and using Recast (again of all things!) AI path navigation, I can use the triangle walk mesh, to calculate visible triangles. I do this via a clever system, of taking panorama shots - and colouring each triangle in it's own unique colour. Using a simple histogram/hashset, you have a knowledge of what exact triangles are visible, and how big they are. Couple that with the depth buffer sampling, you can get a pretty good picture of what triangles the Amiga should draw first, and ones that less important.

Next step, is to add in proper frustrum culling, backface culling, phong-ish shading, etc. Angle support for meshes and cameras, and your standard 3d engine functions; lookAt, etc. I'll leave optimisation alone for a while, I just want feature-feature-feature for now, until I have something that is playable.


I forgot, I did a video of the Visualisation Technique. Here it is.

[ Show youtube player ]
betajaen is offline  
Page generated in 0.06465 seconds with 11 queries