SMF - 3D skeletal animation - New version available

The-any-Key

Member
Hi.
The FBX parser is done.
Sent via PM.

Exported FBX from blender with a dummy texture and animation:
3DScene.gif
The JSON will look like this:
https://drive.google.com/open?id=107fTVTJynJ1ShMmN8R7hMX24ufoTYkvW

Whenever the end of a key or "elem_props_type" is "_map" it is a ds map and "_list" it is a ds list. So it will be easier to use the data.

The elem_props_data_list and elem_props_type_list is synced.
Ex:
if elem_props_type_list[0]="unsigned_int_8_list"
The elem_props_data_list[0]=a ds list with unsigned int 8

Ex of use a list:
Code:
var elem_list=The elem_props_data_list[0];
show_debug_message(elem_list[| 0]);
Code:
"elem_props_data_list": [
    [
        1.0,
        1.0,
        -1.0,
        1.0,
        -1.0,
        -1.0,
        -1.0,
        -1.0,
        -1.0,
        -1.0,
        1.0,
        -1.0,
        1.0,
        0.999999,
        1.0,
        0.999999,
        -1.000001,
        1.0,
        -1.0,
        -1.0,
        1.0,
        -1.0,
        1.0,
        1.0
    ]
],
"elem_props_type_list": [
    "float_64_list"
],
Now it is a whole other story to actually try to make some sense of this data.
 
Last edited:

TheSnidr

Heavy metal viking dentist
GMC Elder
Well, I didn't know there is currently a bone limit, but to clarify, I'm not interested in unlimited bones for models actually... I wouldn't want you to get focused on something that most of us might not need. I'm interested in being able to adjust many bone positions/rotations during runtime or produce realtime samples for things like procedural animation.



I'm perfectly fine with it not affecting other bones in the hierarchy. As long as you can reset the bone transform during runtime and it comes at cheap cost - and by cheap I mean you can have many bones doing this and it can run on most PCs. But if it's something that's simply not possible or difficult to achieve there's no problem.

Also, sorry if I didn't get the memo, but what's the current state of being able to import pre-made animations from Blender in this engine? If this isn't currently a feature, I would like to add to the voices of anyone requesting it.

I got to briefly try out the SMF tool. It's very impressive! It will definitely help many users who are new to 3d overcome/bypass the frustrations of having to learn to rig/skin/animate in 3d software like Blender and Maya.
A suggestion: being able to select where you place the next keyframe instead of having it appear halfway between two frames.
I will resume my quest for importing popular animation formats as soon as I'm done with the rewrite of the system! :D
With the new system, you will indeed be able to do procedural animation. It will have scripts for modifying bones and creating animations on the fly. I will also attempt to make the inverse kinematics seen in the editor available through code.

Though the rewrite mainly is to make the scripts more accessible, I'm also having fun overhauling the controls!
 
sorry to poke you again.

I was playing around with the shadows, but I couldn't get things that have alpha in the texture to work:

I tried modifying the sh_smf_shadowmap fragment shader like this:
varying float v_vDepth;
varying vec2 v_vTexcoord;
void main()
{
vec4 baseCol = texture2D(gm_BaseTexture, v_vTexcoord);
if (baseCol.a < 0.01){discard;}
gl_FragColor = vec4(vec3(floor(v_vDepth * 255.0) / 255.0, fract(v_vDepth * 255.0), fract(v_vDepth * 255.0 * 255.0)),baseCol.a);
}
but it was still the same result.
I am not great at shaders, but I gave it my best shot

texture: https://www.dropbox.com/s/pt8mjotngs6uhit/texTree0.png?dl=0
obj: https://www.dropbox.com/s/iyjar7h7vvs0hd5/tree0d.obj?dl=0
smf: https://www.dropbox.com/s/e5m3sqjq3kjlhr8/tree0.smf?dl=0


edit: never mind. I am a poopy head. I realized that when updating the shadow map, I was not inputting a texture
 
Last edited:

TheSnidr

Heavy metal viking dentist
GMC Elder
Here's the source to the model tool as it is at the moment, in case anyone's interested. I got pretty far with the rewrite, almost all scripts have been rewritten. Instead of just being an animation engine, it's now more like an animation framework. Creating rigs and animations on the fly is now possible through code.

I want to continue working on this, but I can't keep spending as much time as I have been on this project. Updates will be sparse, and as such, I'd like to share what I already have, even though it's not completed.
Here's some WIP documentation for the animation part of the engine:
https://www.dropbox.com/s/o5wku78dc40anr8/SMF Animation System 0.9.9 docs Unfinished.pdf?dl=0
 

Joe Ellis

Member
Here's the source to the model tool as it is at the moment, in case anyone's interested. I got pretty far with the rewrite, almost all scripts have been rewritten. Instead of just being an animation engine, it's now more like an animation framework. Creating rigs and animations on the fly is now possible through code.

I want to continue working on this, but I can't keep spending as much time as I have been on this project. Updates will be sparse, and as such, I'd like to share what I already have, even though it's not completed.
Here's some WIP documentation for the animation part of the engine:
https://www.dropbox.com/s/o5wku78dc40anr8/SMF Animation System 0.9.9 docs Unfinished.pdf?dl=0
Aw thats really sad, are you too busy with work? Well I hope you have time in the future to finish everything, I mean you started it with a whole idea and it deserves to get finished, especially with everything you've done so far
 

