Jump to content


Photo

Blender/3DMAX7 Animations to GM


  • Please log in to reply
29 replies to this topic

#1 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 21 July 2011 - 05:06 PM

Blender/3DMAX7 Animations to GM

Hello Every One, I've been able to parse an interresting animation file format (.G3D)
(more precisely Glest3D file)

So what ?
The most important thing, is that this program provide 2 exporter plugIn for Blender and 3DMax7

Why G3D?
-I made a script to fastly import G3D files to GM! see your self :)
-G3D support Static and animated objects (even support multiple objects)
-G3D saves Vertices,Normals, and UV's!
- I used GMBin.dll to speed up the Import!

Download Link :
link

Screen Shot :)
Posted Image


I hope it Helps! :D
  • 1

#2 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 24 July 2011 - 01:44 PM

Does it use d3d_transform_* functions or does it draw seperate models?
  • 0

#3 link3000

link3000

    Link3000

  • GMC Member
  • 1130 posts
  • Version:GM8

Posted 25 July 2011 - 02:40 AM

This is nice, though I'm not sure if it'll beat out the .md2 importer :P

@Regular - You should be able to use the new draw function just like d3d_model_draw(..);
  • 0

#4 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 27 July 2011 - 09:47 AM

This is nice, though I'm not sure if it'll beat out the .md2 importer :P

Well, to me it does, as G3D files are more detailed, and loads FASTER :D

Edited by The Scorpion, 27 July 2011 - 09:49 AM.

  • 0

#5 Markolainen

Markolainen

    GMC Member

  • New Member
  • 426 posts

Posted 24 August 2011 - 12:19 PM

What are the benefits of using this instead of using separate d3d models and animating them in an array?
I myself have had serious problems setting up the scripts for blender since there aren't any for max 2011. Is it possible for you to make fluid animations instead of frame animations?
  • 0

#6 amiel

amiel

    GMC Member

  • GMC Member
  • 1122 posts
  • Version:Unknown

Posted 10 October 2011 - 04:17 AM

thanks
Posted Image

Edited by amiel, 03 March 2013 - 06:31 PM.

  • 0

#7 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 10 October 2011 - 05:45 AM

Cool, I missed it when the topic started...

You really should not be using arrays though
  • 0

#8 loverock125

loverock125

    GMC Member

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

Posted 12 October 2011 - 06:04 PM

This looks great! Though basically you are importing a model for each animation frame and that doesn't sound very efficient. Edit: However I suppose there's no other way to import animations to game maker other than transformations :P

Great work!


@icuurd12b42
Why not?

Edited by loverock125, 12 October 2011 - 06:08 PM.

  • 0

#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 12 October 2011 - 06:14 PM

This looks great! Though basically you are importing a model for each animation frame and that doesn't sound very efficient. Edit: However I suppose there's no other way to import animations to game maker other than transformations :P

Great work!


@icuurd12b42
Why not?


Arrays are limited to 32k... 2d array is limited to 32k/2 2d entries. Large models could possibly not work. I think you use the array to store the vertices index.

[edit]
Also, I would convert this to a tool to generate a series of d3d models so people can pre-convert their animation and use them in GM without the need to use any dll.
  • 0

#10 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 16 October 2011 - 11:10 AM


This looks great! Though basically you are importing a model for each animation frame and that doesn't sound very efficient. Edit: However I suppose there's no other way to import animations to game maker other than transformations :P

Great work!


@icuurd12b42
Why not?


Arrays are limited to 32k... 2d array is limited to 32k/2 2d entries. Large models could possibly not work. I think you use the array to store the vertices index.

[edit]
Also, I would convert this to a tool to generate a series of d3d models so people can pre-convert their animation and use them in GM without the need to use any dll.



actually I'm not using arrays to store vertices!
1st index = animation index!
2nd index = frame index !
I won't imagine over 32000 animation in a game! or a 32000 frames animation O.o

well that tool would get rid of the Dll! but I like the animationfiles to be compact! (one file) and that way others can't use your models ;) thx for the reply!
it's been a while since I haven't visited GM :)
  • 0

#11 Nebuer

Nebuer

    GMC Member

  • GMC Member
  • 21 posts

Posted 16 October 2011 - 03:06 PM

This is probably the best implementation of animation in gamemaker i've seen (ogre/ultimate3d dont count as GM imo)

