Jump to content


Photo

Get Anim8or Models Into Your Game


  • Please log in to reply
85 replies to this topic

#1 Null

Null

    GMC Member

  • New Member
  • 67 posts

Posted 13 October 2007 - 08:13 AM

Getting 3D Models into Game Maker Games
Everyone seems to have a problem doing this, even though it is incredibly easy if you do it the way I do. That is the purpose of this tutorial - to explain the fastest, easiest, and most efficient way to get your 3D model into a Game Maker game.
Install Anim8or
Download the latest version of Anim8or (0.95c) at the official website.
It is simply a ZIP archive, so extract it to a folder where it's easy to find. I extracted it to a folder on my desktop named 'Anim8or'. After extracting, go into that directory and create a new folder named 'Scripts'.


Posted Image

To install the export plugin, copy export_gm6_plugin.a8s into that folder.
Open Anim8or and go to File->Configure. Next to the 'Scripts:' field, there is a button which has a caption of '...' Click on it and select your Scripts directory we just created.

Posted Image

Make sure the 'Preload Scripts' option is enabled.

Posted Image

Click on OK and close Anim8or. The plugin is now installed and Anim8or will load it the next time it starts up!

Edited by xot, 22 January 2010 - 04:26 AM.

  • 1
www.tysonc.net
Want to load models from Anim8or into your games? Use my export plug-in for Anim8or v0.95 Updated as of 4.14.07!
Want to learn Game Maker's 3D? Read my tutorials

#2 Null

Null

    GMC Member

  • New Member
  • 67 posts

Posted 13 October 2007 - 08:15 AM

Exporting a Model for your Game Maker Game
You can now make a model inside Anim8or, or load a previously existing one. The plugin will even export materials - so you can color your model inside Anim8or and UV map it. All that information will be saved. Once you have your model the way you want it to look, go to Object->Export...

Posted Image

Under the 'Save as type:' listbox, select Game Maker 6 Model:plug-in(*.d3d).

Posted Image

Give the model a meaningful name and click on Save. All exported models have the extension ".d3d" but it really doesn't matter what the extension is. That's just what I chose to use.
Using Your Exported Model
The exported model is now in Game Maker's 3D model file format. Therefore, you can load it using the built-in functions. For example:
model = d3d_model_create();
d3d_model_load(model,"car.d3d");
texture = background_get_texture(bckCar); //bckCar here is a background that is the model's texture
To draw your model:
d3d_model_draw(model,0,0,0,texture);
Here's the model exported directly from Anim8or into my Game Maker game:

Posted Image

Get the source to an example model viewer here

Edited by Null, 13 October 2007 - 08:19 AM.

  • 0
www.tysonc.net
Want to load models from Anim8or into your games? Use my export plug-in for Anim8or v0.95 Updated as of 4.14.07!
Want to learn Game Maker's 3D? Read my tutorials

#3 freaked

freaked

    freak up!

  • New Member
  • 890 posts

Posted 13 October 2007 - 09:20 AM

Nice topic.
This will stop a lot of people from asking the same question. Personally , I prefer to use Mosaic Lite to load *.obj files into my games.
  • 0

#4 ZZ man

ZZ man

    GMC Member

  • New Member
  • 1745 posts

Posted 13 October 2007 - 09:21 AM

wow thanx
  • 0
If you will be laughing on December 23 2012, put this in your sig.

#5 BillyGoat_and_1CoolCat

BillyGoat_and_1CoolCat

    GMC Member

  • New Member
  • 218 posts

Posted 14 October 2007 - 01:09 PM

i've been using marzipan and UVmapper only because i can't figure out how to UVmap my models in Anim8or. I can do just about everything else thinkable in Anim8or except UVmap. perhaps you could show how to do that....?
  • 0

#6 Zisomek

Zisomek

    GMC Member

  • New Member
  • 25 posts

Posted 14 October 2007 - 08:17 PM

what is bckCar and what do we do to make our version of it?
  • 0

#7 abacus

abacus

    GMC Member

  • New Member
  • 1330 posts