DBenji

Member
Here's the source to the model tool as it is at the moment, in case anyone's interested. I got pretty far with the rewrite, almost all scripts have been rewritten. Instead of just being an animation engine, it's now more like an animation framework. Creating rigs and animations on the fly is now possible through code.

I want to continue working on this, but I can't keep spending as much time as I have been on this project. Updates will be sparse, and as such, I'd like to share what I already have, even though it's not completed.
Here's some WIP documentation for the animation part of the engine:
https://www.dropbox.com/s/o5wku78dc40anr8/SMF Animation System 0.9.9 docs Unfinished.pdf?dl=0
Thanks a million times over. My suggestion was just a luxury we could all do without and yet you still managed to pull it off. Mad props to you.
 
Here's the source to the model tool as it is at the moment, in case anyone's interested. I got pretty far with the rewrite, almost all scripts have been rewritten. Instead of just being an animation engine, it's now more like an animation framework. Creating rigs and animations on the fly is now possible through code.

I want to continue working on this, but I can't keep spending as much time as I have been on this project. Updates will be sparse, and as such, I'd like to share what I already have, even though it's not completed.
Here's some WIP documentation for the animation part of the engine:
https://www.dropbox.com/s/o5wku78dc40anr8/SMF Animation System 0.9.9 docs Unfinished.pdf?dl=0
Please answer,
What version did you use of Game Maker Studio 2 in this project? Because when I click on open a 3d model (FBX or OBJ), this don't works.
If it's not too much of a hassle, can you make the ".exe" available to the current editor? Thank you so much, I hope you've read it.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Aw thats really sad, are you too busy with work? Well I hope you have time in the future to finish everything, I mean you started it with a whole idea and it deserves to get finished, especially with everything you've done so far
I've just spent so much of the little spare time I have thinking about ways to improve this system. I need a break from it, that's all!
Thanks a million times over. My suggestion was just a luxury we could all do without and yet you still managed to pull it off. Mad props to you.
It was a good suggestion though :D\
Please answer,
What version did you use of Game Maker Studio 2 in this project? Because when I click on open a 3d model (FBX or OBJ), this don't works.
If it's not too much of a hassle, can you make the ".exe" available to the current editor? Thank you so much, I hope you've read it.
What happens when you load an obj file? Does it give an error or fail to load without errors? If the latter, check the debug messages it's outputting to see what went wrong.
I removed the limited FBX importer in the open source version of the model tool, since I don't own the rights to share the DLL I used.
 

The-any-Key

Member
source to the model tool as it is at the moment, in case anyone's interested.
Can you put it on bitbucket or github? So we can help out? To allow potential code contributions to the project.
Also, if you need funds to allow push more time to the project. I am sure people interested will help out.
And if your brain is in "Ahh-soon-I-AM-FINISHED-with-this-thing!-I-can-start-to-slow-down-now" mode. Or "Ohh-no!-NOT-THIS-again" mode. Swap your thinking. Make a mini game and put in on itch.io or learn something completely new.
 
I've just spent so much of the little spare time I have thinking about ways to improve this system. I need a break from it, that's all!

It was a good suggestion though :D\

What happens when you load an obj file? Does it give an error or fail to load without errors? If the latter, check the debug messages it's outputting to see what went wrong.
I removed the limited FBX importer in the open source version of the model tool, since I don't own the rights to share the DLL I used.
I'm not on the computer right now, but it gives me an error loading, and then deletes things from the view, like the grid, the model, and so on.
Anyway, I just wanted the compiled application, just to use it in my current project. I thank you very much if you can.


Can you put it on bitbucket or github? So we can help out? To allow potential code contributions to the project.
Also, if you need funds to allow push more time to the project. I am sure people interested will help out.
And if your brain is in "Ahh-soon-I-AM-FINISHED-with-this-thing!-I-can-start-to-slow-down-now" mode. Or "Ohh-no!-NOT-THIS-again" mode. Swap your thinking. Make a mini game and put in on itch.io or learn something completely new.
I loved the idea of putting it on Github.
I'm good at interface design, it would be an honor to make a cool interface for the editor!
 
Z

Zeritum

Guest
Hiya,

Just discovered this project yesterday and my oh my it's incredible, you're doing great work! Thanks so much for making this available for free
Testing it out and I've come across a problem though, I made a model in Blender and imported it, rigged it, skinned it, etc but when it came to animation one of the meshes in the model had disappeared?

This is how it appears in every other tab:

And this is how it appears in the animation tab:

Not sure whether it's an issue with the model or the program, or just something I've done unknowingly, but I would appreciate some help :)