I made sort of a stress/speed test,
60 frames of animation, on a 2200 poly model, takes about 5-10 seconds to load, in a more large scale production; not ideal. although once loaded you can have several instances of the same animation at once keeping a nice frame rate.


Posted Image
http://img15.imagesh...5/6929/ron4.png

download. left click spawns a zombie, space clears all zombies.
http://www.mediafire...w12fe18g46u7l2p
with a better animator than me, and a better AI programmer this has alot of potential

Edited by Nebuer, 16 October 2011 - 03:08 PM.

  • 0

#12 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 16 October 2011 - 03:12 PM

^^ Neat!
  • 0

#13 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 17 October 2011 - 03:59 PM

Can't get the Blender exporter to work, have tried to zip it and load it, I tested to import it through folders and it didn't work. Anyone know what version the plug-in was made for, or have a build version?
  • 0

#14 jsorgeagames

jsorgeagames

    GMC Member

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

Posted 17 October 2011 - 09:55 PM

Can't get the Blender exporter to work, have tried to zip it and load it, I tested to import it through folders and it didn't work. Anyone know what version the plug-in was made for, or have a build version?

I can't get it to work either. I even tried importing it through the Add-ons menu but it won't show up. I'm assuming the plugin is for a pre-2.5 version of Blender because it says to install it in the .blender folder, which I think was only 2.4 and before.
  • 0

#15 Nebuer

Nebuer

    GMC Member

  • GMC Member
  • 21 posts

Posted 18 October 2011 - 04:22 AM

i can use it 2.49b just fine
  • 0

#16 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 18 October 2011 - 06:22 AM

i can use it 2.49b just fine

Thank you, this script needs to be updated.
  • 0

#17 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 21 October 2011 - 07:13 PM

This is probably the best implementation of animation in gamemaker i've seen (ogre/ultimate3d dont count as GM imo)

I made sort of a stress/speed test,
60 frames of animation, on a 2200 poly model, takes about 5-10 seconds to load, in a more large scale production; not ideal. although once loaded you can have several instances of the same animation at once keeping a nice frame rate.


Posted Image
http://img15.imagesh...5/6929/ron4.png

download. left click spawns a zombie, space clears all zombies.
http://www.mediafire...w12fe18g46u7l2p
with a better animator than me, and a better AI programmer this has alot of potential


I admit, Nice work done over there ;) well, thx ! it's indeed it's a nice tool! took time so that people recognize that but Neever late than NEVER

EDIT I've been able to speed up the Exemple! write your transformation code then use my g3d_draw() script! it's way faster that way! the way you wrote it, transformaton is done for every single part of the animation ! in the (For) loop

Thank you, this script needs to be updated.


What script ?
By the way, I had also problems to use Blender PluggIn at first! But if you flollw instructions you will find out how :) (as blender has tricky ways for installing plugIns)

Edited by The Scorpion, 22 October 2011 - 07:34 AM.

  • 0

#18 jsorgeagames

jsorgeagames

    GMC Member

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

Posted 21 October 2011 - 07:19 PM

What script ?

The Blender G3D exporter needs to be updated.
  • 0

#19 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 21 October 2011 - 07:21 PM


What script ?

The Blender G3D exporter needs to be updated.