Posted 14 October 2007 - 09:03 PM

Zisomek- learn how to use game maker before posting.
  • 0

#8 Holy Fruit

Holy Fruit

    GMC Member

  • New Member
  • 254 posts

Posted 15 October 2007 - 12:17 AM

thankz pretty much. dis comz useful,especially coz im anim8or uzer,mmm/
  • 0
reality is not solid

#9 gompen

gompen

    A gomp

  • New Member
  • 656 posts

Posted 15 October 2007 - 08:11 PM

This will help a lot, if they just would take the time to search
  • 0

#10 1101

1101

    GMC Member

  • GMC Member
  • 462 posts

Posted 17 October 2007 - 01:21 AM

This may seem a bit strange but it makes it easier for me to understand. Anyway, from that code to load a 3d model in the example link you provided could you put actual data in? For instance instead of saying fname put C:\documents\examplemodel.d3d. (And really you could just make up totally random names) It just helps me see where to input data.
  • 0

#11 Spartan117John

Spartan117John

    GMC Member

  • GMC Member
  • 579 posts

Posted 17 October 2007 - 01:54 AM

Nice tutorial! I've been using Mosiac Light as well, but this may change that.

Only one thing I have a problem with....

After extracting, go into that directory and create a new folder named 'Scripts'.


Posted Image

To install the export plugin, copy export_gm6_plugin.a8s into that folder.

<{POST_SNAPBACK}>


You say to "copy export_gm6_plugin.a8s into that folder" but what do you mean by copy? Do you put it in a notepad text document or something? You can't just paste the text into a folder. Can you? :blink:
  • 0

#12 Null

Null

    GMC Member

  • New Member
  • 67 posts

Posted 17 October 2007 - 02:15 AM

You definitely could, 1101.
Spartan117John, by that, I mean download it to your Scripts folder. You can do that by right-clicking here and selecting "Save target as" and navigating to your Scripts folder and save it there.
  • 0
www.tysonc.net
Want to load models from Anim8or into your games? Use my export plug-in for Anim8or v0.95 Updated as of 4.14.07!
Want to learn Game Maker's 3D? Read my tutorials

#13 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 17 October 2007 - 02:35 AM

does this work for GM7? How about UV maps?
  • 0

#14 Spartan117John

Spartan117John

    GMC Member

  • GMC Member
  • 579 posts

Posted 17 October 2007 - 05:52 PM

Spartan117John, by that, I mean download it to your Scripts folder. You can do that by right-clicking here and selecting "Save target as" and navigating to your Scripts folder and save it there.

<{POST_SNAPBACK}>


Oh, of course! I feel dumb now! :P
Thanks!
  • 0

#15 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 18 October 2007 - 02:16 AM

I downloaded the plugin script and loaded it in, but when I hit ok, it gave me a prompt. I forgot the msg and really didnt pay any attention to it and clicked ok.

when I closed anim8or and reopened it, a debug window appeared as well as the normal window. the normal window locks up and the debug window just sits there.

something wrong with the script I downloaded?
  • 0

poof_sig.png


#16 Null

Null

    GMC Member

  • New Member
  • 67 posts

Posted 18 October 2007 - 03:01 AM

This should work fine for Game Maker 7 too!
Newly Discovered, try deleting your script, and just go through this tutorial again exactly as described. It's not given anyone else any problems, so you must have made a mistake somewhere along the way.
  • 0
www.tysonc.net
Want to load models from Anim8or into your games? Use my export plug-in for Anim8or v0.95 Updated as of 4.14.07!
Want to learn Game Maker's 3D? Read my tutorials

#17 LaLaLocksinford

LaLaLocksinford

    GMC Member

  • New Member
  • 8 posts

Posted 19 October 2007 - 02:28 AM

Um.. for some strange reason, ITS NOT WORKING. I folow the steps then no effects happen.. its strange.. any help?
  • 0

#18 LaLaLocksinford

LaLaLocksinford

    GMC Member

  • New Member
  • 8 posts

Posted 19 October 2007 - 02:44 AM