Thanks!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
How about loading gltf?
It's a fairly simple format based in json and binary vertex data.
Would be a perfect fit for this project, even if it only imports a subset of gltf.
Excellent suggestion! Seems like a simple format, will look into it.
Can you put it on bitbucket or github? So we can help out? To allow potential code contributions to the project.
Also, if you need funds to allow push more time to the project. I am sure people interested will help out.
And if your brain is in "Ahh-soon-I-AM-FINISHED-with-this-thing!-I-can-start-to-slow-down-now" mode. Or "Ohh-no!-NOT-THIS-again" mode. Swap your thinking. Make a mini game and put in on itch.io or learn something completely new.
Another excellent suggestion! Github it is! Gonna polish a bit more, and then put it up there.
Tbh I don't really need to make money from this project, so funding isn't the issue. For the past few months I've spent nearly all my spare time working on this. I'd rather spend some more time with my gf, work out and get in shape, and less time staring at the computer.
I'm not on the computer right now, but it gives me an error loading, and then deletes things from the view, like the grid, the model, and so on.
Anyway, I just wanted the compiled application, just to use it in my current project. I thank you very much if you can.

I loved the idea of putting it on Github.
I'm good at interface design, it would be an honor to make a cool interface for the editor!
If the model importer doesn't work in the project file, it won't work in a compiled version either! :p
I'll need to know what kind of error you're getting, or even better, send me the model file you tried to load so that I can figure out what makes that different.
The current interface is a bare-bones interface made many years ago for a level editor for a game I made (Race Friend), so a visual update would certainly be welcome :D
Hiya,
Just discovered this project yesterday and my oh my it's incredible, you're doing great work! Thanks so much for making this available for free
Testing it out and I've come across a problem though, I made a model in Blender and imported it, rigged it, skinned it, etc but when it came to animation one of the meshes in the model had disappeared?

This is how it appears in every other tab:

And this is how it appears in the animation tab:

Not sure whether it's an issue with the model or the program, or just something I've done unknowingly, but I would appreciate some help :)

Thanks!
Thank you! The chest most likely disappears because it has no skinning info. Try using autoskin on the entire model and see if this fixes it!
 
Excellent suggestion! Seems like a simple format, will look into it.

Another excellent suggestion! Github it is! Gonna polish a bit more, and then put it up there.
Tbh I don't really need to make money from this project, so funding isn't the issue. For the past few months I've spent nearly all my spare time working on this. I'd rather spend some more time with my gf, work out and get in shape, and less time staring at the computer.

If the model importer doesn't work in the project file, it won't work in a compiled version either! :p
I'll need to know what kind of error you're getting, or even better, send me the model file you tried to load so that I can figure out what makes that different.
The current interface is a bare-bones interface made many years ago for a level editor for a game I made (Race Friend), so a visual update would certainly be welcome :D

Thank you! The chest most likely disappears because it has no skinning info. Try using autoskin on the entire model and see if this fixes it!
First Image: When I open the model.
Second Image: When I click ignore error.
Third Image: When I click in somewhere in the window.

Attention: the same happens with ".obj".
My model works perfectly, I've used it in other programs, and I've downloaded it.
 

Attachments

TheSnidr

Heavy metal viking dentist
GMC Elder
First Image: When I open the model.
Second Image: When I click ignore error.
Third Image: When I click in somewhere in the window.

Attention: the same happens with ".obj".
My model works perfectly, I've used it in other programs, and I've downloaded it.
The error was caused by a silly mistake in my code! It should be able to load obj files now:
https://www.dropbox.com/s/m5xydtf456ppb93/SMF Model Tool v0.99 Unfinished 2.yyz?dl=0
I've also fixed the scripts for saving and loading collision meshes to/from buffers!

Keep in mind though, the system isn't as "complete" as the old version, not all functions are present.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
I'm currently in the final phase of separating the collision system from the rest of the SMF environment entirely!
The collision system has seen a complete rewrite in the last couple of months, and is now much more efficient than it has ever been. Here are some of the major changes:
  • The collision system no longer depends on the SMF system. You can feed it your own vertex buffers, using your own vertex formats, and it will generate a collision mesh for you.
  • It now supports a number of different geometry subdivision types. Simply specify which type you want in the creation script, and the system will keep track of it for you, no extra scripts necessary. The following types are supported at the moment:
    • None: The mesh is not subdivided at all, and collision checks will check every triangle of the mesh
    • Lattice: A 3D grid structure. This stores info about empty space as well, and you can use this to point to the nearest region containing triangles. Useful for Mario Galaxy type 3D games
    • Spatial hash: A map structure storing sparse geometry data as sections in space. Similar to lattice, except it does not store empty space.
    • Quadtree: Splits the mesh recursively in the x and y dimensions. Useful for flat meshes with varying geometric density
    • Octree: Splits the mesh recursively in all three dimensions. Useful for complex models with varying geometric density
  • Each subdivision type supports ray casting. The method for ray casting on the different types differs, but they all use the same script.
  • The colmesh can be scaled, rotated and translated in real time. To get technical about it, it's not actually the colmesh that gets transformed, but the collision shape that gets transformed by the inverse of the transformation matrix, and then transformed back at the end. This does as such not support non-uniform scaling, all dimensions must be scaled equally. It does also not support shear.
  • There are scripts for writing and reading the colmesh to/from a buffer, giving you total control over how you save your colmeshes.
  • You can now check for collisions between ellipsoids and colmesh! Useful for tall units. The problem with this is that the ellipsoid slides down hills slower than a sphere.
  • Collision scripts no longer define hundreds of arrays for each collision. It now uses local variables instead, which is how it always should have been. I got a bit crazy with the arrays in my quest to shorten the code as much as possible, but then I recently found out that this slowed the system down drastically. I've gone away from arrays as much as possible.
  • No more buffer usage in real time. Buffers are slow. Instead, I use grids, maps and lists wherever they fit best. Saving and loading takes a little more time because of this, but in-game speed is much more important IMO.
  • You can perform collisions and ray casting within a region. This is useful for complex collision checking with multiple checks and ray casts, since you only have to get the region once. The most costly part of ray casting is looping through the regions the ray crosses, so this is a super way of optimizing when you only need short-range rays.
