You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/1 17:38
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
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.

Attach file:


zip WFGraphicsLibraryDemo.zip Size: 123.33 KB; Hits: 239
vb ModelViewer.vb Size: 32.00 KB; Hits: 247
Top

#2
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/1 18:20
PVB Elite
Joined 2011/7/1
Germany
1109 Posts
CoderContributorTop10 PosterLong Time User (8 Years) App CoderPVBCC 2013 Entry
This is great. I was hoping you gonna release it soon after I saw the demo.
Top

#3
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/1 19:45
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
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.
Top

#4
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/15 14:38
PVB Elite
Joined 2011/7/1
Germany
1109 Posts
CoderContributorTop10 PosterLong Time User (8 Years) App CoderPVBCC 2013 Entry
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.
Top

#5
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/15 18:58
Administrator
Joined 2000/1/8
Germany
2515 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
Quote:
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. :-)
Top

#6
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/6/16 3:52
Nintendoid!
Joined 2007/12/14
169 Posts
CoderLong Time User (11 Years) App Coder
Nice work! Good to see more folks putting their work out there for others to take advantage of and build upon.
Top

#7
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/9/13 23:33
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
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.

Attach file:


zip WFGraphicsLibraryDemo.zip Size: 123.48 KB; Hits: 200
Top

#8
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/9/16 21:01
Administrator
Joined 2000/1/8
Germany
2515 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
Still really impressive! Looking forward to see how it progesses! :-)
Top

#9
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/9/16 22:01
Nintendoid!
Joined 2004/5/28
215 Posts
Long Time User (15 Years)
Time for a Zero Racer or Starfox? ;)
Top

#10
Re: Wire Frame Graphics Library and OBJ File Parser Beta
Posted on: 2013/9/17 2:45
PVB Elite
Joined 2007/10/26
USA
757 Posts
ContributorTop10 PosterLong Time User (11 Years) Donator
I think he was working on a star wars type (the original arcade :))..should be pretty amazing.
Top

 Top   Previous Topic   Next Topic


Register To Post