Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / agk 3d object file format exporter

Author
Message
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 19th Aug 2012 18:27 Edited at: 19th Aug 2012 19:00
Hey all. I'm working on an object exporter for AppGameKit for use in Milkshape3d. Here's my progress so far:



That's for a simple cube. Unfortunately. I'm not entirely sure what some of these values should be, and milkshape3d sdk is not exactly easy to figure out.

I need some help guys Does anyone know of a good reference for the ms3d sdk? Also, a good reference on some 3d fundementals... Like, what on earth is an Index... is it a single triangle? Also, milkshape seems to want to give me 9 normals per face. But the example from TGC seems to want 3 normals per face. Anyone know how I can find some more info on what exactly, at a basic level, everything is calculated. Is it 1 u and 1 v coordinate for every vertex? Etc...

For your guy's reference, I've zipped and included the full source code of my project and a compiled dll which you can copy over to milkshape and export using "AGK Object Exporter". It was compiled using visual studio 2008 pro.

Attachments

Login to view attachments
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 19th Aug 2012 20:13
An indice is the ID of a vertex.
Say I have 4 vertices, making up two polygons(faces) in a model:
0,0,0
1,0,0
0,1,0
1,1,0

The first vertex is the index #1(or zero, depending on programming language or SDK). The next is #2, the next #3, et cetera.

So to make 2 polygons(faces) from the above vertices, you would make an index list like this:
1,2,4
2,3,4

As for the normals, I don't know how MS3D handles them. I've only ever heard of a polygon having 3 normals(x, y, and z on the forwards-side of the polygon).

Also, your formatting for the UV coordinates is incorrect. If you have 6 components, you must have six values on a single line, ie 1,1,1,0,0,0(newline) instead of 1,1,(newline)1,0,(newline)0,0.

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 20th Aug 2012 19:35
Great work with an ms exporter

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.

Login to post a reply

Server time is: 2024-05-05 22:03:31
Your offset time is: 2024-05-05 22:03:31