AGGHH!!!! EVERYTHING IS FOR GM7 PRO!!! i havent exicuted ONE script without it saying "ERROR : THIS IS ONLY ACCESABLE IN GM PRO!".. ugh..

Edited by LaLaLocksinford, 19 October 2007 - 02:53 AM.

  • 0

#19 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 19 October 2007 - 02:57 AM

That's because 3D is only in the pro version. It always has been.
  • 0

#20 snapel

snapel

    GMC Member

  • New Member
  • 106 posts

Posted 19 October 2007 - 03:47 AM

Neat! This is really helping alot! Oh does itwork with moving models? :wub:

P.S. I got an error, with thing... When i start i need to "show" the game where are my objects. What i did wrong? Do i have to set a path somewhere?

Edited by snapel, 19 October 2007 - 04:11 AM.

  • 0

#21 Tomaska

Tomaska

    GMC Member

  • New Member
  • 208 posts

Posted 20 October 2007 - 02:41 PM

:P Doesn't work! :medieval:
  • 0

#22 gmldog76

gmldog76

    GMC Member

  • GMC Member
  • 178 posts

Posted 02 November 2007 - 08:59 PM

i can't get it to work ether. :lol:
  • 0

#23 Milun

Milun

    GMC Member

  • New Member
  • 43 posts

Posted 04 November 2007 - 07:52 AM

just a question, does this work with Anim8tor animations too? :)
  • 0

#24 Milun

Milun

    GMC Member

  • New Member
  • 43 posts

Posted 05 November 2007 - 09:50 AM

Yeh, um I downloaded it, and it works but it has an error message that pops up. I dont know if it influences it though. Also when i run the model on GM, some parts are missing from the original. I tried everything so please help, cos i really need to know how to do this! :skull: :skull: :P

Edit: If anyone else has this problem, I have found the solution. Just export your model in halfes, or quarters or if its a really big model, in eighths. Just tell game maker to run them all at the same time in the same place and there you go. :P

Edited by Milun, 09 November 2007 - 10:37 PM.

  • 0

#25 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 05 November 2007 - 06:17 PM

Hmm, i done what you said, but i cant export in gmd3d file :skull:
Can someone please help?
  • 0

#26 Ichiroku

Ichiroku

    GMC Member

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

Posted 09 November 2007 - 12:15 PM

tnx! much people are gonna use it. and it actually works.
  • 0

#27 alexw

alexw

    GMC Member

  • New Member
  • 103 posts

Posted 16 November 2007 - 05:18 PM

Nice tutorial, i canna use because its faster than the others.
Much faster :D

Alexw

Edited by alexw, 16 November 2007 - 06:35 PM.

  • 0
The A.S. Clubę has been working on a new project. Called The Golden Century.
In this new game you are going experience to be at war on sea or on land, in the Golden Age.
For more information, check the The Golden Century Homepage.

#28 GisleAune

GisleAune

    GMC Member

  • New Member
  • 278 posts

Posted 17 November 2007 - 01:33 PM

How to uvmap a .D3D file, coz they have uvmap working

Make ur model in anim8or
export to .obj
UVMAP it
Inport from .obj
save as .d3d

And its finished, thanks 4 reading

the exporting gives a almost empty or crappy .d3d file if you don't delete your paths and other things that aren't mesh

if you use a primitive, convert it to mesh and it works.

-Gisle

Edited by GisleAune, 17 November 2007 - 01:35 PM.

  • 0
Taming the mighty Ogre3D...

Sorry, my avatar can't be grasped by mere mortals.

#29 sp-games

sp-games

    GMC Member

  • New Member
  • 17 posts

Posted 20 November 2007 - 10:55 AM

Hi,
I made a model with anim8or and exported
it using the plugin, but it wont show up in gamemaker.
I get no errors, and I dont use textures for it, only the materials
of anim8or. I have done anything the tutorial said, and tested in
gamemaker if the file was present (using 'file_exists()') but it wont show up...
Can anyone please help?
  • 0

#30 gameguru345

gameguru345

    GMC Member

  • New Member
  • 97 posts

