SMF - 3D skeletal animation - Now with a custom Blender exporter!

TheSnidr

Heavy metal viking dentist
GMC Elder
Hi. I have a quick question. Have you implemented line collisions with your octrees?
As in raycasting? Indeed, that's supported! The bullet holes in this gif are calculated using raycasting from the player in the direction of the camera.

I've also added a custom lighting system:

I'm playing with the idea of adding shadow mapping as well... Though that may be a bit overkill.

The next version will be available in the following days.
 
Last edited:

Kentae

Member
Just a quick question for the sake of clarity.
Will there be a GMS 1.4 compatible version of the latest update at some point in time?
If not I guess it's about time for me to get my ass over to GMS 2 soon xD
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Just a quick question for the sake of clarity.
Will there be a GMS 1.4 compatible version of the latest update at some point in time?
If not I guess it's about time for me to get my ass over to GMS 2 soon xD
I'll probably make a half-assed port using the existing 1.4 version that will be able to import the latest format, but will probs not support the latest additions like nodes and lights :p

EDIT:
Added cone lights:
 
Last edited:
K

Kobold

Guest
Correct. You need a mac computer networked to whichever computer is running GMS before you can create a mac version.
...does anyone remember that episode were Homer walks into Lisa's room and she was finishing a highly scientific project... and Homer couldn't catch onto her intelligence...?

edit: ...maybe TheSnidr just chose to not support Apple products?
 
Last edited:
S

Squisher

Guest
As in raycasting? Indeed, that's supported! The bullet holes in this gif are calculated using raycasting from the player in the direction of the camera.

I've also added a custom lighting system:

I'm playing with the idea of adding shadow mapping as well... Though that may be a bit overkill.

The next version will be available in the following days.
That is so incredible. There's no such thing as overkill, please, add those shadows if you can!
Help me Snidr-wan kenobi, you're my only hope... for making amazing 3D games in GMS 1.4! :D
 
C

Chris Goodwin

Guest
Thank you for your great work on this. Can't wait to see the next version!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Update v0.9.3
The new update is published!
Download SMF v0.9.3
New in this version:

  • Lots of bugfixes
  • Lighting: Predefine lights in the level editor, or create them on the fly ingame
  • FINALLY a proper demo. Six demo rooms showcase how the SMF system works. The code is segmented and commented to make it easier to understand.
  • Shadowmaps have not been added yet, I will polish the implementation for a later release.
If you only want to test the compiled demo, you can do so here:
Download compiled demo
This is not compatible with GMS 1.4


All models included in the demo can be inspected in the model tool! The Shaundi model has been donated by @MrPr1993 :D

 
Last edited:

EMPixed

Member
First of all; Geez man, next thing we see, I swear if it is, is VR support or some sorta ultra-advanced functionality in the next series of update! I'll be genuinely shocked if this actually happens!

Now then, when it comes to the things like lights, shadows, outlines and etc, I would imagine that you're usin' shaders, as I did see that you used shaders for the models in your format. Personally, I find that a tad weird, but then I could also be havin' a misunderstandin' about the models' management in your tool's format. It's a shame that there isn't some sort of DnD Shader Event system like how GM has been used by many to learn how to get into the actual programming of it. Nonetheless, this is great, I think I speak for everyone when I say; "I'd love to see higher quality models bein' used/made in the modeling tool!" With the use of the Samus(SSB4) model you imported, looks like it's possible!

Look out Unity, ya might have a new challenger comin' up the mountain now!
 
Last edited:
M

Multimagyar

Guest
nice! doesn't really work with the old models does it? we gotta figure something with the team I guess. nice work with the materials however.
Look out Unity, ya might have a new challenger comin' up the mountain now!
As long as we don't get a parallel functions or we make a DLL to work with those completely we have no chance to compete much. Parallel functions would be useful for both 2D and 3D tho...
 

EMPixed

Member
As long as we don't get a parallel functions or we make a DLL to work with those completely we have no chance to compete much. Parallel functions would be useful for both 2D and 3D tho...
Now I would imagine there would be problematic situations that could cause this to not be as possible as I made it sound, I feel the need to fix up my claim so it doesn't come off as too "expecting".; If anything, I meant this more so on the side of that this could play a notibly lesser powered alternative to somethin' like Unity, but with Unity bein' as powerful as it already is, it'd be EXTREMELY DIFFICULT to even be able to equally pair up to the same level as it already is. Be that as it may, I imagine you probably understood where I'm comin' from, so nothin' snarky or arrogant here! :D

nice! doesn't really work with the old models does it? we gotta figure something with the team I guess. nice work with the materials however..
Y'know, this is a good thing to bring up, I know GamingEngineer and plenty other would like to know about this as it could help them do conversions if they wanted to on older projects. Not a demand, but I can see this as useful for so many that play in GM's 3D.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
First of all; Geez man, next thing we see, I swear if it is, is VR support or some sorta ultra-advanced functionality in the next series of update! I'll be genuinely shocked if this actually happens!

