• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

3D The best extension to animate a 3d mesh?

DBenji

Member
...animate a 3d mesh? I have seen several files/extensions created for this purpose but I'm unsure what is currently considered the most popular/up-to-date way to do it, though I'm guessing this?

Also, can someone enlighten me on why YYG, apparently, has never provided a built-in way for this? Correct me if I'm wrong, but how does it seem possible that after 14+ years, 3D still seems to be the most under-developed area in GM engine?
 

DBenji

Member
I am aware of that. However, why then did YYG create the possibility for 3d development in the first place, if they would only want their games to remain exclusively targeted to a "2D userbase"? Can I also assume, based off of your statement, that YYG does not wish to promote 3d games in the Games Showcase?
 

DBenji

Member
Let's just say, in theory, a group of highly technical game devs were to create a very advanced and highly attractive 3D title with GMS. Would it be promoted in the Showcase? As far as I can tell, I am unable to find any 3d titles in the Showcase (though, I had assumed up until this point, there would be several).
 

orange451

Member
MishMash and I wrote a 3d skeletal animation system on the YYG marketplace. It's probably the most versatile animation system for game maker that is available right now.

Though, MD2 is a pretty good format for frame-based meshes. I may write an MD3 loader in the future.

If you're interested, here is a 3d pipeline MishMash and myself created:

I am aware of that. However, why then did YYG create the possibility for 3d development in the first place, if they would only want their games to remain exclusively targeted to a "2D userbase"? Can I also assume, based off of your statement, that YYG does not wish to promote 3d games in the Games Showcase?
2d is just 3d, and vice versa. One of them just contains a different projection matrix to render your scene.
 

DBenji

Member
Thanks you for all the replies.

@orange451 I actually was very excited when I first saw your system and all the code that was very diligently put into it on the marketplace. I immediately bought and downloaded a copy but was quite disappointed to find it takes quite a toll on my CPU. The red bar randomly spikes below and beyond the length in the screenshot below yielding a: 8, 477, 194 (min-max-average). My specs are:
Processor: Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz 2.80 GHz
Installed memory (RAM): 8.00 GB (7.71 GB usable)
3d animation fps.jpg
Which lead me to this post in the first place. I was under the impression that maybe this method was not up-to-date (the youtube video uses version gm 1.4.1567). I wish you would test it on "lower-end hardware" because I have no idea how to optimize it. My game already uses a significant portion of the gpu bar for the rendering pipeline, so I can't afford to also have an additional boost to the red bar.