Posted 21 November 2007 - 06:02 AM

how do you save the textures that you make in anim8tor?
  • 0

#31 cyberdudequestor

cyberdudequestor

    GMC Member

  • New Member
  • 378 posts

Posted 22 November 2007 - 04:09 AM

NO WAY!!!

I loved to mess around with anim8or, but now I can use it in gamemaker! Thanks so much!
  • 0

#32 elliotl

elliotl

    GMC Member

  • Banned Users
  • 160 posts

Posted 25 November 2007 - 02:50 AM

what code gos where?

#33 cwarn23

cwarn23

    GMC Member

  • New Member
  • 111 posts

Posted 26 November 2007 - 12:19 PM

EXCELLENT. For the first time I can use 3D objects made in modeling programs such as blender and import them into gamemaker (and hasel free)

For those of you who have a few troubles loading the model, put in the draw event:
d3d_model_draw(model,x,y,30,texture);
and try adjusting the 30 on the z axis and this should locate the model to where the object is placed. For me, it was a problem at first for seeing the object in my game but it turned out that since there were no x, y and z cooridinates, it just got the computer a little confused making it put the object in the wrong spot.

So great work 'Null' or whoever posted this topic.
  • 0

#34 elliotl

elliotl

    GMC Member

  • Banned Users
  • 160 posts

Posted 26 November 2007 - 08:24 PM

nevermind. i got the model into my game. i forgot to draw it XD

#35 lars141

lars141

    GMC Member

  • GMC Member
  • 716 posts

Posted 02 December 2007 - 07:31 PM

Edit: If anyone else has this problem, I have found the solution. Just export your model in halfes, or quarters or if its a really big model, in eighths. Just tell game maker to run them all at the same time in the same place and there you go. :medieval:

<{POST_SNAPBACK}>


Thanks for the solution man! Very much thanks too for this program!!

EDIT: Nope! It doesn't work! If i try to create parts, it doesn't show both parts!

Edited by lars141, 02 December 2007 - 07:43 PM.

  • 0
Posted Image 2000+ Downloads! "I laughed hard" "That made my day" "20/10 awesomness!"

#36 Boffel Production

Boffel Production

    TWP Developer

  • New Member
  • 350 posts

Posted 02 December 2007 - 07:52 PM

How to uvmap a .D3D file, coz they have uvmap working

Make ur model in anim8or
export to .obj
UVMAP it
Inport from .obj
save as .d3d

And its finished, thanks 4 reading

the exporting gives a almost empty or crappy .d3d file if you don't delete your paths and other things that aren't mesh

if you use a primitive, convert it to mesh and it works.

-Gisle

<{POST_SNAPBACK}>


So, what should I UV map it with? You just said UVMAP it in one step, but thats not easy without a program. And u need the pro version of "uv mapper" to do that.

Edited by Boffel Production, 02 December 2007 - 07:53 PM.

  • 0

#37 ESENESES (marshmallowman88)

ESENESES (marshmallowman88)

    GMC Member

  • New Member
  • 5 posts

Posted 09 December 2007 - 12:52 AM

I am also having the problem with the objects not being completed, I get pieces parts but not the whole object, if anyone can figure this out I will be very thankful

Thanks, marshmallowman88
  • 0

#38 rocky 43

rocky 43

    GMC Member

  • New Member
  • 169 posts

Posted 09 December 2007 - 05:05 PM

Hi,
I made a model with anim8or and exported
it using the plugin, but it wont show up in gamemaker.
I get no errors, and I dont use textures for it, only the materials
of anim8or. I have done anything the tutorial said, and tested in
gamemaker if the file was present (using 'file_exists()') but it wont show up...
Can anyone please help?

<{POST_SNAPBACK}>


I have the same problem. Do I have to Start D3d and all that stuff before?
  • 0

#39 ESENESES (marshmallowman88)

ESENESES (marshmallowman88)

    GMC Member

  • New Member
  • 5 posts

Posted 09 December 2007 - 11:45 PM

Yes, gamemaker is probably going to have a hard time displaying a 3D image... in 2D. So yes you have to let gamemaker know you are using 3D beforehand
  • 0