Now then, when it comes to the things like lights, shadows, outlines and etc, I would imagine that you're usin' shaders, as I did see that you used shaders for the models in your format. Personally, I find that a tad weird, but then I could also be havin' a misunderstandin' about the models' management in your tool's format. It's a shame that there isn't some sort of DnD Shader Event system like how GM has been used by many to learn how to get into the actual programming of it. Nonetheless, this is great, I think I speak for everyone when I say; "I'd love to see higher quality models bein' used/made in the modeling tool!" With the use of the Samus(SSB4) model you imported, looks like it's possible!

Look out Unity, ya might have a new challenger comin' up the mountain now!
Haha, don't think there'll ever be VR support xD I just want to make 3D more accessible in Gamemaker!
How is using shaders weird? :p Shaders are amazing, and allow you to draw beautiful effects. Shaders are what makes animation possible. You don't have to know any shader language to use the shaders that come with the SMF system. Simply play with the material sliders in the model tool, import the model into your game and draw it, and it'll draw using the material you made in the model tool. If you want to get advanced you can of course play with the shaders themselves, but you absolutely don't have to :D
nice! doesn't really work with the old models does it? we gotta figure something with the team I guess. nice work with the materials however.

As long as we don't get a parallel functions or we make a DLL to work with those completely we have no chance to compete much. Parallel functions would be useful for both 2D and 3D tho...
Do you have a lot that needs to be converted? Give me your SMF version number and I'll see what I can do. If you use a version from before I started numbering them, just send me the entire import script (smf_model_load).
The new demos are very impressive. I'd wish you'd make a game TheSnidr, with all these skills ;-)
Thanks! I'm playing with the idea :D I started working on this tool because I wanted to make a 3D game but didn't have the tools for it... :p

Here's a tiny update by the way, a few small bugfixes, no major changes:
Download
 
M

Multimagyar

Guest
Do you have a lot that needs to be converted? Give me your SMF version number and I'll see what I can do. If you use a version from before I started numbering them, just send me the entire import script (smf_model_load).
On our end it's not too big of a deal. My partners had a need to not use multiple model formats and some extra needs regarding the model itself could not be so simply satisfied. which involved colours, multiple texture file handling and no collision model in favour of using our own, and have signification regarding that in the model file itself. and Label based lods. the bigger problem came with some of the still in progress models when we tried to load the sources back in to continue work. And separate animation files to work with so we can update them or add to them without disturbing the existing ones.
Edit.: that being said we have a convertor for the sake of it.
but for the sake of it we are using this version with the file requested: 0.8.4v
 

EMPixed

Member
Haha, don't think there'll ever be VR support xD I just want to make 3D more accessible in Gamemaker!
How is using shaders weird? :p Shaders are amazing, and allow you to draw beautiful effects. Shaders are what makes animation possible. You don't have to know any shader language to use the shaders that come with the SMF system. Simply play with the material sliders in the model tool, import the model into your game and draw it, and it'll draw using the material you made in the model tool. If you want to get advanced you can of course play with the shaders themselves, but you absolutely don't have to :D
Lol yea, VR is quite the long shot, but paths could cross with that world some day.

Love the fact you made this for everyone's sake, easier accessibility to GMS1.4's and GMS2's 3D fields, this is the kind of work that any design tool really deserves! Ah, poor wording on my end perhaps or my lack of understandin' shader's capabilities, how I meant what I mentioned before was along the lines that I found it odd that the model's animations would use shaders, not there's anything wrong with that, but then you say that they normally use shaders to execute the animations, which I never knew or heard of prior. So lack of awareness on that bit, no biggie, I now know!

So you mean that the model's use their own light then? I mean, I WANT to see a horror game made with these tools, so I brought the question up for the reason that would be; In the Level Editor, are you able to place just normal ol' light, point, cone, sun, ambient, ray, etc, whatever shape the light source is, can they be placed ANYWHERE in the constructed level? Silly to ask, perhaps, just occurred to be as I seen the gif of the bump mapped rock block with the red light emitting on to it.

EDIT: I recall is bein' mentioned that you can import .obj models, is this possible to do and use in the Level Editor too?
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Is there a way to combine models at runtime? If not is that something that could be created?
How do you mean? If you have a model with multiple layers and multiple textures, you can combine the layers that use the same material at runtime. This also puts their textures onto texture pages, reducing the number of texture swaps.
If you mean loading multiple models and combining them to one, that's something that should be easier to do in a modelling program.

Lol yea, VR is quite the long shot, but paths could cross with that world some day.

