Jump to content


Photo

Gmmd2 - Model Importer [closed -- dead link]


  • This topic is locked This topic is locked
33 replies to this topic

#1 Avenhym

Avenhym

    GMC Member

  • GMC Member
  • 171 posts

Posted 09 March 2006 - 10:12 AM

GMmd2

gmmd2pic.png


03/08/06:
Gmmd2 is a method that I have created to enable Game Maker to load and render Md2 files. It uses an external dll to load and sort the data, then retrieves the data in a manner that can be rendered as an animation. The texture for the model is stored in Game Maker as a background resource. There will an open source version (the .gm6) soon, along with a brief manual and in time a library. Please note that its is unlikely that I will make the dll open source, so please don’t ask.

Instructions) Make sure the “game†is completely unzipped into a file and run it. Use the left and right keys to rotate the model.

03/09/06:
I've now uploaded the gm6 version of the example.

Download example (exe): gmmd2example.zip (1.2 mb)
Download example (gm6): gmmd2exmlgm6.zip (0.3 mb)


Edited by chance, 13 July 2014 - 07:04 PM.

  • 0

#2 Andyops

Andyops

    GMC Member

  • New Member
  • 120 posts

Posted 09 March 2006 - 10:23 AM

Wow, exception could already do this, but this is still cool.
8/10 :)
EDIT: I was looking at the Machine code of the dll and look what I found...
ption4whatEv __ZNSt9exceptionD2Ev __ZN10__cxxabiv111__terminate

Could you explain that... :) :( don't worry i know that isn't the right Xception.
Just sort of wierd seeing that

Edited by Andyops, 09 March 2006 - 10:33 AM.

  • 0

#3 freaky_entertainment

freaky_entertainment

    GMC Member

  • GMC Member
  • 457 posts

Posted 09 March 2006 - 03:24 PM

Aaaaah ! So perfect . Make an example , dude ! And if it's possible , make the model show middle finger in the example :)
  • 0

Cxn8eVf.pnggVywn2c.pngckddPHm.png


#4 Avenhym

Avenhym

    GMC Member

  • GMC Member
  • 171 posts

Posted 09 March 2006 - 04:25 PM

Wow, exception could already do this, but this is still cool.
8/10  :)
EDIT: I was looking at the Machine code of the dll and look what I found...
ption4whatEv __ZNSt9exceptionD2Ev __ZN10__cxxabiv111__terminate

