SMF - 3D skeletal animation

TheSnidr

Heavy metal viking dentist
GMC Elder
Yeah targa is super simple, like dead obvious simple.
I wrote a GML implementation a while back.
If I still have it I can send it to you.
Definitely, I'd love to take a look!

@TheSnidr thank you for making this, it's very nice to have this 3d functionality in gm.

I was wondering if you would be able to add something to your example program that would translate from the 2d screen to 3d coordinates. Much like you already have, but where the mouse isn't tired to the camera so that I could gain functionality as in an RTS type game. The goal is to be able to take the ray and figure out what instance it is touching. I can manage that, but I don't understand the vector math to rework your example so that the vector goes through my mouse to a point in space and it is independent of the camera view.

I've looked online and in the legacy forums where I remembered some examples to do this, but I can't seem to make them work with what you've made. I've also tried reverse engineering what you have in your example, but the best I can figure is that the xFrom starts from a point behind the camera and passes directly through it to figure where the camera is pointing.

Any help you could provide would be greatly appreciated. Again, thanks for making this for the community!
Here you go:
Code:
/// @description smf_2d_to_3d_vector(camMat, angle, aspect, posX, posY)
/// @param camMat
/// @param angle
/// @param aspect
/// @param posX(0-1)
/// @param posY(0-1)
var ret,
camMat = argument0,
t = tan(argument1 * pi / 360),
_x = (1 - 2 * argument3) * t * argument2,
_y = (1 - 2 * argument4) * t;
ret = [    camMat[0] + camMat[4] * _x + camMat[8] * _y,
        camMat[1] + camMat[5] * _x + camMat[9] * _y,
        camMat[2] + camMat[6] * _x + camMat[10] * _y];
ret[3] = point_distance_3d(0, 0, 0, ret[0], ret[1], ret[2]);
if ret[3] != 0
{
    ret[0] /= ret[3];
    ret[1] /= ret[3];
    ret[2] /= ret[3];
    return ret;
}
return [1, 0, 0, 0];
The first argument should be a matrix defining the camera's position, its looking direction and its up-vector. You can create said vector with this script:
Code:
/// @description smf_matrix_create_up(x, y, z, to[3], up[3])
/// @param x
/// @param y
/// @param z
/// @param to[3]
/// @param up[3]
//Creates a 4x4 matrix with the up-direction as master
var vTo, vUp, vSi;
vUp = smf_vector_normalize(argument4);
vTo = smf_vector_normalize(smf_vector_orthogonalize(vUp, argument3));
vSi = smf_vector_normalize(smf_vector_cross_product(vUp, vTo));
return [vTo[0], vTo[1], vTo[2], 0,
        vSi[0], vSi[1], vSi[2], 0,
        vUp[0], vUp[1], vUp[2], 0,
        argument0, argument1, argument2, 1];
On a separate subject - I added parallax mapping:

The normal map, specular map and parallax map are all combined to one single texture!
 
Last edited:

zendraw

Member
what i dont get about this tool. can i make a model, texture it, upload the model and texture in game maker and load it ingame? also seeing that were talking about riggin here, can i upload it as animation in game maker? ive read in original post that the animation is becouse a shader. do i need a shader to make it work?
id really like to use this tool but i just dont know it wuld serve me.
thanks.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
You create a .obj model in your favourite model editor. It should be fully textured.
When importing it into this tool, you can customize the default SMF shader with normal maps, specular maps, height maps and reflections as you please. You can also rig it and animate it if you'd like, or you could create an octree collision buffer for super fast 3D collision calculations! Importing into GM is super easy with the SMF scripts, see the demo in the .zip in the first post ^.^
The rigging/animation and octree parts are already in the .zip file in the first post. The shader effects are still in progress and haven't been released yet.
 

zendraw

Member
so in short, your sayn i can make this badass guy in blender, export him to @TheSnidr format, then do some things that you mention, and load it in game maker and play with him?
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Indeed ^.^ It has to be rigged and animated from scratch in the SMF model tool though, you can't animate it in Blender and import it into SMF. I tried adding Collada-support, but that didn't work entirely, so I scrapped it. Right now, only .obj is supported.

The SMF format is made in GM, for GM, so it will work seamlessly with your projects.
 

GMWolf

aka fel666
Definitely, I'd love to take a look!


Here you go:
Code:
/// @description smf_2d_to_3d_vector(camMat, angle, aspect, posX, posY)
/// @param camMat
/// @param angle
/// @param aspect
/// @param posX(0-1)
/// @param posY(0-1)
var ret,
camMat = argument0,
t = tan(argument1 * pi / 360),
_x = (1 - 2 * argument3) * t * argument2,
_y = (1 - 2 * argument4) * t;
ret = [    camMat[0] + camMat[4] * _x + camMat[8] * _y,
        camMat[1] + camMat[5] * _x + camMat[9] * _y,
        camMat[2] + camMat[6] * _x + camMat[10] * _y];