Love the fact you made this for everyone's sake, easier accessibility to GMS1.4's and GMS2's 3D fields, this is the kind of work that any design tool really deserves! Ah, poor wording on my end perhaps or my lack of understandin' shader's capabilities, how I meant what I mentioned before was along the lines that I found it odd that the model's animations would use shaders, not there's anything wrong with that, but then you say that they normally use shaders to execute the animations, which I never knew or heard of prior. So lack of awareness on that bit, no biggie, I now know!

So you mean that the model's use their own light then? I mean, I WANT to see a horror game made with these tools, so I brought the question up for the reason that would be; In the Level Editor, are you able to place just normal ol' light, point, cone, sun, ambient, ray, etc, whatever shape the light source is, can they be placed ANYWHERE in the constructed level? Silly to ask, perhaps, just occurred to be as I seen the gif of the bump mapped rock block with the red light emitting on to it.

EDIT: I recall is bein' mentioned that you can import .obj models, is this possible to do and use in the Level Editor too?
Shaders are two programs that work together on the GPU. The vertex shader lets you manipulate vertices and decide what information is passed on to the fragment shader, which lets you manipulate the individual pixels. They let you create so much awesome stuff :D

You can define lighting in the level editor, yes! The level editor is just a tab in the model tool btw. If you define the lighting in a level for example, that lighting can be used to shade all objects in the room. Right now you can create point lights, directional lights and cone lights, shadows are not yet supported.

The model tool only lets you import .obj models (...as well as .smf, of course). You can indeed load models into the level editor, but they're only for demonstration and aren't actually included in the exported file. I may add the option to include them later!
 

Morendral

Member
How do you mean? If you have a model with multiple layers and multiple textures, you can combine the layers that use the same material at runtime. This also puts their textures onto texture pages, reducing the number of texture swaps.
If you mean loading multiple models and combining them to one, that's something that should be easier to do in a modelling program.
The latter, combining multiple models into one. Ideally i would like to try chunking by combing a bunch of models together based on what's needed to reduce draw calls. Since it's chunked, it is created and destroyed dynamically.

My project is a civilization type game, so being able to do that for groups of game tiles is the last thing i need to change it from 2d to 3d. Otherwise i need a lot of different objects drawing single or multiple tiles which is huge performance drop.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
The latter, combining multiple models into one. Ideally i would like to try chunking by combing a bunch of models together based on what's needed to reduce draw calls. Since it's chunked, it is created and destroyed dynamically.

My project is a civilization type game, so being able to do that for groups of game tiles is the last thing i need to change it from 2d to 3d. Otherwise i need a lot of different objects drawing single or multiple tiles which is huge performance drop.
The SMF format is built around the model tool, and as it is right now you can't create or modify models on the fly. This might be something I could add though!

I've uploaded a new version. A bunch of small bugfixed (thanks to @Chris Goodwin for reporting most of them!). Model compiling now works again (it doesn't work in 0.9.31). I've added some camera control scripts, which basically are a wrapper for the built-in camera system that simplifies the creation of a 3D camera. This lets the SMF store the necessary variables needed for for example transforming from 2D screen coordinates to 3D world coords.
I've also cleaned up the code in the demo to show how little code is actually needed.

Download

Next thing I plan to add is proper shadowmap support. These will make use of the new camera system.
 
C

Chris Goodwin

Guest
Might be a long shot, but what about incorporating emissive/glow maps? :)

 

TheSnidr

Heavy metal viking dentist
GMC Elder
I imagine that requires deferred rendering, which this system doesn't support! Deferred rendering is harder to get working for multiple platforms, you'll usually be locked to Windows. Both forward and deferred rendering have their perks and drawbacks, and since I've chosen forward, effects like that will probs not be supported.
 
Last edited:
M

Multimagyar

Guest
I imagine that requires deferred rendering, which this system doesn't support! Deferred rendering is harder to get working for multiple platforms, you'll usually be locked to Windows. Both forward and deferred rendering have their perks and drawbacks, and since I've chosen forward, effects like thattwill probs not be supported.
That's something that probably only true under windows Deferred rendering was used since PS2 (and on it). This is a problem with GLSL lagging behind in favour of phones and HTML5. it would be pretty cool to have GL with multiple render targets.
The closest you can get to a glow with this is probably a texture highlight with interpolation.
 
J

jef

Guest
TheSnidr you are the best. You are the smartest. You are the prettiest. You are the coolest. You are the hottest. You are the president. You are the hero. You are the master. You are the king. You are the friendliest. You are the most charming. You are the cutest. You are the legend. You are the chosen one. You are the greatest gamemaker programmer ever lived. You are the..... did I miss anything?:p

I just wanted to say good job.
 

DukeSoft

Member
Glowmaps can be easily achieved (albeit not really efficient) by doing an extra drawing pass of the scenery, but with an emissve glowmap, onto a surface. Then make a blurred version of that surface, and draw both those surfaces with bm_add over the screen :)