#40 Jepie0

Jepie0

    GMC Member

  • GMC Member
  • 213 posts

Posted 12 December 2007 - 02:00 AM

I have the same problem as newly discovered the debug window appears upon loading animor8 and wont let me do anything. I have downloaded the latest version of animor8 and tried various times deleting and placing the file back in scripts and it still wont work.

Has anyone figured out how to fix this. Also could it be a vista problem?

Thanks, Jepie0
  • 0

#41 johnsson man

johnsson man

    GMC Member

  • New Member
  • 69 posts

Posted 12 December 2007 - 08:40 AM

I have the same problem as newly discovered the debug window appears upon loading animor8 and wont let me do anything. I have downloaded the latest version of animor8 and tried various times deleting and placing the file back in scripts and it still wont work.

Has anyone figured out how to fix this. Also could it be a vista problem?

Thanks, Jepie0

<{POST_SNAPBACK}>


What does it say in the debug window?

This is what it shall say : Compiling "the path for the script"
82 lines 0 errors
  • 0

#42 Watever

Watever

    GMC Member

  • New Member
  • 146 posts

Posted 12 December 2007 - 09:06 AM

i use vista and im fine
  • 0
(\__/)
(='.'=)
(")_(")
This is bunny. Put him in your signature and help him on his way to world domination.

#43 Jepie0

Jepie0

    GMC Member

  • GMC Member
  • 213 posts

Posted 12 December 2007 - 02:22 PM

What does it say in the debug window?

the debug window is blank and wont allow me to type anything and when i exit the debug window it also closes the animor8 window. I have no idea why this wont work i did exactly what the tutorial said.

Thanks, Jepie0
  • 0

#44 phantom king

phantom king

    GMC Member

  • New Member
  • 605 posts

Posted 16 December 2007 - 10:10 AM

ok to those who is exporting and when loading is gettig nothig, Make sure your models are not 'Group' But rather 'Join Solids'. That should get your model working.


My problem is that some parts are missing! and i have try alot of things but no luck, also not that my models are uber small!! Any idea on how to fix this?
  • 0

#45 cbruno (brazil)

cbruno (brazil)

    GMC Member

  • New Member
  • 56 posts

Posted 18 December 2007 - 09:17 PM

Tutorial is compatible gm7?
  • 0

#46 AlTheUnderdog

AlTheUnderdog

    GMC Member

  • New Member
  • 45 posts

Posted 30 July 2008 - 02:58 PM

hey i installed the script and a debug comes up when anim8tor start but when i save as, there is no .d3d do i have to reboot the computer?

hey i installed the script and a debug comes up when anim8tor start but when i save as, there is no .d3d do i have to reboot the computer?

oops i was saving as.. instead of exporting <_<
  • 0

#47 AJDav

AJDav

    GMC Member

  • Validating
  • 4 posts

Posted 22 August 2008 - 03:24 PM

Hmph this i thought was great but the plug in thing needs to know what what program runs it. What is the program?


Edited by AJDav, 05 March 2015 - 03:52 PM.


#48 AJDav

AJDav

    GMC Member

  • Validating
  • 4 posts

Posted 22 August 2008 - 03:35 PM

I downloaded the plugin script and loaded it in, but when I hit ok, it gave me a prompt. I forgot the msg and really didnt pay any attention to it and clicked ok.

when I closed anim8or and reopened it, a debug window appeared as well as the normal window. the normal window locks up and the debug window just sits there.

something wrong with the script I downloaded?

This happened to me as well what do i do

#49 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 01 October 2008 - 07:27 PM

i have a .mdl model any way the anim program can import these in. if not you know any way to convert .mdl models to .3ds or suitable format?
  • 0

#50 Quinlan Vos

Quinlan Vos

    GMC Member

  • New Member
  • 138 posts

Posted 09 October 2008 - 12:02 PM

just to let some of you guys know....the debug menu is the script just minus it and don't touch it, and you'll be fine :whistle:
  • 0
3-D build you own car coming soon :D