ret[3] = point_distance_3d(0, 0, 0, ret[0], ret[1], ret[2]);
if ret[3] != 0
{
    ret[0] /= ret[3];
    ret[1] /= ret[3];
    ret[2] /= ret[3];
    return ret;
}
return [1, 0, 0, 0];
The first argument should be a matrix defining the camera's position, its looking direction and its up-vector. You can create said vector with this script:
Code:
/// @description smf_matrix_create_up(x, y, z, to[3], up[3])
/// @param x
/// @param y
/// @param z
/// @param to[3]
/// @param up[3]
//Creates a 4x4 matrix with the up-direction as master
var vTo, vUp, vSi;
vUp = smf_vector_normalize(argument4);
vTo = smf_vector_normalize(smf_vector_orthogonalize(vUp, argument3));
vSi = smf_vector_normalize(smf_vector_cross_product(vUp, vTo));
return [vTo[0], vTo[1], vTo[2], 0,
        vSi[0], vSi[1], vSi[2], 0,
        vUp[0], vUp[1], vUp[2], 0,
        argument0, argument1, argument2, 1];
On a separate subject - I added parallax mapping:

The normal map, specular map and parallax map are all combined to one single texture!
woaaaah! This is cool! Very cool!
You are not making a mode l format, but a full 3d workflow and render pipeline at this point!
wowowow
as for the targe thing: Im farily sure I have it on my ext drive. Ill PM it to you if i find it :)
[edit] PMed :)
 
Last edited:

CMAllen

Member
It has to be rigged and animated from scratch in the SMF model tool though
That's kinda the part that bums me out. It's too bad you haven't been able to pull in other rigs/animations. It's hard to know how well your rig is going to work on a given model until you rig and animate it. But you can't rig and animate it until you've built the model and exported it to SMF. Not...exactly an ideal situation. But still better than the alternatives. Unity has native support for blender rigs and animations, so it can be done (but that's just me saying it can be done...no idea how much work is involved in doing so).
 

GMWolf

aka fel666
That's kinda the part that bums me out. It's too bad you haven't been able to pull in other rigs/animations. It's hard to know how well your rig is going to work on a given model until you rig and animate it. But you can't rig and animate it until you've built the model and exported it to SMF. Not...exactly an ideal situation. But still better than the alternatives. Unity has native support for blender rigs and animations, so it can be done (but that's just me saying it can be done...no idea how much work is involved in doing so).
what would be possible is an exporter, to export into SMF from blender. you would need to find a python wizard though.
 

CMAllen

Member
what would be possible is an exporter, to export into SMF from blender. you would need to find a python wizard though.
That's another option, yes. But in both cases, it requires someone with intimate knowledge of the file formats. Which does not include me (by any stretch of the imagination).
 

Morendral

Member
Thank you for posting that!

I'm clearly not very good with this, and as such I'm really confused right now on how to make it work. I broke down the camera and player code into one object for simplicity to start from. It functions as it does in the demo in the "FPS Mode", but I can't get it to properly create the bullethole in the 2d conversion mode I created by holding down the control key. I'll post the code below. I at least know that I'm not properly implementing the new vector with the collision ray.

create event:
Code:
gpu_set_zwriteenable(true);
gpu_set_ztestenable(true);
gpu_set_texrepeat(true);

FOV = 70;
WIDTH = window_get_width();
HEIGHT = window_get_height();
WIDTH_DIV_2 = WIDTH * .5;
HEIGHT_DIV_2 = HEIGHT * .5;
ASPECT = WIDTH / HEIGHT;

view_enabled = true;
view_set_visible(0, true);
view_set_camera(0, camera_create());
camera_set_proj_mat(view_camera[0], matrix_build_projection_perspective_fov(-FOV, -ASPECT, 1, 32000));

z = 0;
prevX = x;
prevY = y;
prevZ = z;
walkDirection = 0;
ground = true;

target = noone;

xyAngle = 0;
zAngle = 0;

collisionRadius = 35;

//Load model and texture
playerModel = smf_model_load("Player/Gign.smf");
playerTex = sprite_add("Player/Gign.png", 0, 0, 0, 0, 0);

vec[0] = 0;
vec[1] = 0;
vec[2] = 0;
vec[3] = 0;

begin step:
Code:
target = id;

xDir = dcos(target.xyAngle) * dcos(target.zAngle);
yDir = dsin(target.xyAngle) * dcos(target.zAngle);
zDir = dsin(target.zAngle);
   
xFrom = target.x - xDir - yDir;
yFrom = target.y - yDir + xDir;
zFrom = target.z - zDir;
   
xTo = target.x * yDir;
yTo = target.y * xDir;
zTo = target.z;

viewMat = matrix_build_lookat(xFrom, yFrom, zFrom, xTo, yTo, zTo, 0, 0, 1)
camera_set_view_mat(view_camera[0], viewMat);

step:
Code:
if !keyboard_check(vk_control)
{
    xyAngle += (window_mouse_get_x() - window_get_width() / 2) / 4;
    zAngle = median(89, -89, zAngle - (window_mouse_get_y() - window_get_height() / 2) / 4);
    window_mouse_set(window_get_width() / 2, window_get_height() / 2);
}

if mouse_check_button_pressed(mb_left)
{
   
    if !keyboard_check(vk_control)
    {
        dx = xTo - xFrom; 
        dy = yTo - yFrom;
        dz = zTo - zFrom;
        d = point_distance_3d(0, 0, 0, dx, dy, dz);
    }
    else
    {
        camMat = smf_matrix_create_up(xFrom,yFrom,zFrom,[xTo,yTo,zTo],[0,0,1]);
        vec = smf_2d_to_3d_vector(camMat, zAngle, ASPECT, window_mouse_get_x()/window_get_width(), window_mouse_get_y()/window_get_height() );
        //vec = smf_2d_to_3d_vector(camMat, zAngle, ASPECT, window_mouse_get_x(), window_mouse_get_y());
        dx = vec[0]; 
        dy = vec[1];
        dz = vec[2];
        d = vec[3];
    }
    hit = smf_collision_cast_ray(oEnvironment.colBuffer, 
        xFrom, yFrom, zFrom, 
        xFrom + 10000 * dx / d, yFrom + 10000 * dy / d, zFrom + 10000 * dz / d);
    n = [hit[3], hit[4], hit[5]];
    (instance_create_depth(0, 0, 0, oBullethole)).worldMatrix = 
        smf_matrix_create_up(hit[0] + n[0], hit[1] + n[1], hit[2] + n[2], [1, pi, sqrt(2)], n);
}
 

TheSnidr

Heavy metal viking dentist
GMC Elder
You've almost got it!
The to-array in smf_matrix_create_up needs to be a vector, not a position. Ie. it needs to be the lookat-position minus the camera position. It does not have to be normalized.
The 2D coordinates have to be between (0, 0) (upper left) and (1, 1) (lower right). Divide the mouse coordinates by the window size ;)
 

Morendral

Member
You've almost got it!
The to-array in smf_matrix_create_up needs to be a vector, not a position. Ie. it needs to be the lookat-position minus the camera position. It does not have to be normalized.
The 2D coordinates have to be between (0, 0) (upper left) and (1, 1) (lower right). Divide the mouse coordinates by the window size ;)
It's so close to working now. The mouse sort of functions now, at least they are in the FOV. After experimenting with it, the place where the bullethole objects are created looks like it is the correct shape of the view projected against the background. The problem is that it is placing them a fraction of the distance needed on the screen.