@Lewa I actually like your system very much, and the existence of an already setup TBN-matrix or inverse-transpose matrix is a huge bonus (it's a must because I have a dynamic lighting model). I already plan to use it for multiple simple objects (like plants and scenery) but I'm not sure about characters.
The problem is for characters, I have animations that are relatively complex in the sense that they use graphs to interpolate keyframes (changing rate at which one frame is switched to another in order to simulate more life-like animations), so I am unsure as to how I would translate that into game.
I do have a question about memory though, other than taking up file size, what are the consequences if I were to upload, say, every frame of an 80+ frame animation be? Would it take a toll on the fps at all?

@KingdomOfGamez I'm actually in the process of learning how to use your system (which seems like an updated version that @orange451 made a while back). I will have to write my own TBN-matrix shader, but it shouldn't be a problem. I haven't had time to test it with my own animations yet, but it seems relatively fast.
 

DBenji

Member
2d is just 3d, and vice versa. One of them just contains a different projection matrix to render your scene.
While I like the wit behind this response, it fails to address the issue I was trying to find an answer for. Thankfully, I have taken the time to update my knowledge of the whole situation and I found the answer when Nocturne stated in another thread that the purpose of 3D is to provide developers access to certain 2.5D effects.

I am also aware that YYG has stated multiple times now that they are not interested in further developing 3d because there are many 3d engines on the market and YYG "couldn't possibly compete with them so it doesn't even try." But this still begs the question, if a qualified team of professionals were to use the existing 3d tools (both official and community-extended) to create a highly impressive "3d" (going by something like a first-person-shooter or anything else that emphasizes a 3d environment in which the player can constantly change the camera angle), would YYG hesitate to promote it in there games showcase?

Now I know it's not a life or death situation, because the game can simply be marketed in other ways besides being in the games showcase, or official marketing support from YYG themselves.., but I am currently under the impression that a game like that would definitely not receive the same kind of support/interest as say something like Ruin of the Wreckless, Nykra, or any other prominent 2d title - due to the idea that YYG wouldn't want new developers to be under the impression that GMS is a decent tool for 3d games.
 

Lewa

Member
@Lewa I actually like your system very much, and the existence of an already setup TBN-matrix or inverse-transpose matrix is a huge bonus (it's a must because I have a dynamic lighting model). I already plan to use it for multiple simple objects (like plants and scenery) but I'm not sure about characters.
The problem is for characters, I have animations that are relatively complex in the sense that they use graphs to interpolate keyframes (changing rate at which one frame is switched to another in order to simulate more life-like animations), so I am unsure as to how I would translate that into game.
I do have a question about memory though, other than taking up file size, what are the consequences if I were to upload, say, every frame of an 80+ frame animation be? Would it take a toll on the fps at all?
In terms of performance, the CPU overhead is pretty minimal. The only thing the CPU does is it takes the current 2 frames which have to be interpolated (which are stored in a combined mesh) and sends this data alongside the interpolation value to the GPU. The interpolation happens on the GPU via the shader.

So in terms of performance, no matter how high poly your 3D model is, the CPU performance stays exactly the same. The GPU will have to do pretty much most of the work. (The higher poly your mesh is, the more vertices have to be interpolated by the shader.)
However, as you already noticed, morph-targets aren't really well suited for high poly animations with tons of frames. The problem here is that while CPU performance will not increase, the memory requirement of the animation and the loading times (of the .bao animation files) will.
(This is due to the way how i implemented them in GM. For every 2 keyframes i generate a seperate mesh which stores the meshdata of those 2 frames in order to interpolate between them on the GPU. This includes vertex position data, texture coordinates, normals, etc...) It's very fast as it allows you to run the whole animation on the GPU, but it comes at a cost of increased memory usage in the memory of the graphics card.

Originally i wrote this technique to animate a 3D character in my project. My character model was very low poly and thus the memory requirements of the animations weren't really a problem. (The memory requirement increases with the number of frames and polygons.)
If you use morph-targets you also have to animate your character with the limitations of the technique in mind. I often try to reduce the number of keyframes as much as possible while still making the animation look good.
(So my running animation has like 8 frames, my jumping animation has 4, etc...)
The advantage i gained is that drawing an animated character is (on the CPU side) blazingly fast which was very important for me as i do have a multiplayer mode in which i aim to support up to 64 animated 3D characters in the scene at the same time.
So having this low CPU overhead is definitely a big advantage (in my case.)


But basically: If you really need dynamic 3D animations on high poly characters, your only real option is to use a skeletal animation system. (unless you severely cut down on keyframes and triangles and put up with the limitations of the morph-target technique.)

Each technique has its advantages and disadvantages. :)
 
Last edited:
MishMash and I wrote a 3d skeletal animation system on the YYG marketplace. It's probably the most versatile animation system for game maker that is available right now.

Though, MD2 is a pretty good format for frame-based meshes. I may write an MD3 loader in the future.

If you're interested, here is a 3d pipeline MishMash and myself created:


2d is just 3d, and vice versa. One of them just contains a different projection matrix to render your scene.
Just want to say, this looks amazing. Would pay $50 for this kind of functionality.
 

orange451

Member
I actually was very excited when I first saw your system and all the code that was very diligently put into it on the marketplace. I immediately bought and downloaded a copy but was quite disappointed to find it takes quite a toll on my CPU. The red bar randomly spikes below and beyond the length in the screenshot below yielding a: 8, 477, 194 (min-max-average). My specs are:
Processor: Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz 2.80 GHz
Installed memory (RAM): 8.00 GB (7.71 GB usable)
View attachment 4579
Which lead me to this post in the first place. I was under the impression that maybe this method was not up-to-date (the youtube video uses version gm 1.4.1567). I wish you would test it on "lower-end hardware" because I have no idea how to optimize it. My game already uses a significant portion of the gpu bar for the rendering pipeline, so I can't afford to also have an additional boost to the red bar.
Unfortunately, it is as fast as it can be with Game Maker. This is just a limitation of the game maker engine in regards to iterating through a lot of array data. There's a couple things you can do, however:
  1. Compile under YYC. This will give you a great speed boost. MishMash and I created a game jam last year using it.
  2. Use models with less bones. Since each matrix is calculated per bone, the most obvious thing you can do to reduce the computational overhead is to simply have less bones.
  3. Update your models less often, OR have model pools. If, for example, you have 100 zombies in your scene, you could simply have 10 animated instances of zombies, and when you spawn a new zombie assign it to one of the 10 animated models. When you draw, you just send in the pre-computed character from the pool.
If you need any help, feel free to message me on skype: orange4513
 
Last edited:

DBenji

Member
@Lewa Thank you very much for the thorough and detailed info on how your system works. I will take all of this into account when I use it.

@orange451 Oh I see. Thanks for the tips. I'll give that a shot.
 
Top