gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Clever person done an MD2 viewer yet?

#39346 - iainprice - Thu Apr 07, 2005 8:12 pm

I can do basic 3d but md2 viewers are beyond me. I know some people did viewers for the GBA using asm, (which I don't like). Is anyone working on an opengl style md2 viewer? With the possibility of open source? I think a nice easy to understand viewer would open the door to a lot of quite good 3d games being made...

#39355 - ecurtz - Thu Apr 07, 2005 10:59 pm

It's not all that clever, but I'm in the middle of doing one.

Should be done this weekend, unless the horrible work crunch continues. I'm doing a converter rather than a pure viewer. Most of the source code already exists if you search for 'opengl md2 source' or the like.

#39393 - iainprice - Fri Apr 08, 2005 8:52 am

Are you converting md2 file into another type or reading them directly similarly to a bin file?

#39401 - Lupin - Fri Apr 08, 2005 2:31 pm

of course you would need to convert them, this is just because of the way MD2 files are stored. It is a lot easier (and probably faster) to convert them into an easy-to-use format first.
_________________
Team Pokeme
My blog and PM ASM tutorials

#39402 - iainprice - Fri Apr 08, 2005 2:43 pm

Any suggestions?

#39407 - Lupin - Fri Apr 08, 2005 3:05 pm

iainprice wrote:
Any suggestions?


Maybe wait until ecurtz has finished it?

I wrote several MD2/MD3/BSP renderers for PC in the past, but i don't have a DS and i am not into DS dev but i think a quake 3 map renderer would be nice too (there are loads of tutorials about quake 3 maps on the net)
_________________
Team Pokeme
My blog and PM ASM tutorials

#39408 - ecurtz - Fri Apr 08, 2005 3:23 pm

I'm converting to the encoded vertex format that Metroid uses, on the assumption Nintendo knows what they're doing.

It's just pasted together from other people's existing code, including an openGL viewer and the Metroid model viewer code that someone here wrote (mike260 maybe?, sorry I didn't find the original post in my super quick search...)

#39409 - mike260 - Fri Apr 08, 2005 3:50 pm

ecurtz wrote:
I'm converting to the encoded vertex format that Metroid uses, on the assumption Nintendo knows what they're doing.


You can throw this data directly at GX_FIFO and the hardware will route it to the right registers. The following should be in ndslib soon:

http://www.rafb.net/paste/results/IlMahS57.html

Haven't tried it with the metroid models yet but it works ok for display-lists I built myself.