Image:
mouseclicks.png

Also, the 'z' is flipped as the clicks on the bottom of the screen register on the top of that field and vice versa.

Here is the updated step event.
Code:
if !keyboard_check(vk_control)
{
    xyAngle += (window_mouse_get_x() - window_get_width() / 2) / 4;
    zAngle = median(89, -89, zAngle - (window_mouse_get_y() - window_get_height() / 2) / 4);
    window_mouse_set(window_get_width() / 2, window_get_height() / 2);
}

if mouse_check_button_pressed(mb_left)
{
   
    if !keyboard_check(vk_control)
    {
        dx = xTo - xFrom; 
        dy = yTo - yFrom;
        dz = zTo - zFrom;
        d = point_distance_3d(0, 0, 0, dx, dy, dz);
    }
    else
    {
        vX = xTo - xFrom;
        vY = yTo - yFrom;
        vZ = zTo - zFrom;
        camMat = smf_matrix_create_up(xFrom,yFrom,zFrom,[vX,vY,vZ],[0,0,1]);
        vec = smf_2d_to_3d_vector(camMat, zAngle, ASPECT, window_mouse_get_x()/window_get_width(), window_mouse_get_y()/window_get_height() );
        dx = vec[0]; 
        dy = vec[1];
        dz = vec[2];
        d  = vec[3];
    }
    hit = smf_collision_cast_ray(oEnvironment.colBuffer, 
        xFrom, yFrom, zFrom, 
        xFrom + 10000 * dx / d, yFrom + 10000 * dy / d, zFrom + 10000 * dz / d);
    n = [hit[3], hit[4], hit[5]];
    (instance_create_depth(0, 0, 0, oBullethole)).worldMatrix = 
        smf_matrix_create_up(hit[0] + n[0], hit[1] + n[1], hit[2] + n[2], [1, pi, sqrt(2)], n);
}
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Okay, here's a link to a BETA version of the model editor:
https://www.dropbox.com/s/0gxcnv8zz5slkyd/SMF model tool Material beta.zip?dl=0
It has all the new features, but the exported files can't be imported into GM! I need your help to break it so that I can iron out the bugs. I've spent so much time looking at it the past few days, I'm unable to produce more errors, but I'm sure there are plenty! The new import scripts will come soon!
Note - Right now there's absolutely no backwards compatibility with old versions of the format. If you try to load an old .smf or .ani file, it will crash.