The file also includes some optimized scripts for primitive collisions (sphere-sphere, sphere-cube, sphere-torus).
There's also an early version of another standalone asset called SMF Basics, which contains scripts for manipulating vertex buffers. It has a basic obj-importer, some scripts for creating normals and tangents, and aims to be a low-level tool for model processing.

I plan to make a separate topic for the collision system once it's done and ready for the Marketplace. Until then, here's a demo for you to play around with:

Download SMF Collisions v0.99

Crude documentation
 
Last edited:
Newest version doesn't work. It crashes when I try to export .smf files.
Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of  Step Event0
for object oRigSystem:

global variable name 'editorModelName' index (100202) not set before reading it.
at gml_Script_press_buttons
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_press_buttons (line -1)
gml_Object_oRigSystem_Step_0
Also it won't allow me to Save rigs nor load rigs. When I click on them nothing happens.
Do you think you could link all versions of this program?

EDIT:
Nevermind, went through the thread and found the fix.
 
Last edited:
There is a problem when I try to import an .obj model:

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object oRigSystem:

string_copy argument 1 incorrect type (undefined) expecting a String (YYGS)
at gml_Script_draw_buttons (line 118) - str = string_copy(mtlName, 1, 16);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_draw_buttons (line 118)
called from - gml_Object_oRigSystem_Draw_64 (line 56) - draw_buttons()

I can't figure it out.
 
I want to thank you, BIG TIME, for creating this system.
It has breathed new life into my love of video game design with GameMaker.

The video you posted on your YT channel made me immediately want to know more.

I'd like to see a video where the character is placed into the level (even if it's a simple maze) and walking around it; while showing the steps that make this happen.
If there is already a video can you send me a link?

Again, love your work and thank you very much for it!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Thank you, @misterprickly :D Your comment means a lot. I'd love to make an elaborate video series on how to use the SMF system, excellent suggestion! There is no such video as of right now.

I got a bit burnt out by my ambition to rewrite the system, so I haven't touched it for a month or so. @SweetCelestia made an excellent COLLADA importer that he has allowed me to incorporate into the SMF system, so that'll be my next step. I haven't managed to get an fbx importer up and running.
 
M

Mayser

Guest
I really liked the program that made "Planetoids" Level editor .. Much more "Snidrs Model Format" His evolution to rewrite the system ... WOOW .. I admire you "TheSnidr"..
I would also like to see finished Planetoids Level editor....

Congratulations @TheSnidr

 

EMPixed

Member
I haven't looked in here in a while, and I must say—the progress is insane to see! :eek: But then, a lot of time has past since I last checked here, so yea.

Although before I did ask before about commercial use and whether or not we were required to give credit to you, Snidr, if we make games usin' SMF(Snidr's Model Format)—yet I never thought to ask about what license(if this software will use any) SMF would use and even then would we would be able use SMF with or without any obvious hints to it. This comes off as a tad "shady" or kinda stingy to even ask, but one—just tryin' to be VERY careful where I step, copyright and licenses have made me super gentle about them cause of the complications, so simply; this is why I ask.....really, it's all about the laymen's terms—and two—personal problem that'll come off as if I'd never credit someone for their hard work, really; just hate how some people will essentially demand credit—but from what I recall, you approved the use of SMF in commercial works and said there was no need to credit(I'm strange as I'd credit cause of this here; someone chose to NOT demand credit—but by no means do I mean malice about ANY of this, just tryin' to cover all corners really) but of course it's common sense to not claim to have made somethin' someone else made—obviously.

I digress though, gotten the clarity I've needed and really my "quick"(yea, I know, "quick" my back side) question is this; What license would SMF use(if any) and would it be completely flexible with someone's works and copyrights and such? Any issues with this at all?

In terms of my constant nag about this; my deepest apologizes. Wanted to provide the general questions about this and you DID say before "no strings attached", but again—I just want to cover all the corners I can about this kind of stuff. Again; pardon my likely paranoid soundin' questions. :D

I remember a while back, around 3-5 years that the Raspberry Pi would brought into the mix about GMS Module support. Alas, I voted against it, regret that, but more importantly—it appears no other word has been brought up about it in any major form. Which is a disappointment but understandable as there's likely more important things in GMS or rather GMS2 now to work on. The point that I'm gettin' to though is SMF makes me wonder how well the 3D potential would be for GMS2 on RPi, namely the RPi3 and how well it'd run with that present. Along with SMF in use, I imagine it'd be an easier take to operate in 3D on a RPi3, but nothin' of modern high-quality mesh work.
Low-poly meshes would obviously work on a RPi3 due to the fact it's an easy render typically, but due to the technical differences—there'd be problems in other places and would likely just pile onto the issues that were there prior. It does really make me wonder though how well this all could function on a RPi, preferably the latest(RPi3 as of this post) and what all could be done on it.