Could you explain that...  :)  :( don't worry i know that isn't the right Xception.
Just sort of wierd seeing that

<{POST_SNAPBACK}>


The major differentce is that Xtreme3D (and I should know, I was one of its first succesful users way back when it first came out) uses its own OpenGL window to render the scenes, not GM, where GMmd2 uses GM's model format and d3d functions to render the model. GMmd2 is essencially a *.md2 to GM model format converter, so that people could just use GM's d3d functions instead of having to learn Xtreme3d or the like which generally has a steap learning curve.

As to what you "found" and if it was a serious question, theres no restriction of the word "exception" and you already know there's no conection between that and Xception or Xtreme3d. Please don't accuse me, in any way, of stealing this from someone else, I did work very hard to make this. When I started, I only had a foundation of C++ and GML with no real knowlege of how to make a DLL or anything about reading the md2 format.

I will have an open source example out soon, and hopefully soon thereafter I will have a lib out for it.
  • 0

#5 twaggy

twaggy

    GMC Member

  • New Member
  • 218 posts

Posted 10 March 2006 - 02:59 AM

this is exalent!!
10/10
i was thinkin of stuff like this yesterday tthought UTM would be good but this is awsome
  • 0

#6 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3103 posts

Posted 10 March 2006 - 05:47 AM

Can this do bone animations like Halflife 1? Or are halflife 1 models not quake 2 format tyope of models? Cuz halfife 1 uses Quake 2 engine but they have a better way of doing animations.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#7 Avenhym

Avenhym

    GMC Member

  • GMC Member
  • 171 posts

Posted 10 March 2006 - 07:13 AM

Hey guys, check the first post for a link to the .gm6 version of the example.

Can this do bone animations like Halflife 1?  Or are halflife 1 models not quake 2 format tyope of models?  Cuz halfife 1 uses Quake 2 engine but they have a better way of doing animations.

<{POST_SNAPBACK}>

Unfortinately, it can't as is. I would have to look at the file format for halflife animations and see how the data is organised before I can really take a guess to see if its compatible with this format. I'll look into it though.

Edited by Avenhym, 10 March 2006 - 07:21 AM.

  • 0

#8 Ravotus

Ravotus

    GMC Member

  • GMC Member
  • 327 posts

Posted 10 March 2006 - 03:18 PM

Wow, exception could already do this, but this is still cool.
8/10  :(
EDIT: I was looking at the Machine code of the dll and look what I found...
ption4whatEv __ZNSt9exceptionD2Ev __ZN10__cxxabiv111__terminate

Could you explain that...  :rambo  ^_^ don't worry i know that isn't the right Xception.
Just sort of wierd seeing that

<{POST_SNAPBACK}>

An exception is a C++ error handling method. When an exception is "thrown", it causes a stack unwind and can be "caught" by the user or the operating system. Standard C++ programs include exception information in their code unless specificly disabled by the compiler.

Edited by Nintendofreak88, 10 March 2006 - 03:19 PM.

  • 0

#9 twaggy

twaggy

    GMC Member

  • New Member
  • 218 posts

Posted 12 March 2006 - 11:06 AM

thats amazingly kool wiked nice!!!! :)

Edited by twaggy, 12 March 2006 - 12:48 PM.

  • 0

#10 Da-Huntha

Da-Huntha

    GMC Member

  • New Member
  • 113 posts

Posted 12 March 2006 - 04:05 PM

where can I create MD2 models in? Millshape obviously doesn't want to do animations very well. (infact, importing this model in milkshape results in the animation not working at all.)

EDIT: Infact, milkshape does, it just sucks at importing. That'l render this question useless.

New question, why can't we have a higher image speed than 1? this works real annoying and makes the animation look so "laggy"

Edited by Da-Huntha, 12 March 2006 - 07:07 PM.

  • 0

#11 Avenhym

Avenhym

    GMC Member

  • GMC Member
  • 171 posts

Posted 13 March 2006 - 01:30 AM

Other than Milkshape, you could try using Anim8or and export the frames as .3ds then import it into Quake 2 Modeler which is available at www.polycount.com in the Quake 2 tools section. There are also a lot of free md2 models to download there aswel.

As to the image speed question: In GM, when you set the image_speed variable to a number grater than 1, it skips frames. With the way I have it set up in the example, it would do the same thing. Does this answer your question? If it doesn't email you gm6 to me (avenhym@hotmail.com) and I'll see what I can do.

Also, I will be making a faster and more efficent version (hopefully) soon. I hope to manage this by using a triangle strip instead of a triangle list. Stay tooned lol.

Edited by Avenhym, 13 March 2006 - 06:14 AM.

  • 0

#12 Ravotus

Ravotus

    GMC Member

  • GMC Member
  • 327 posts

Posted 13 March 2006 - 01:50 AM

Great job, it loaded everything I gave to it quite well! :D Here's something I loaded with it: http://nf88.net/Marvin.png
  • 0

#13 Toni12

Toni12

    Designer

  • New Member
  • 851 posts
  • Version:GM8

Posted 13 March 2006 - 03:02 AM

Uh..... this is so awsome! Were not worthy.... Were not worthy..... Were not worthy..... LOL! Thank You So Much Sir! :D :D :D
  • 0

#14 Da-Huntha

Da-Huntha

    GMC Member

  • New Member
  • 113 posts

Posted 13 March 2006 - 02:18 PM

Now a crash course on Quake 2 modeling and we're ready to go ;p
  • 0

#15 Toni12

Toni12

    Designer

  • New Member
  • 851 posts
  • Version:GM8

Posted 13 March 2006 - 03:06 PM

I can just use Blender, it exports to .md2 if anyone needs a model I'll make one for you! :D Just PM me! :D
  • 0

#16 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 14 March 2006 - 02:05 AM

cool
but add button to freeze the animation
  • 0

#17 twaggy

twaggy

    GMC Member

  • New Member
  • 218 posts

Posted 14 March 2006 - 02:54 AM

I can just use Blender, it exports to .md2 if anyone needs a model I'll make one for you!  :)  Just PM me!  :lol:

<{POST_SNAPBACK}>

i never new you could export .blender to quake 2 models huh?
  • 0

#18 Toni12

Toni12

    Designer

  • New Member
  • 851 posts
  • Version:GM8

Posted 15 March 2006 - 09:22 PM

Yeah they added it in the new version. It's not very well done but it's there. -_-
  • 0

#19 shad0w

shad0w

    GMC Member

  • GMC Elder
  • 1111 posts
  • Version:Unknown

Posted 22 March 2006 - 11:52 PM

Nice job with this, it's just what I have been after :(
  • 0

#20 Andyops

Andyops

    GMC Member

  • New Member
  • 120 posts

Posted 13 April 2006 - 11:17 PM

No I just found it Ironic that your Code had 3 Exceptions, while Xception's only had 1 ::lmao::
It's superb anyway
  • 0

#21 rivosaar

rivosaar

    GMC Member

  • GMC Member
  • 57 posts

Posted 10 October 2006 - 09:44 AM

i can only load one model?
  • 0

#22 Da-Huntha

Da-Huntha

    GMC Member

  • New Member
  • 113 posts

Posted 10 October 2006 - 01:28 PM

with a bit of expertise you can load more
  • 0

#23 the_row

the_row

    GMC Member

  • New Member
  • 169 posts
  • Version:Unknown

Posted 04 January 2007 - 08:36 PM

very good! but i have a probl. I loaded a monster called "berserk" from quake2 and when i run the room he just run and hit. How can i make him to do the other animation like pain, die,crouch?
  • 0

#24 usernamem

usernamem

    GMC Member

  • New Member
  • 18 posts

Posted 23 March 2007 - 11:09 AM

interpolate frame how is this? help :D
  • 0

#25 dany25

dany25

    GMC Member

  • GMC Member
  • 25 posts

Posted 24 March 2007 - 10:07 AM

i use gmmd2+gmtokamak

http://img223.images...2tokamakqg0.jpg

http://img223.images...tokamak2vz0.jpg
  • 0

#26 gamemakeriv

gamemakeriv

    GMC Member

  • Banned Users
  • 262 posts

Posted 25 March 2007 - 07:57 PM

Thats damm cool man.
How much is the average polygon support for stability.


HUa :) ,I dought max can export to that format