Well I didn't make it! I don't know how :(

Edited by The Scorpion, 21 October 2011 - 07:29 PM.

  • 0

#20 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 22 October 2011 - 01:48 PM



What script ?

The Blender G3D exporter needs to be updated.

Well I didn't make it! I don't know how :(

You didn't wrote this?
Anyway I can't even get the this to work on Blender 2.49
When I was testing if this would work with Shapekeys.
From Blender
To G3D

After that I made an other test with Armature:
G3D Test

After that I made an other test with out triangels, but nothing changed.
With out Triangels

The conclusion: The exporter is broken.
BTW I used your example I only switched the file.

Also all the files can you
download here

Edited by eafg2, 22 October 2011 - 01:55 PM.

  • 0

#21 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 22 October 2011 - 07:30 PM




What script ?

The Blender G3D exporter needs to be updated.

Well I didn't make it! I don't know how :(

You didn't wrote this?
Anyway I can't even get the this to work on Blender 2.49
When I was testing if this would work with Shapekeys.
From Blender
To G3D

After that I made an other test with Armature:
G3D Test

After that I made an other test with out triangels, but nothing changed.
With out Triangels

The conclusion: The exporter is broken.
BTW I used your example I only switched the file.

Also all the files can you
download here


the model/animations should be triangles not QUADS ! that's probbaly why! here is some hints :

#PREPARE THE MODEL :
# Each of your meshes' faces must be a triangle (3 vertex)
# In Edit mode, you can press Space, edit>faces>Convert to Triangles
# Create and place all your meshes before texturing or animating.
# The X axe is the floor and the Y axe is the elevation. The center
# of the Blender's 3D space will be the center of you object, at the
# ground level. Before exporting your model, apply the transformations
# to each of your mesh (In the 3D space window's menu :
# Object->Clear/Apply->Apply ... )
# This will place the center of your mesh (the yellow or pink dot)
# at the center of the Blender 3D space.
#
# !!!!!!!!!!!!!!
# !!!new since 0.1.4: !!!
# If you have a non animating model, you have to set the start frame
# and the end frame to '1' in blenders 'timeline'-window. Otherwise a non
# animating animation will be exported, containing a lot of frames and your
# model gets really big.
# !!!!!!!!!!!!!!
#
# Before doing any texturing or animation, try to export your model and
# check your python console (the terminal which opens Blender) to see
# if there is a warning about the number of used faces in the summary.
# If there is, try to delete "false" faces (which use only 2 vertices)
# and transform all your faces in triangle.
#
#EXPORTING :
# You MUST select the meshes you want to export.
# Only meshes are exported among the selected objects.
#
# The diffuse color of the mesh will be it's (first) material's color.
# The opacity of the mesh will be it's material's alpha.
# Double sided property of the mesh is exported (see F9).
# If you want to use custom color in the texture, your mesh must be
# double sided. If you don't want custom color to be activated for the
# mesh, add a new boolean property to it (F4) named customColor and with
# the false value. Custom Color set if the alpha of the texture is
# replaced for the color of the player.
#
#TEXTURING :
# To use a texture for the mesh, you must add a texture at the FIRST
# position to the mesh's material. The texture type must be 'image'
# and you should insert the real image. In fact, only the filename
# of the image is used. After having mapped the image on the
# mesh with UV Face selection, you don't need anymore to "stick"
# the coordinates to the vertices.
# Your texture's format must be TGA, without compression and with the origin
# at the bottom left position. The side of the image must be a multiple
# of 2. In practice, you must use only one image for all your meshes.
#
#ANIMATING :
# You can export all animations made with blenders armature system.
# You have to set the start frame and the end frame in the 'timeline'-window
# to define the animation which will be exported.
# If you animate without using the armatures it will not work!!
#
# LINKS :
# Animating with armatures
# http://www.blender.o...tmlI/x1829.html
# Map an image on your mesh with UV Face selection :
# http://en.wikibooks....o/UV_Map_Basics
# http://download.blen...lI/ch11s05.html


  • 0

#22 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 22 October 2011 - 11:23 PM

the model/animations should be triangles not QUADS ! that's probbaly why! here is some hints :

#PREPARE THE MODEL :
# Each of your meshes' faces must be a triangle (3 vertex)
# In Edit mode, you can press Space, edit>faces>Convert to Triangles
# Create and place all your meshes before texturing or animating.
# The X axe is the floor and the Y axe is the elevation. The center
# of the Blender's 3D space will be the center of you object, at the
# ground level. Before exporting your model, apply the transformations
# to each of your mesh (In the 3D space window's menu :
# Object->Clear/Apply->Apply ... )
# This will place the center of your mesh (the yellow or pink dot)
# at the center of the Blender 3D space.
#
# !!!!!!!!!!!!!!
# !!!new since 0.1.4: !!!
# If you have a non animating model, you have to set the start frame
# and the end frame to '1' in blenders 'timeline'-window. Otherwise a non
# animating animation will be exported, containing a lot of frames and your
# model gets really big.
# !!!!!!!!!!!!!!
#
# Before doing any texturing or animation, try to export your model and
# check your python console (the terminal which opens Blender) to see
# if there is a warning about the number of used faces in the summary.
# If there is, try to delete "false" faces (which use only 2 vertices)
# and transform all your faces in triangle.
#
#EXPORTING :
# You MUST select the meshes you want to export.
# Only meshes are exported among the selected objects.
#
# The diffuse color of the mesh will be it's (first) material's color.
# The opacity of the mesh will be it's material's alpha.
# Double sided property of the mesh is exported (see F9).
# If you want to use custom color in the texture, your mesh must be
# double sided. If you don't want custom color to be activated for the
# mesh, add a new boolean property to it (F4) named customColor and with
# the false value. Custom Color set if the alpha of the texture is
# replaced for the color of the player.
#
#TEXTURING :
# To use a texture for the mesh, you must add a texture at the FIRST
# position to the mesh's material. The texture type must be 'image'
# and you should insert the real image. In fact, only the filename
# of the image is used. After having mapped the image on the
# mesh with UV Face selection, you don't need anymore to "stick"
# the coordinates to the vertices.
# Your texture's format must be TGA, without compression and with the origin
# at the bottom left position. The side of the image must be a multiple
# of 2. In practice, you must use only one image for all your meshes.
#
#ANIMATING :
# You can export all animations made with blenders armature system.
# You have to set the start frame and the end frame in the 'timeline'-window
# to define the animation which will be exported.
# If you animate without using the armatures it will not work!!
#
# LINKS :
# Animating with armatures
# http://www.blender.o...tmlI/x1829.html
# Map an image on your mesh with UV Face selection :
# http://en.wikibooks....o/UV_Map_Basics
# http://download.blen...lI/ch11s05.html


I read and tested some more. Nothing works, I tried with a simple box but it wouldn't show up at all in GM, Then I tried to give it a cut in the center and export it, at least GM renderd it but it was a hugh black mess.
Then I tried to give it color, alpha ect, still nothing worked.

So do you have a model that you can share so I can compare it with my failures. Or even better make a video tutorial. ( I would love to see that)

NOTES: All model had no quads and they had the right transformation, I also checked the timeline. Nothing was wrong with that.
  • 0

#23 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 23 October 2011 - 10:39 AM

ok I can think of 2 reasons:
- your Blender version is too new use 1.4b!
- tell if it repoerts an error when exporting!
  • 0

#24 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 23 October 2011 - 03:49 PM

ok I can think of 2 reasons:
- your Blender version is too new use 1.4b!
- tell if it repoerts an error when exporting!

Did you mean 2.49B?
Also I don't get any error when exporting, I checked the console

Edited by eafg2, 23 October 2011 - 03:50 PM.

  • 0

#25 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 23 October 2011 - 08:30 PM


ok I can think of 2 reasons:
- your Blender version is too new use 1.4b!
- tell if it repoerts an error when exporting!

Did you mean 2.49B?
Also I don't get any error when exporting, I checked the console

yes, my bad! I meant 2.49b!

I figurated out why! your model should be UVmapped and with normals ! That's why !
Edit : you need to specify 1st and last frame as well ! it works fine with me !

Edited by The Scorpion, 23 October 2011 - 09:01 PM.

  • 0

#26 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 23 October 2011 - 09:06 PM



ok I can think of 2 reasons:
- your Blender version is too new use 1.4b!
- tell if it repoerts an error when exporting!

Did you mean 2.49B?
Also I don't get any error when exporting, I checked the console

yes, my bad! I meant 2.49b!

I figurated out why! your model should be UVmapped and with normals ! That's why !
Edit : you need to specify 1st and last frame as well ! it works fine with me !

With normals?
Nope it didn't work.
After 50 test models I'am ready to give up and try to learn OGRE again.
  • 0

#27 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 23 October 2011 - 09:38 PM

Well I'm sorry for you! It works with me here! and others made it to work!
maybe I made something wrong some where but I'm almost sure everything is fine!

any way,there is still 3ds max PlugIn it's 100% efficient I'm testing it wright now!
  • 0

#28 Himanshu

Himanshu

    GMC Member

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

Posted 12 November 2012 - 04:06 AM

can you give me the link for 3ds MAX animation importing
  • 0

#29 drt_t1gg3r

drt_t1gg3r

    GMC Member

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

Posted 19 January 2013 - 08:15 AM

Don't know this is as funny as you thing but "The Scorpion" is ending his sentences with "!"'s that's quite funny to me. Never thought we could use it like a period LOL... either that or the scorp is a bit heated either way it's still funny
  • 0

#30 Alvare

Alvare

    Allrounder

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

Posted 19 January 2013 - 05:21 PM

Don't know this is as funny as you thing but "The Scorpion" is ending his sentences with "!"'s that's quite funny to me. Never thought we could use it like a period LOL... either that or the scorp is a bit heated either way it's still funny


wHATS ThE mAtTER?! isnt it GREAT TO TALK WITH eNTHUSIASM?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users