Looks like it's been a fantastic time to learn Blender as Blender 2.8 is around the corner, have an interest for VFX/3D VFX, game design in general(both 2D and 3D; my interest has been in this for about a decade—learnin' method are botched af though, my fault nonetheless) and SMF is so damn polished at the moment, isn't even finished that it's insane and hype worthy to see GMS1/GMS2 get a 3D upgrade from someone that's been in this community for well over a decade himself. Snidr, seriously—thank you for this as it's been fun to watch this grow and improve over the past year and a half. But enough of my praise, this is bound to get more and I've already expressed mine!

Pardon me if I asked this before or IF it was asked before, but; does SMF have an plans in the future for a 3D physics engine at all? I do remember that someone made a super snazzy 3D physics engine in GM8 where it was reminiscent of a golden days 2011-2013 horror game to which it looked inspired off of Penumbra: Overture/Black Plague and Amnesia, it was the coolest thing when I found it on YouTube when I looked around for a functional 3D engine back then! Cause that'd seem like a nice touch, but then if needed—anyone can learn it manually and setup their own too.(Same can be said about a 3D engine like SMF too, but that's just splittin' hairs at that point.)

All-in-all, I've eyeballed this and kinda stayed away and wow; glad I did cause there's so much more to see! Hopefully my abundance of questions didn't get too ridiculous—thought of these somewhat on the fly and thought I'd just toss them out there! Either way, the more you watch, the better this project gets! :)

(Pssst! Was this too rambly? I feel like I was too all over the place with this post, sorry about that!)
 
Last edited:
Is it possible to change the texture of an already loaded smf model? I have a 3d wall (2 triangles) and a wall sprite with a torch animation, is it possible to set the texture to the model in order to make it animated with the sprite?
 

jef

Member
Hi. The Viking industry has proven not only to be the best at sea but also in programming:D. Know you are busy did sent you a PM.

Any progress to import 3dsMax rigged models directly with it's biped bones in this cool system? Waiting a long time to be able to use rigged 3dsmax models in gamemaker.
 
Last edited:

lolslayer

Member
I remember a while back, around 3-5 years that the Raspberry Pi would brought into the mix about GMS Module support. Alas, I voted against it, regret that, but more importantly—it appears no other word has been brought up about it in any major form. Which is a disappointment but understandable as there's likely more important things in GMS or rather GMS2 now to work on. The point that I'm gettin' to though is SMF makes me wonder how well the 3D potential would be for GMS2 on RPi, namely the RPi3 and how well it'd run with that present. Along with SMF in use, I imagine it'd be an easier take to operate in 3D on a RPi3, but nothin' of modern high-quality mesh work.
Low-poly meshes would obviously work on a RPi3 due to the fact it's an easy render typically, but due to the technical differences—there'd be problems in other places and would likely just pile onto the issues that were there prior. It does really make me wonder though how well this all could function on a RPi, preferably the latest(RPi3 as of this post) and what all could be done on it.
API wise GameMaker and the RPi3 are actually very similar. This is because GM preferably doesn't add in API functions that isn't supported by openGL ES 2.0, which is the API found on the RPi. GM however supports MRT which the RPi doesn't, and the RPi supports stencil buffers which GM doesn't. Computation-power wise however, the RPi is very similar to 6th generation consoles. From what I can tell it's weaker than the OG Xbox but stronger than the dreamcast. The RPi does have much more RAM and a much stronger CPU though (more RAM than 7th gen consoles and a CPU that is computationally between 6th and 7th gen consoles), so higher resolution-textures and more advanced gameplay elements are very much possible.

One problem nowadays is that we expect high resolutions for our game, so when I developed for the RPi in uni most people tried to go for 1080p, which was very much possible, but it greatly limits the amount of per-pixel calculations you can afford. Per-pixel lighting was therefore pretty much a no-no. Vertex calculations however of course don't scale up for higher resolutions, therefore per-vertex lighting and most probably, SMF animations would very much be possible.

But GameMaker is sadly a bit hard to optimize because of the limited graphics API function set. To get proper framerates from the RPi you need smart systems to make optimal use of GPU state transitions (which are very expensive) and memory management. However, there might be a few things that GM automatically optimizes based on how you write your code which might make some major optimizations possible, but I haven't looked into that yet.
 

EMPixed

Member
@lolslayer Initially, I would be one of those few that would go for a higher res like that of 1080p, but as you explained—if one were to, it'd be more difficult to handle. Because of the lack of a major/mainstream graphics card, it's somewhat safe to assume that high graphics on any of the RPis would be far too much unless you were to design some form of compatibility for the RPis to use an NVidia or AMD card. Besides, I personally would do more like how Gaming Engineer does and be reliant on early-PS1 to early-PS2 graphics as my main means of graphical choice. This is just me though, the masses would probably go at it with higher expectations, not that it's a bad thing. Just a bit thoughtless.

Just now thought of it and the question stirs in my mind; Would a wrapper like how Wined3D or even Dege's dgVoodoo function work but made with the RPis in mind? I remember there was mild conversation I had would someone on how to get games that use DirectDraw/D3D games to work on GTX1080 cards since these don't support graphics from that far back. Found out about the wrappers and how they seem to be a form of emulation graphically, so by that—this could work if setup with RPis in mind like I said, or am I wrong about this?