It's so close to working now. The mouse sort of functions now, at least they are in the FOV. After experimenting with it, the place where the bullethole objects are created looks like it is the correct shape of the view projected against the background. The problem is that it is placing them a fraction of the distance needed on the screen.

Image:

Also, the 'z' is flipped as the clicks on the bottom of the screen register on the top of that field and vice versa.

Here is the updated step event.
Code:
if !keyboard_check(vk_control)
{
    xyAngle += (window_mouse_get_x() - window_get_width() / 2) / 4;
    zAngle = median(89, -89, zAngle - (window_mouse_get_y() - window_get_height() / 2) / 4);
    window_mouse_set(window_get_width() / 2, window_get_height() / 2);
}

if mouse_check_button_pressed(mb_left)
{
 
    if !keyboard_check(vk_control)
    {
        dx = xTo - xFrom;
        dy = yTo - yFrom;
        dz = zTo - zFrom;
        d = point_distance_3d(0, 0, 0, dx, dy, dz);
    }
    else
    {
        vX = xTo - xFrom;
        vY = yTo - yFrom;
        vZ = zTo - zFrom;
        camMat = smf_matrix_create_up(xFrom,yFrom,zFrom,[vX,vY,vZ],[0,0,1]);
        vec = smf_2d_to_3d_vector(camMat, zAngle, ASPECT, window_mouse_get_x()/window_get_width(), window_mouse_get_y()/window_get_height() );
        dx = vec[0];
        dy = vec[1];
        dz = vec[2];
        d  = vec[3];
    }
    hit = smf_collision_cast_ray(oEnvironment.colBuffer,
        xFrom, yFrom, zFrom,
        xFrom + 10000 * dx / d, yFrom + 10000 * dy / d, zFrom + 10000 * dz / d);
    n = [hit[3], hit[4], hit[5]];
    (instance_create_depth(0, 0, 0, oBullethole)).worldMatrix =
        smf_matrix_create_up(hit[0] + n[0], hit[1] + n[1], hit[2] + n[2], [1, pi, sqrt(2)], n);
}
Oops, I made a mistake. Use smf_matrix_create, not smf_matrix_create_up! The latter will orthogonalize the matrix so that the up-vector stays constant, ignoring the z-angle of the to-vector. The former does the opposite, and is what you want!
Also, the angle argument in the script should be the FOV, not the z-angle. I should rename the argument to better reflect that.
And finally, you can invert the x-axis in the script. I dunno why it has to be inverted in the first place, but that fixes it :p
Here's the updated 2d to 3d script:
Code:
/// @description smf_2d_to_3d_vector(camMat, fov, aspect, posX, posY)
/// @param camMat
/// @param fov
/// @param aspect
/// @param posX(0-1)
/// @param posY(0-1)
var ret,
camMat = argument0,
t = tan(argument1 * pi / 360),
_x = -(1 - 2 * argument3) * t * argument2,
_y = (1 - 2 * argument4) * t;
ret = [ camMat[0] + camMat[4] * _x + camMat[8] * _y,
        camMat[1] + camMat[5] * _x + camMat[9] * _y,
        camMat[2] + camMat[6] * _x + camMat[10] * _y];
ret[3] = point_distance_3d(0, 0, 0, ret[0], ret[1], ret[2]);
if ret[3] != 0
{
    ret[0] /= ret[3];
    ret[1] /= ret[3];
    ret[2] /= ret[3];
    return ret;
}
return [1, 0, 0, 0];
 
Last edited:

Morendral

Member
Okay, here's a link to a BETA version of the model editor:
https://www.dropbox.com/s/0gxcnv8zz5slkyd/SMF model tool Material beta.zip?dl=0
It has all the new features, but the exported files can't be imported into GM! I need your help to break it so that I can iron out the bugs. I've spent so much time looking at it the past few days, I'm unable to produce more errors, but I'm sure there are plenty! The new import scripts will come soon!
Note - Right now there's absolutely no backwards compatibility with old versions of the format. If you try to load an old .smf or .ani file, it will crash.




Oops, I made a mistake. Use smf_matrix_create, not smf_matrix_create_up! The latter will orthogonalize the matrix so that the up-vector stays constant, ignoring the xy-angle of the to-vector. The former does the opposite, and is what you want!
Also, the angle argument in the script should be the FOV, not the xy-angle. I should rename the argument to better reflect that.
And finally, you can invert the x-axis in the script. I dunno why it has to be inverted in the first place, but that fixes it :p
Here's the updated 2d to 3d script:
Code:
/// @description smf_2d_to_3d_vector(camMat, fov, aspect, posX, posY)
/// @param camMat
/// @param fov
/// @param aspect
/// @param posX(0-1)
/// @param posY(0-1)
var ret,
camMat = argument0,
t = tan(argument1 * pi / 360),
_x = -(1 - 2 * argument3) * t * argument2,
_y = (1 - 2 * argument4) * t;
ret = [ camMat[0] + camMat[4] * _x + camMat[8] * _y,
        camMat[1] + camMat[5] * _x + camMat[9] * _y,
        camMat[2] + camMat[6] * _x + camMat[10] * _y];