Does anyone know any quake exporter for 3ds max.


Could you add multiple model type support
for 3ds,x,obj,i3d.

#27 dany25

dany25

    GMC Member

  • GMC Member
  • 25 posts

Posted 26 March 2007 - 09:08 AM

i use this tool with 3ds import filter plugin ^_^

http://www.misfitcod.../misfitmodel3d/
  • 0

#28 miloud

miloud

    GMC Member

  • New Member
  • 4 posts

Posted 04 December 2007 - 04:47 PM

Wow, exception could already do this, but this is still cool.
8/10  :P
EDIT: I was looking at the Machine code of the dll and look what I found...
ption4whatEv __ZNSt9exceptionD2Ev __ZN10__cxxabiv111__terminate

Could you explain that...  :(  :P don't worry i know that isn't the right Xception.
Just sort of wierd seeing that

<{POST_SNAPBACK}>

:)
So you folks are experimented programmers?
Wow! I didn't realize that plus I dont have the time to read anything froms these forums!
Well, I'm a programmer my self ***PASCAL*** even that I learned by my self! NO SCHOOLS! NO INTERNET! Just me,my self and DELPHI 3!
(Now I have 7 but I use 6)
Well, it's amazing to know how much delphi can affect GM (considering GM is written by delphi) so keep in touch to discuss new scripts or something like that!
(you won't find me any time cause I don't use the net this much, I've got my life you know! :P )
  • 0

#29 C.Zorg

C.Zorg

    GMC Member

  • New Member
  • 381 posts

Posted 13 December 2007 - 09:18 AM

Tis DLL is really cool... The Example runs at ~2200 FPS...
I'm probobly gonna use this DLL...
  • 0

#30 -=NuBC4k3=-

-=NuBC4k3=-

    GMC Member

  • New Member
  • 14 posts

Posted 07 January 2008 - 06:49 PM

Hey there! Great DLL... Ive been looking for something like this for AGES to import .md2 files into my game... only thing is... Most of the models in my Quake 2 come with all the animations built in... is there a way to play say frames 6-9 instead of 1 - 15 or whatever.

The other thing is... This seems to take a lot of scripting where as U3D.dll or Irricht.dll dont need as much coding... I think... Am I correct or does this use less. Because I want to take .md2 files into my game without using too many scripts.

Thanks Matey

And again... Good Work

-=NuB=-
  • 0

#31 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 864 posts
  • Version:GM:Studio

Posted 29 February 2008 - 09:10 PM

hey are you able to import more than one model with this? if so how? i was only able to manage one.

EDIT:nvm i figured it out

Edited by 3D2DGAMES, 29 February 2008 - 09:22 PM.

  • 0

  My Twitter: @Salvakiya

 

#32 joaoneto

joaoneto

    GMC Member

  • New Member
  • 89 posts

Posted 14 February 2010 - 03:06 AM

It's an old topic i know. but i'm found this and i like it !!
but i have a problem. I have a devil md2 model, that works perfectly in the game i've extracted and works perfectly on the MD2 Viewer.
Posted Image
But in GM the skin is distorted:
Posted Image

I'll have to correct the texture to GM, and lost the correct version for MD2 viewer, or have a solution for this?

Here are the model and the texture.

Thanks in advice.
  • 0
D3DXNA - Using D3D Commands to Make Games in XNA !! -> 10%

#33 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 864 posts
  • Version:GM:Studio

Posted 20 February 2010 - 07:48 PM

maybe try flipping the texture upside down?
  • 0

  My Twitter: @Salvakiya

 

#34 Advokara

Advokara

    GMC Member

  • New Member
  • 116 posts

Posted 21 February 2010 - 09:11 AM

:S Link is dead... :'/ SADFACE!
Lol i have a MD2 MD3 solution already so its not so bad
  • 0

Current Project: Craftbox Version 0.5