At this point I'm makin' guesses while at the same time derailin' the topic entirely if I keep up this talk. Or at least it feels this way. Thanks for your answer regardless!

There's really nothin' else I can add to this at the moment, so it's best that I just wait for whatever happens in here. The growth of the project is fun to watch, so.....time for me to just watch again! :p
 

lolslayer

Member
@EMPixed I've seen projects made by other students here that were 1080p that were graphically quite well-made, and it ran around 40fps. Not perfect, but it's doable. The problem still stands though that per-pixel calculations become very heavy at higher resolutions :"D

AFAIK we don't even need a wrapper. GMS supports openGL ES 2.0 (currently for android), which is what runs on the RPI. So we could just use that API.
 

Mert

Member
@TheSnidr I purchased your particle tools before. Checking SMF now, it may be the best extension ever.
I'll try to put a good good tutorial on my blog about this.
 

Mert

Member
Up : I am getting an error when trying to draw a model(Exported from SMF Model Tool)

Code:
trying to index a variable which is not an array
 at gml_Script_smf_model_draw (line 36) -         shader_set_uniform_i(uni[SMF_uni.Animate], animate);
 

Mert

Member
Shaders work in all platforms except Android for me.
(Opening the game from Html5 - Android : Shaders work)

Compiling .apk : Shaders do not compile.

Am I missing something? :(
 
Hello
I've just notice that i've randomly an error while i'm playing my game... I use SMF 0.8.6 wich is compatible with GMstudio 1.4.
Sometimes the error appens after 1 or 2 minutes, sometimes more, sometimes never...
Here is the error message :
Code:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object o_player:

trying to index a variable which is not an array
 at gml_Script_smf_sample_get_bone_orientation (line 14) - Q[0] = R[3] * S[0] + R[0] * S[3] + R[1] * S[2] - R[2] * S[1];
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_smf_sample_get_bone_orientation (line 14)
called from - gml_Object_o_player_DrawEvent_1 (line 29) - var couLocalMatrix = smf_matrix_create_from_dualquat(smf_sample_get_bone_orientation(sample, 13));
Here is the full code of my draw event :
Code:
var zmass, XX, YY;
zmass=0;
var scale = 0.15; //0.65
var playerWorldMatrix = matrix_build(x, y, z, 0, 0, 90 + direction, scale-0.02, scale-0.02, scale);


if o_control.mode = 1 //---Affiche le joueur en mode planete 3D
{
matrix_set(matrix_world, playerWorldMatrix);
shader_set(sh_notsphere_animate);
planet_set_shader_uniforms(sh_notsphere_animate,1)
smf_animation_set_shader_uniforms(sh_notsphere_animate, sample);
shader_set_uniform_f(shader_get_uniform(sh_notsphere_animate, "u_darkness"), lightDarkness)
shader_set_uniform_f(shader_get_uniform(sh_notsphere_animate, "u_brightness"), lightBrightness)
shader_set_uniform_f(shader_get_uniform(sh_notsphere_animate, "u_lightdir"), lightDirX, lightDirY, lightDirZ)
smf_model_draw(Obj_playerSMF, sprite_get_texture(player_tenue1_text, 0));
}
else //---- Affiche le joueur en mode monde plat
{
shader_set(sh_smf_animate_shading);
smf_animation_set_shader_uniforms(sh_smf_animate_shading, sample);
matrix_set(matrix_world, playerWorldMatrix);
smf_model_draw(Obj_playerSMF, sprite_get_texture(player_tenue1_text, 0));
}



//--------------------------- Affiche la tête : ------------------
var couLocalMatrix = smf_matrix_create_from_dualquat(smf_sample_get_bone_orientation(sample, 13));
var teteLocalMatrix = matrix_multiply(matrix_build(0, 0, 0, 180, 270, 0, 1, 1, 1), couLocalMatrix);
var teteWorldMatrix = matrix_multiply(teteLocalMatrix, playerWorldMatrix);
if o_control.mode = 0 { shader_set(sh_smf_passthrough); } // Besoin de cette ligne pour afficher l'épée uniquement dans le monde plat
matrix_set(matrix_world, teteWorldMatrix);
smf_model_draw(Obj_playerTeteSMF, sprite_get_texture(player_tete_text, 1)); //



//--------------------------- Affiche l'épée : ------------------
if furie==5 { epee_sub_spr=2 } else { epee_sub_spr=1; }
if global.player_weapon>0 {
var armLocalMatrix = smf_matrix_create_from_dualquat(smf_sample_get_bone_orientation(sample, 24));
var gunLocalMatrix = matrix_multiply(matrix_build(0, 0, 0, 90, 0, 0, 1, 1, 1), armLocalMatrix);
var gunWorldMatrix = matrix_multiply(gunLocalMatrix, playerWorldMatrix);
if o_control.mode = 0 { shader_set(sh_smf_passthrough); } // Besoin de cette ligne pour afficher l'épée uniquement dans le monde plat
matrix_set(matrix_world, gunWorldMatrix);
smf_model_draw(global.Obj_weapon[global.player_weapon], sprite_get_texture(tex_swords, epee_sub_spr)); //
}


//--------------------------- Affiche le bouclier : ------------------
if global.player_shield>0 {
var arm2LocalMatrix = smf_matrix_create_from_dualquat(smf_sample_get_bone_orientation(sample, 21));
var gun2LocalMatrix = matrix_multiply(matrix_build(0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5), arm2LocalMatrix);
var gun2WorldMatrix = matrix_multiply(gun2LocalMatrix, playerWorldMatrix);
if o_control.mode = 0 { shader_set(sh_smf_passthrough); } // Besoin de cette ligne pour afficher l'épée uniquement dans le monde plat
matrix_set(matrix_world, gun2WorldMatrix);
smf_model_draw(global.Obj_boucliers[1], sprite_get_texture(tex_shields, real(global.player_shield))); //tex_shields
}


// fin :
shader_reset();
smf_matrix_reset();
d3d_transform_set_identity();
Any help plz ? :D
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Sorry for my absence lately, been doing other things! I've worked on the model tool on and off for the past half year, and I've developed a product that is superior to the old tool - but I've also stripped off all bloat. The tool now only supports basic model manipulation and animation. No more "one format for everything", no more included collision buffers (they're their own separate script package now), no more included shaders (except for a very basic reference animation shader) and no more hidden source. The model tool will be completely open source. I've built a proper framework for skeletal animation, giving you full control over rigs and animations. It also has a functional library for some basic procedural animations for editing samples directly.