ret[3] = point_distance_3d(0, 0, 0, ret[0], ret[1], ret[2]);
if ret[3] != 0
{
    ret[0] /= ret[3];
    ret[1] /= ret[3];
    ret[2] /= ret[3];
    return ret;
}
return [1, 0, 0, 0];
It works perfectly now, thank you so much!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Oh, haha, that's for an old collada test I did, it doesn't work properly. It did show you a warning though, didn't it?
 
S

Squisher

Guest
Is it possible to edit the model at runtime? :O
I'm looking into character creation, and thinking about using sliders to determine character aspects such as weight, height, muscle mass, etc.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Sorry for late answer! There's currently no way to scale single bones. Dual quaternions simply don't allow for scaling. It's the price to pay for efficiency!
That said, I may add matrix support later. Matrices are easier to scale, but they also require sending twice as much data to the shader compared to dual quats.

Just a heads-up for the people finding this engine just now:
The format is about to change drastically for the better. Big changes coming up! Some of the news include shaders with different effects, ability to load zipped OBJs with multiple textures, textures included in the model file, runtime optimizations, model compiling (ie. creating texture pages for non-repeating textures and combining submodels on the same texture page), a new node system, and a more streamlined workflow when working with SMF models ingame.
I'll only add backwards compatibility if there is a demand for it.
 

GMWolf

aka fel666
Sorry for late answer! There's currently no way to scale single bones. Dual quaternions simply don't allow for scaling. It's the price to pay for efficiency!
That said, I may add matrix support later. Matrices are easier to scale, but they also require sending twice as much data to the shader compared to dual quats.

Just a heads-up for the people finding this engine just now:
The format is about to change drastically for the better. Big changes coming up! Some of the news include shaders with different effects, ability to load zipped OBJs with multiple textures, textures included in the model file, runtime optimizations, model compiling (ie. creating texture pages for non-repeating textures and combining submodels on the same texture page), a new node system, and a more streamlined workflow when working with SMF models ingame.
I'll only add backwards compatibility if there is a demand for it.
That all sounds incredible! Nice!
I can't wait to see the new streamlined workflow!
 
K

kinsx55

Guest
This system is entirely free and will always be free.
<<GMS2:How to animate....ets>>
Why not <<GMS1 and GMS2 How to animate....ets>>?
It looks to me like you promote the GMS2...
 
S

Squisher

Guest
Well, I do, for my own purposes. GMS1 support is secondary, I work primarily in GMS2, and porting is cumbersome. I have no affiliation with YoYoGames.
I'm still stuck in GMS1, and greatly appreciate the work you put into porting!
 
D

Duran38

Guest
Bro you are awsome really thank you so much. Can you make the use of the program simpler? Or maybe you should add different languages.
i did try new versiyon but creating error.
load model -> k1.smf (my model (still working with old version))


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

Data structure with index does not exist.
at gml_Script_rig_model_load
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_rig_model_load (line 0)
gml_Script_press_buttons
gml_Object_oRigSystem_Step_0
 

TheSnidr

Heavy metal viking dentist
GMC Elder
MrPr1993: Thank you! :D

Duran38: How would you suggest I could make it simpler? Adding support for other languages isn't on my todo-list at the moment, but maybe ;)
The model format is drastically changed, and for the sake of saving time I scrapped backwards compatibility. This means that models made in previous versions of the model tool will not work in the new version. This is why it's in the WIP section of the forums!

Now, I've uploaded the latest version of the model tool and the import scripts, but I haven't gotten around to making any tutorials. The ones of you who know the workflow from before will have no trouble getting it to work. The ones of you who are new to the model tool will probably have to look at version 0.8.6 first, to learn how to use it. I'm sorry for this, tutorials will follow shortly, but since the model tool is practically done I just wanted to get it released.
In short, these are the changes:
- You can now import zipped OBJ files with multiple textures. Make sure the .mtl file has the same name as the .obj file, and that the textures are either .png or .bmp, and you're good to go!
- Added a level editor tab in the model tool. You can now place nodes and give them certain properties like variables, strings and 3D paths.
- Added a material generator and custom shaders in the Edit Model tab. This will give you the possibility to use advanced drawing techniues like normal maps, specular maps and height maps, as well as spheremaps or equirectangular reflection maps. You can also draw models with outlines, rim lighting, specular lighting and cel shading.
- The .smf format is now a compound format, containing everything the model needs to function. It can contain the model itself, the materials it uses, its textures, collision buffer, rig and animations, and objects and their properties placed in the level editor.
- Added the possibility to save selections in the skinning tab
- Animations can be imported directly from a different .smf file
- Once imported into the game, the .smf models can be optimized even further by compiling them. Compiling models combines the models that use the same material, and puts their textures onto texture pages. The models will be exported into the local folder for that game, so that the next time you start the game, they won't have to be compiled again. To optimize it even further, you can replace the models in the game files with the compiled versions, and import the combined textures into GM as sprites, saving large amounts of memory (externally imported sprites use 4x the memory as internal ones). I will make a proper tutorial on how to use this powerful function.
- And lots of small changes

