Jump to content


Photo

Loading external objects


  • Please log in to reply
9 replies to this topic

#1 blanton

blanton

    GMC Member

  • GMC Member
  • 121 posts

Posted 23 January 2012 - 05:31 AM

Hi everybody, it's been months now that I have been trying to figure out how to load an external model from blender or something like that. I looked through hundreds of tutorials but every singe one of them is out dated. Please, can somebody tell me how to load external objects into the game? I really wanna start learning 3D but without knowing how to load external models, I can't start.
  • 0

#2 Mayhem Games

Mayhem Games

    Proud Kiwi

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

Posted 23 January 2012 - 05:54 AM

I recomend you use GMOgre. Ogre3D has a plugin for Blender (I believe it only supports 2.49a and below) which exports models to .mesh. Importing the mesh file requires only a line or two at minimum to import.
  • 0

#3 blanton

blanton

    GMC Member

  • GMC Member
  • 121 posts

Posted 23 January 2012 - 06:10 AM

sigh =/
  • 0

#4 Gamer3D

Gamer3D

    Human* me = this;

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

Posted 23 January 2012 - 06:54 AM

Here's the file format description. You can write code to load that. Alternately, export to an OBJ file, then import that using one of the many scripts floating around. Or to MD2/MD3. Or to 3DS (Pretty sure there are some scripts for it online. I know I've made one, but not posted it).

Anyway, that's my take on your problem.
  • 0

#5 Robert3DG+

Robert3DG+

    Designer

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

Posted 23 January 2012 - 11:08 PM

I recommend just creating your models ingame using a script and then referring to them from there.
  • 0

#6 JYoshi10

JYoshi10

    GMC Member

  • New Member
  • 23 posts

Posted 24 January 2012 - 06:43 AM

This is what I do.
First, create your model in whatever program you want, then export it to .obj format.
Second, open the with GMModelFix, and make sure everything is correct (like UVs and normals). Export to .d3d format.
Last, import to your game. (I'm assuming you know how to do that.)
I also found this dll. Might be interesting.
  • 0

#7 nh_99

nh_99

    GMC Member

  • New Member
  • 12 posts
  • Version:GM8

Posted 01 February 2012 - 12:42 AM

To load my models I use Homunculus Model Converter (download here). Then, just put the model in the game folder and load it using this script:
modelname=d3d_model_create()
d3d_model_load(modelname, "modelname.d3d")

This works as long as the object isn't too big.

Edited by nh_99, 01 February 2012 - 12:42 AM.

  • 0

#8 starfire_64

starfire_64

    Galactic Flame

  • GMC Member
  • 125 posts
  • Version:GM8.1

Posted 25 February 2012 - 10:06 PM

Hi everybody, it's been months now that I have been trying to figure out how to load an external model from blender or something like that. I looked through hundreds of tutorials but every singe one of them is out dated. Please, can somebody tell me how to load external objects into the game? I really wanna start learning 3D but without knowing how to load external models, I can't start.


I watched this video on YouTube about loading models from blender, or any program that can export to .obj. It got me started with my3D Game.

http://www.youtube.c...h?v=Qa8qpumSuGA

Edited by starfire_64, 26 February 2012 - 05:20 PM.

  • 0

#9 Buff-Robotix

Buff-Robotix

    Who Took My Pants!?!

  • GMC Member
  • 314 posts

Posted 09 March 2012 - 08:02 AM

My personal favorite .obj to .d3d converter is anim8or and script written for it found on this page. It is the only converter that has never failed me.
  • 0

#10 Gamer3D

Gamer3D

    Human* me = this;

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

Posted 09 March 2012 - 08:40 AM

My personal favorite .obj to .d3d converter is anim8or and script written for it found on this page. It is the only converter that has never failed me.

Anim8or is old (Last update was in 2006), and rather outdated. Perhaps a better solution is to load obj files using a GM script. If you find a good description of the file format (and it is a simple enough one) it won't be hard to make a script to load it (I've made scripts to load obj and 3ds files, and OmicronGamer made some to load MD2 and MD3 files).
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users