It's all pretty much done. Only documentation left.... if I can ever manage to start writing it o.o. Writing documentation for my work really isn't my strong suit...

I've had little time on my computer for the past half year, and I haven't been able to give the support I've wanted to for the people who use the tools I've developed. With the new line of tools, I hope to have made them simpler to understand so that people may be able to help themselves. There are tons of comments in the code now, and most of the code (especially for animation and collisions) has been rewritten from scratch. Both systems have also been immensely optimized, and at this point I don't see how it's possible to optimize them further.

@CyberTwister: Try to figure out which of the arrays is not an array. If it's R, then the bone does not exist in the sample. If it's S, then the bone does not exist in the rig, or something has gone wrong with animation merging.
....actually, looking at the code in smf_sample_get_bone_orientation, I think the latter is very likely. You're using a very old version of the animation system, from when I stored the animation index in the last index of the sample. smf_sample_blend did not take this into consideration, and so it tries to blend between two animation indices, which makes no sense. Open smf_sample_blend and replace it with this:
Code:
var sample1, sample2, t1, t2, num, i, returnSample;
sample1 = argument0;
sample2 = argument1;
t2 = argument2;
t1 = 1 - t2;
num = array_length_1d(sample1);
returnSample = sample1;
for (i = 0; i < num - 1; i ++)
{
    returnSample[i] = sample1[i] * t1 + sample2[i] * t2;
}
return returnSample;
 
Hi Is there any documentation on exporting models and importing them to SMF Model Tool ? please.
A few months back I modeled,rigged and animated a character in Blender for a game but I'm having issues when loading the model into SMF model tool.
Once loaded then selecting the Animation indices which in this case I chose "running" I hit play and it just flicks its arms slightly instead running.

I really would find this tool more useful than the old d3d commands as before I needed to load each part of my animations as separate model which was slow and memory consuming.

Please advice.
 
@CyberTwister: Try to figure out which of the arrays is not an array. If it's R, then the bone does not exist in the sample. If it's S, then the bone does not exist in the rig, or something has gone wrong with animation merging.
....actually, looking at the code in smf_sample_get_bone_orientation, I think the latter is very likely. You're using a very old version of the animation system, from when I stored the animation index in the last index of the sample. smf_sample_blend did not take this into consideration, and so it tries to blend between two animation indices, which makes no sense. Open smf_sample_blend and replace it with this:
Code:
var sample1, sample2, t1, t2, num, i, returnSample;
sample1 = argument0;
sample2 = argument1;
t2 = argument2;
t1 = 1 - t2;
num = array_length_1d(sample1);
returnSample = sample1;
for (i = 0; i < num - 1; i ++)
{
    returnSample[i] = sample1[i] * t1 + sample2[i] * t2;
}
return returnSample;
Thanx for your answer TheSnidr, i've replaced smf_sample_blend and will try to understand thanx to your comments... since, the random bug did not reappear, I hope it was that: D D
Yes, i'm using an old version of your animation tool , but it's the last one wich is compatible with GMstudio 1.4 ;)
Thanx for your answer :D :D


Glad to hear that you are working on a new tool. I hope it will be as easy to use as your current program :)
keep up the good work ;)
 

DBenji

Member
Sorry for my absence lately, been doing other things! I've worked on the model tool on and off for the past half year, and I've developed a product that is superior to the old tool - but I've also stripped off all bloat. The tool now only supports basic model manipulation and animation. No more "one format for everything", no more included collision buffers (they're their own separate script package now), no more included shaders (except for a very basic reference animation shader) and no more hidden source. The model tool will be completely open source. I've built a proper framework for skeletal animation, giving you full control over rigs and animations. It also has a functional library for some basic procedural animations for editing samples directly.

It's all pretty much done. Only documentation left.... if I can ever manage to start writing it o.o. Writing documentation for my work really isn't my strong suit...
Woohoo! This is really intriguing. I can't wait to try it out.
 

EMPixed