See the first post for download links!
 
K

Kobold

Guest
I can't help myself.. this is really awesome. I need to throw in a few questions:
1) Keyframe interpolation possible? - For example if the model goes from idle-animation into the next keyframe of an animation in a smooth transition rather than instantly changing bone coords to the next keyframe in one step.
2) Can bones be manipulated at game runtime? - For example If I wanted to have the head bone track an object (like making it look/focus a certain point).

Edit: A definite yes to question 2... as I have figured out under scripts-group"Animation->Frame"
And yes to question 1.

great! haha.... never mind then.
 
Last edited:

MrPr1993

Member
Somethin' I'm wondering: any way to fix this platform thing? There's a part where you run up a slope, but when that happens the character... kinda briefly jumps. For a tiiiny bit. I want to know if there's a way to keep em' sticked to the ground?
 

EMPixed

Member
I have continued to lurk and watch over the development of this project, and hot damn has it went in a direction that's much better than what most could anticipate. I am GLAD to see that this project continues to grow even now and it's also a pleasant thing to see you've approved these tools to be used to make and help in commercial games/programs creation, but I digress. This works in HTML5 now, this is gonna be a hell of a ride to watch and experience, but I do have a thought that could benefit most if not all that use this tool when it's completed(notably when it reaches the big 1.0 update I'm referrin' to).

Thought / Idea; Why not see if a tutorial can be made for these 3D tools you've made so everyone can benefit and have a better understandin' for and how to use said tools?
Consider this a "I'll throw a wild card on the table" or a "throw my hat into the mix"

Now I mean this in the sense not where TheSnidr would have to go and make said tutorial, but pretty much anyone that would be willin' to take the time to make somethin' like this, of course I imagine there are those that would be on the side where this would tarnish(some how, just an idea though) the tools' integrity, already you'll need to be an advanced user of GMS1.4 and GMS2 to just simply use these, but the way I've thought of this is to perhaps help those that want to use these tools leap over the hurdle that little bit easier. If this idea is frowned at, well, fair enough, opinions are opinions. Also, this seems to be somethin' that people could use along side with BlueBurn's PEd 3D tool as well, would be interestin' to see what GMS' first 3D game that uses these tools would be outside of the tools' creator's games of course(nothin' personal, Snidr, bud, just extremely interested with what will be made by others with your amazin' tools ;)). So far there's Lewa's Celaria that's a 3D game made in GM, just not sure what version as I don't remember right off the bat, but it doesn't use these tools and so far that tells me that GM would get some means of 3D tools at some point, and well.....here we are! :p

Tangent aside, I have no clue if it's been asked already, but what additional things are bein' planned for all these tools, if you would like to share, I understand you maybe more inclined to try to surprise everyone here with any new additions, changes and such. This makes me itch for more, this is such a quality thing to be made that you just itch for more to be shared, can't imagine what the more exotic and cosmic additions/changes/etc could be made to these things. It's insanity, but it's great, please keep this awesome work up. Game Maker needs more incredible things like these tools and other programs/hardware/etc crafted for it, with it, just generally somethin' to do with it!

I shall continue to spy on this thread, this is just so great!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
I can't help myself.. this is really awesome. I need to throw in a few questions:
1) Keyframe interpolation possible? - For example if the model goes from idle-animation into the next keyframe of an animation in a smooth transition rather than instantly changing bone coords to the next keyframe in one step.
2) Can bones be manipulated at game runtime? - For example If I wanted to have the head bone track an object (like making it look/focus a certain point).

Edit: A definite yes to question 2... as I have figured out under scripts-group"Animation->Frame"
And yes to question 1.

great! haha.... never mind then.
Haha, you figured it out on your own :D I really want to make that part more clear, perhaps by renaming it to "pose" instead of "frame".

Somethin' I'm wondering: any way to fix this platform thing? There's a part where you run up a slope, but when that happens the character... kinda briefly jumps. For a tiiiny bit. I want to know if there's a way to keep em' sticked to the ground?
You could increase the vertical friction while touching ground! The problem is that when going uphill, the player gets a vertical momentum which continues when on top of the hill, making him/her "jump" a little. Limiting the vertical speed by increasing the vertical friction is a simple fix for this!

I have continued to lurk and watch over the development of this project, and hot damn has it went in a direction that's much better than what most could anticipate. I am GLAD to see that this project continues to grow even now and it's also a pleasant thing to see you've approved these tools to be used to make and help in commercial games/programs creation, but I digress. This works in HTML5 now, this is gonna be a hell of a ride to watch and experience, but I do have a thought that could benefit most if not all that use this tool when it's completed(notably when it reaches the big 1.0 update I'm referrin' to).

Thought / Idea; Why not see if a tutorial can be made for these 3D tools you've made so everyone can benefit and have a better understandin' for and how to use said tools?
Consider this a "I'll throw a wild card on the table" or a "throw my hat into the mix"

