I’ve been feeling guilty seeing how much work Thunderstruck has been putting into development recently so I thought I’d contribute a little with what I have so far. I’m attaching a zip file with my current (still a work in progress) graphics library for rendering wireframe graphics. I have improved performance from my initial demo by about 250% without going to assembly yet. Also included in the zip file is a java JAR file called ObjParser.jar. This is an executable jar file that can be used to create models to run inside the demo program I have. Just use your favorite 3D editor and export a model to a wavefront OBJ file. Then from a command prompt just type “java -jar ObjParser.jar 50 3 filename.obj > datafile.h”. The 50 is a scale factor and can be anything >= 1. I found most of my models I’ve tried needed scaled somewhere between 50 and 100 to fit nicely on the screen. The 3 is the fixed point shift value used within the G3d library. I currently have it set at just 3. If you want to change it you’ll just need to modify the cosine and sine tables with 360 values that match your fixed point value. The core library functions for the graphics can be found in the G3d.h and G3d.c files. The rest of the files are just for the demo.Once you have a model showing in the demo you can move the camera around with the left and right dpad. The left and right trigger will spin the model on the y axis. I wish I had time to right more but I have some tasks to complete today and need to get going.
Feel free to use any of this code if you want. A little credit would be nice but is not necessary. Also feel free to ask any questions. I will try to answer as I get time.
If you manage to improve performance on any of the functions I would really like to know so I can keep my copy up to date with the most efficient code so please share.
This is great. I was hoping you gonna release it soon after I saw the demo.
BTW, I forgot to mention that I included the eclipse project source code for the OBJ Parser inside the JAR file as well. It’s pretty simple to parse an OBJ file but if you want to see my source you can just extract it out of the JAR.
I didn’t really had a chance to check this out yet. However, I plan to somehow integrate it in some of my work. Just judging from your demo I think this is a great achievement and deserves to be mentioned in the news.
Just judging from your demo I think this is a great achievement and deserves to be mentioned in the news.
I have been on vacation for a while. Looks like I need to do some news catch-up soon. 🙂
Nice work! Good to see more folks putting their work out there for others to take advantage of and build upon.
Since this is still a work in progress I’ve made some updates. Fixed camera bug when rotating camera. I also coded the line algorithm in assembly and got about 400% better performance out of it so it should now be able to handle more complex models and still get decent frame rates.
I think he was working on a star wars type (the original arcade :))..should be pretty amazing.