Member
By the sound of it, SMF is going to be separated into pieces. But will everything still be present(ie; modelling, map editor/level editor, shaders, collision detection & collision buffers, etc) just in pieces, so they'll be they're own thing rather than one big package like the already existing version? (Feels like I'm asking a question that was already answered, but I'm not too sure myself in a way. Sorry if it is!)
 

Mert

Member
By the sound of it, SMF is going to be separated into pieces. But will everything still be present(ie; modelling, map editor/level editor, shaders, collision detection & collision buffers, etc) just in pieces, so they'll be they're own thing rather than one big package like the already existing version? (Feels like I'm asking a question that was already answered, but I'm not too sure myself in a way. Sorry if it is!)
I pm'ed the author and he expressed the same. SMF system will have its separate packages. Currently, the particle system is already separated and he's working on the collision system.
  • I believe he'll drop down the shader support. Model editor will no longer have "shader settings" on it. If you wish to apply shader, you'll do it in Game Maker.
  • You'll import the parts of the system that you'd want to use : Animation, Collision etc.
The reason of this is that the all-in-one project system is no good.

I really like this project and wish to see it as a standard for Game Maker. I'm currently on hold, waiting for this project to continue mine :D
 

EMPixed

Member
I pm'ed the author and he expressed the same. SMF system will have its separate packages. Currently, the particle system is already separated and he's working on the collision system.
  • I believe he'll drop down the shader support. Model editor will no longer have "shader settings" on it. If you wish to apply shader, you'll do it in Game Maker.
  • You'll import the parts of the system that you'd want to use : Animation, Collision etc.
The reason of this is that the all-in-one project system is no good.

I really like this project and wish to see it as a standard for Game Maker. I'm currently on hold, waiting for this project to continue mine :D
So a plugin system what this is most like? Smart and interestin' to say the least! Just wanted to have a quick check as it, low-key, sorta, kinda, sounded like support of major elements were about to be dropped, I now see that's NOT the case; the separations are bein' made for the optimizations like said before! Makes perfect sense, honestly. Don't need to have pieces of somethin' active when you make project if your project doesn't need those pieces and only a select bunch!

3D work with Game Maker in general has been such a fascination for me as people manage to pull it off in unique ways, but PuPushEd, RazorSharp, a 3D horror game reference source file I seen in action on YouTube runnin' in GM8 or GM8.1, and now SMF really has just shown me that GM in general has always had the capacity to output a fantastic 3D game, regardless of how low-poly or extremely high-poly the game would be! And I agree; this deserves to be a standard for Game Maker once SMF hits it's 1.0 release! If anything though, I'm just thankful someone finally started to do this type of project and it's successful from what I see, and it just get better and better! :D
 

c023-DeV

Member
This all looks like the most promising way to get some 3d animation into GM ...
BIG respect @TheSnidr !

I'm a heavy 3DSMax user and I'm super efficient at rigging and animation in 3DSMax ... so I'd LOVE to see some way to get that into GMS...

Any one know any way to get this working?

Is there a working FBX importer in the tool?

Or how about doom3 md5 format? --> http://tfc.duke.free.fr/coding/md5-specs-en.html
 

Mert

Member
* Oh forgot to tell that the Demo number 6 doesn't work (I really remember the time it worked, maybe something's broken)


* Shaders won't work on Mobile, but works on all other platforms including Html5
 

Yal

🐧 *penguin noises*
GMC Elder
It's been a pretty interesting read going through the history of this thing, and it's not stopped being one of the most impressive GM undertakings ever performed! 3D hasn't really ever been my cup of tea, but seeing how far this framework has come, now it's really starting to itch in my fingers to try it out...
 

obscene

Member
Trying this out for the first time. Imported an obj file. Tried to export as smf. Multiple attempts all result in this error...

############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oRigSystem:
global variable name 'editorModelName' index (100202) not set before reading it.
at gml_Script_press_buttons
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_press_buttons (line -1)
gml_Object_oRigSystem_Step_0

Bypassed this by loading in the obj file from the side menu instead of the top buttons. Any documentation on the proper way to use this program?
 
Can you import blender animations, or some kind of standard animation file into this?
It would be great to easily import animations from other programs rather than to have to make them all in the editor!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
No, unfortunately you can't import standard model formats, but Alexander Kondyrev has made a full-on FBX importer:
https://marketplace.yoyogames.com/assets/8617/fbx-reader
I've wanted to implement it into the SMF environment, but I've had no time or motivation to dedicate to GM for the past few months. It works really well on its own though!

Sorry for the complete lack of updates here. I'm sure many of you are familiar with the burnout you get when working on a single project for too long, in the end you'll only get sick of looking at your own code.
Hopefully things will calm down now in the beginning of the new year. Mid january I'm finally done working multiple jobs and can focus on a single job, maybe I can wind down and put some more effort into GM after that.

@obscene That error occurs, as you've figured out, if you load the first model using the "Add model" button. I started making a documentation for the new version of the program (which also has some minor workflow changes), but it has so far suffered the same fate as mentioned above :p

I wish you all a happy new year, and hope you all make lots of awesome games! I have many game ideas that I've written down over the past year, and I'd also love to participate in a GMC jam or two. Motivation is fleeting, and when programming is not my primary income (or any income at all really), it will unfortunately not be prioritized when it's either or.

Sindre
 
Top