Now I mean this in the sense not where TheSnidr would have to go and make said tutorial, but pretty much anyone that would be willin' to take the time to make somethin' like this, of course I imagine there are those that would be on the side where this would tarnish(some how, just an idea though) the tools' integrity, already you'll need to be an advanced user of GMS1.4 and GMS2 to just simply use these, but the way I've thought of this is to perhaps help those that want to use these tools leap over the hurdle that little bit easier. If this idea is frowned at, well, fair enough, opinions are opinions. Also, this seems to be somethin' that people could use along side with BlueBurn's PEd 3D tool as well, would be interestin' to see what GMS' first 3D game that uses these tools would be outside of the tools' creator's games of course(nothin' personal, Snidr, bud, just extremely interested with what will be made by others with your amazin' tools ;)). So far there's Lewa's Celaria that's a 3D game made in GM, just not sure what version as I don't remember right off the bat, but it doesn't use these tools and so far that tells me that GM would get some means of 3D tools at some point, and well.....here we are! :p

Tangent aside, I have no clue if it's been asked already, but what additional things are bein' planned for all these tools, if you would like to share, I understand you maybe more inclined to try to surprise everyone here with any new additions, changes and such. This makes me itch for more, this is such a quality thing to be made that you just itch for more to be shared, can't imagine what the more exotic and cosmic additions/changes/etc could be made to these things. It's insanity, but it's great, please keep this awesome work up. Game Maker needs more incredible things like these tools and other programs/hardware/etc crafted for it, with it, just generally somethin' to do with it!

I shall continue to spy on this thread, this is just so great!
Thank you so much for this inspiring post! :D I really do plan to make a proper manual and tutorial series for all features in this engine. I've started making tutorial videos several times, but I seem to be terrible at talking into a microphone. Gotta make a script for each video, can't wing it xD
I've seen @BlueBurn's editor tool, which looks very promising! My level editor won't even aim at being as advanced as theirs... Would be cool if they'd somehow support the .smf format though, once it's completed ;D
As for planned features, the next thing I'm adding will be a lighting system. Right now there's only a single directional light source. I will add point lights and directional lights, and possibly some more advanced lighting like cone lights and dynamic shadows. Precomputed static per-vertex lighting is actually already available in the Edit model tab! Still, only with a single lightsource :p
 

kraifpatrik

Member
I've seen @BlueBurn's editor tool, which looks very promising! (...) Would be cool if they'd somehow support the .smf format though, once it's completed ;D
We first have to finish the update that we are working on and then port PEd to GMS2, but I think it should be possible then.

Anyways, it's nice to see your project growing. Keep it up! :)

- Patrik from BlueBurn team

EDIT: Actually we have been thinking about using SMF for collisions in our game. The thing is that the levels consist of dynamic objects that can be moved and destroyed (like cars, jets, watercrafts, houses, walls, trees etc.) (the only static thing is a ground I think, which we do not need a new collision system for). Is it possible to use SMF even in such case? From what I understood this is more for levels that are a single model.
 
Last edited:

GMWolf

aka fel666
We first have to finish the update that we are working on and then port PEd to GMS2, but I think it should be possible then.

Anyways, it's nice to see your project growing. Keep it up! :)

- Patrik from BlueBurn team

EDIT: Actually we have been thinking about using SMF for collisions in our game. The thing is that the levels consist of dynamic objects that can be moved and destroyed (like cars, jets, watercrafts, houses, walls, trees etc.) (the only static thing is a ground I think, which we do not need a new collision system for). Is it possible to use SMF even in such case? From what I understood this is more for levels that are a single model.
If it's not: shouldn't be super hard to change: just transform the collision ray from world space to local object space. (Multiplication with inverse model matrix I think).

Tlits a little trickier for model on model collisions. But those are rarely used in practice. Far more common to have primitive on model collisions (sphere, capsule, ray intersection...)
 

EMPixed

Member
Interestin' to see intersectin' progress happen like this due to the fact I mentioned BlueBurn in this topic, but hey, it's progress nonetheless and that's always a good thing to see!