It won't really have any reflection on materials or act as a real light, but it kind of looks the same.
 
R

Rukola

Guest
I imagine that requires deferred rendering, which this system doesn't support! Deferred rendering is harder to get working for multiple platforms, you'll usually be locked to Windows. Both forward and deferred rendering have their perks and drawbacks, and since I've chosen forward, effects like that will probs not be supported.
In the discussion of lighting, I've always liked the texturing and lighting that Rayman 2 the great escape used, imo it still holds up even now. I have no idea how it works.
Also, I find this waterfall to be immensly inviting for 3d progamming as it looks easy to do (game is Windwaker). Just wanted to share ;)

 
Last edited by a moderator:
L

Lonewolff

Guest
Been following your tutorial for a few hours now.


But struggling to make this work.



The image looks pretty much like I feel right about now :D

Is there anything special I should know that I am missing? Am I working with the wrong scale model possibly? I have tried a few different scales with varying results, but just not having much luck.
 
K

Kobold

Guest
Been following your tutorial for a few hours now.

[...]

But struggling to make this work.

[...]

The image looks pretty much like I feel right about now :D

Is there anything special I should know that I am missing? Am I working with the wrong scale model possibly? I have tried a few different scales with varying results, but just not having much luck.
...hi poly is a little awkward to tackle with the available tool palette ...I find

Edit: ...but I love the tool. TheSnidr did an outstanding job here
 
Last edited:

TheSnidr

Heavy metal viking dentist
GMC Elder
Been following your tutorial for a few hours now.


But struggling to make this work.



The image looks pretty much like I feel right about now :D

Is there anything special I should know that I am missing? Am I working with the wrong scale model possibly? I have tried a few different scales with varying results, but just not having much luck.
Hah, are you making a contortionist by any chance?
Looks like somethings's terribly wrong with the skinning. What happens if you autoskin it with a higher distance scale power (the option that pops up when you press autoskin)? Could you send me the model?
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Looks like I am making a zombie clone - LOL :D

This is the model here - https://www.dropbox.com/s/zwk5k9915z6zd1q/human.obj?dl=0

Awesome work you are doing, BTW :)
Hmm, it works for me... but that's not the answer you want xD
As to what you've done wrong - it looks like your rig is kinda messed up? Why are there so many bones in the torso area, pointing in all directions? All bones should ideally be inside the model. Each vertex can be affected by four bones, and the distance to the bone, raised to the power you set, determines the weight of that bone. With a power of 3 (the default) you can get the following result using only autoskin:
 
L

Lonewolff

Guest
Cool, I'll have another crack and see if I can replicate what you have done there.

Again, awesome job :)

Looking at my image above, I didn't rig it that nasty though. Looked good until I started moving things, then it went all ove the shop when I tried rotations, IK, etc.. :D
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Wait, there may actually be a bug in the program you're experiencing - a bug I fixed after release, but haven't uploaded yet.
You're correct, it has to do with scale. The autoskinning doesn't work for very small models in the currently latest version... Try scaling it larger and see what happens?
 

TheSnidr

Heavy metal viking dentist
GMC Elder
A little update on the next version:

The level model you see in the gif is made up of two vertex buffers! It originally used a bunch of textures, but the SMF model compile scripts compacted them together on a texture page and split up any triangles with repeating textures in the model, meaning you can use repeating textures while also using texture pages.
As a result, everything you see in the gif uses a total of two textures:
Texture 1
Texture 2
 
J

jef

Guest
I'll probably make a half-assed port using the existing 1.4 version that will be able to import the latest format, but will probs not support the latest additions like nodes and lights :p

EDIT:
Added cone lights:
If you make a gm 1.4 port with such light effects that, you will be remembered in prayers of full asses who still use 1.4 :p. It would be the greatest thing ever happened to the half assed programmers who are waiting for a humble bundle of gm 2.0 for $15.:D
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Compiled a demo of Clocktown, here's a download in case you'd like to try:
Download ClockTown demo
The source will be released along with the next version! It demonstrates the various techniques that can be used to optimize the models. All the parts of the level model have been combined to single vertex buffers, and the vertex buffers have been frozen. There's a single 1024x1024 texture for each level model. The collision buffer has been transformed into data structures with a script called "smf_collision_optimize", which is also in the current released build. The animation of the player has been segmented into smaller, even pieces and is being linearly interpolated, but since the segments are so small, it still looks like it's quadratic interpolation. And finally, it was compiled with the YYC.
 
Last edited:
D

dc321321

Guest
im adding new metarials but cant change

############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oRigSystem:

Unable to find any instance for object index '100184' name '<undefined>'
at gml_Script_press_buttons
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_press_buttons (line -1)
gml_Object_oRigSystem_Step_0
 
Top