Zerosquare Posted December 14, 2017 Share Posted December 14, 2017 Yes that trick is well known, but a reminder is always good 2 Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 15, 2017 Author Share Posted December 15, 2017 (edited) Tada! Weirder jaggies than normal and the code is incredibly ugly but it works! Now that I have flat shading and a calculated normal, I can figure out shading based on angle to camera... Edited December 15, 2017 by Luigi301 7 Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 16, 2017 Author Share Posted December 16, 2017 (edited) Flat shading based on the angle from the triangle's surface normal to the camera. It mostly works! This is fun. Edited December 16, 2017 by Luigi301 8 Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 19, 2017 Author Share Posted December 19, 2017 Working on a model converter that will turn my OBJ files into raw data for the 3D engine at the moment. I’ve also got debug spew going to the screen now, using a simple 40x24 1bpp text layer. Trying to figure out why the lighting seems to be coming from a weird “angle” when it should be projected from the camera. I wish Virtual Jaguar could hook the jaglib skunkboard console output. Maybe I can hack that into VJ somehow. Sent from my iPhone using Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted December 19, 2017 Share Posted December 19, 2017 Working on a model converter that will turn my OBJ files into raw data for the 3D engine at the moment. I’ve also got debug spew going to the screen now, using a simple 40x24 1bpp text layer. Trying to figure out why the lighting seems to be coming from a weird “angle” when it should be projected from the camera. I wish Virtual Jaguar could hook the jaglib skunkboard console output. Maybe I can hack that into VJ somehow. Sent from my iPhone using Tapatalk It might be easier to hack in a dedicated address you can just "print" to (ie: everytime a byte arrives at an otherwise unused address, the emulator prints it to the console), but implementing the Skunkboard HPI interface is not too tricky. You'd then need to either parse the Skunklib packets or just assume they're all worth printing. There's a doc for all the specs, if you get stuck you can ask me. Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 22, 2017 Author Share Posted December 22, 2017 Yeah, I set it up so writes to $800000 (unmapped) get logged to a debug log. I also rebuilt my workflow under WSL instead of Cygwin, making the compile/debug loop a lot faster. Together, this let me figure out that a typo in my view matrix function was screwing up the shading. Now I have 16 light levels projected from the camera - so everything's bright, but at least it's shaded properly. 5 Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 24, 2017 Author Share Posted December 24, 2017 (edited) The camera can move around the scene! It also supports multiple objects - the player is really a cube that isn't rendered. Some problems with shading though... Edited December 24, 2017 by Luigi301 5 Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted December 29, 2017 Author Share Posted December 29, 2017 The drawing is inaccurate, it's pretty slow and unoptimized, and there's no Z-buffering yet... but I got my model importer working and can set up scenes now! Three objects and over 100 polygons at once! 6 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted December 29, 2017 Share Posted December 29, 2017 Loving this - it's like Vladr's thread, only without the delays and self pity Keep it up! 3 Quote Link to comment Share on other sites More sharing options...
VladR Posted January 3, 2018 Share Posted January 3, 2018 Loving this - it's like Vladr's thread, only without the delays and self pity Classis CyranoJ Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted January 3, 2018 Author Share Posted January 3, 2018 I fixed the weird glitchy lines flying off of polygons and did some cleanup, pipelining and optimization - I calculated that I get about 3,000 flat-shaded polygons per second at the moment. Not bad for my first shot at a Jaguar 3D engine! Of course, that's without Z-buffering... 5 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 3, 2018 Share Posted January 3, 2018 I fixed the weird glitchy lines flying off of polygons and did some cleanup, pipelining and optimization - I calculated that I get about 3,000 flat-shaded polygons per second at the moment. Not bad for my first shot at a Jaguar 3D engine! Of course, that's without Z-buffering... Excellent work Quote Link to comment Share on other sites More sharing options...
Luigi301 Posted January 30, 2018 Author Share Posted January 30, 2018 Ive been pretty busy with other projects this month, but Ive been working on a RISC assembler/debugging tool in Common Lisp. Not much to show yet, but Im hoping that it will let me figure out the internals of my engine better than clicking Refresh in Virtual Jaguar... 2 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted February 1, 2018 Share Posted February 1, 2018 Ive been pretty busy with other projects this month, but Ive been working on a RISC assembler/debugging tool in Common Lisp. Not much to show yet, but Im hoping that it will let me figure out the internals of my engine better than clicking Refresh in Virtual Jaguar... Not sure if it's of use, but I have released a (VERY beta ) RISC Disassembler here : https://www.u-235.co.uk/developer/u-235-disassembler/ It's op-code complete, doesn't cover all branch conditions yet, just what I needed at the time. Let me know if you hit any snags with it etc. also, lisp! *shudder* do you like parenthesis lots or something? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.