One more important(considerable, as I imagine many others would like to know, but didn't think to ask) question relatin' to creations made in these tools;
Anything that we create in your tools, Snidr, do we own our creations that are made with your tools? Kinda an oxymoron question, but like I said to ZackBell on Twitter; "I'm just tryin' to be very careful about these kinds of things."

Outside of that, I should clarify that the updates on all this has really made me gitty for GMS and GMS2, never truly expected work to this length would be put into such a tool set. Lurked around this project, it does not disappoint!

EDIT: It occurs to me, I seen those GIFs of the bump mapped stone block you shared before, but what came to mind was; "Did he use shaders for this?". Unfamiliar with shader programming myself, but you did that for use in your SMF Model Editor, amazin' to say the least, let alone trippy too. You clearly used Normal Maps for that, but geez that looks like somethin' you'd find in other engine tools.
 
Last edited:

TheSnidr

Heavy metal viking dentist
GMC Elder
We first have to finish the update that we are working on and then port PEd to GMS2, but I think it should be possible then.

Anyways, it's nice to see your project growing. Keep it up! :)

- Patrik from BlueBurn team

EDIT: Actually we have been thinking about using SMF for collisions in our game. The thing is that the levels consist of dynamic objects that can be moved and destroyed (like cars, jets, watercrafts, houses, walls, trees etc.) (the only static thing is a ground I think, which we do not need a new collision system for). Is it possible to use SMF even in such case? From what I understood this is more for levels that are a single model.
Nice!
The collision octree works best for internally static objects, but you can easily use multiple collision meshes in a scene, and these can move in relation to one another. It also supports ray casting, making level editing easier: https://dl.dropboxusercontent.com/s/nhcvihdg68p1z7z/Editor.gif

@TheSnidr if you need a tutorial series, I would be happy to make some!
I would just need to get familiar with the system.
Sweet! Do you make videos? I'd be down to cooperate.

Interestin' to see intersectin' progress happen like this due to the fact I mentioned BlueBurn in this topic, but hey, it's progress nonetheless and that's always a good thing to see!

One more important(considerable, as I imagine many others would like to know, but didn't think to ask) question relatin' to creations made in these tools;
Anything that we create in your tools, Snidr, do we own our creations that are made with your tools? Kinda an oxymoron question, but like I said to ZackBell on Twitter; "I'm just tryin' to be very careful about these kinds of things."

Outside of that, I should clarify that the updates on all this has really made me gitty for GMS and GMS2, never truly expected work to this length would be put into such a tool set. Lurked around this project, it does not disappoint!

EDIT: It occurs to me, I seen those GIFs of the bump mapped stone block you shared before, but what came to mind was; "Did he use shaders for this?". Unfamiliar with shader programming myself, but you did that for use in your SMF Model Editor, amazin' to say the least, let alone trippy too. You clearly used Normal Maps for that, but geez that looks like somethin' you'd find in other engine tools.
Anything you create with this tool is yours to do with as you please! It's free of charge and free of strings. I just want to see more 3D games made with GM.
The effects you're referring to are super easy to apply to an object with the new material editor in the Edit Model tab! :D You don't have to know the shader language to use them, simply play with the sliders and load up normals maps, specular maps and height maps as you please. There will be a proper tutorial soon, but I haven't had the time for it lately >.<
 

MrPr1993

Member
OK! I was checking out the recent version and I think I found a bug:

I'm trying to get my character's animation to lie down, but whenever I click to move the root bone, it spazzes around before I release the button, giving me trouble trying to move to where I want it to go. And when I manage to find the good spot, the other animations' roots are moved as well! O_O;
 

TheSnidr

Heavy metal viking dentist
GMC Elder
OK! I was checking out the recent version and I think I found a bug:

I'm trying to get my character's animation to lie down, but whenever I click to move the root bone, it spazzes around before I release the button, giving me trouble trying to move to where I want it to go. And when I manage to find the good spot, the other animations' roots are moved as well! O_O;
OH! o.o I will fix this as soon as possible!
 

EMPixed

Member
Anything you create with this tool is yours to do with as you please! It's free of charge and free of strings. I just want to see more 3D games made with GM.
The effects you're referring to are super easy to apply to an object with the new material editor in the Edit Model tab! :D You don't have to know the shader language to use them, simply play with the sliders and load up normals maps, specular maps and height maps as you please. There will be a proper tutorial soon, but I haven't had the time for it lately >.<
Here lately, I just gotten into usin' Blender and get the questions answered, I'm really startin' to like 2018 already and it's not even mid-January! Good deal so far, but back to this topic!
I couldn't agree more with you on GM bein' in need of more 3D games, thanks to the tool set you've shared with us for to observe and use, you just made that all the bit more possible! Top-notch work my good man, top-notch!
No requirement of shader program knowledge you say? How 'bout that, I like the more than what my eyes show me as sight doesn't tell you the whole story after all, and that's fine! Gotta use your other senses and assets to learn more about anything!


OK! I was checking out the recent version and I think I found a bug:

I'm trying to get my character's animation to lie down, but whenever I click to move the root bone, it spazzes around before I release the button, giving me trouble trying to move to where I want it to go. And when I manage to find the good spot, the other animations' roots are moved as well! O_O;
OH! o.o I will fix this as soon as possible!
Oh geez, that's a snag, glad to hear there'll be a fix soon! Honestly, it seems like one of those aspects in the tools that would be easy to plug in, hopefully it's an easy fix for ya!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
I had apparently messed up the animation system quite badly, so having multiple animations in one file didn't work properly. I've uploaded a small fix:
Download
I'm unable to reproduce the spazzing out you mentioned, @MrPr1993, but try this version and see if it's still there!
 
S

Squisher

Guest
Since you've already added Octree Partitioning capabilities for the collision system, will you add Pathfinding in a future update? :eek:
 
Top