• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Is there a tutorial on importing standard obj/ fbx 3D files?

MilesThatch

Member
I've found this guide for setting up a basic scene and camera in Game Maker.
Discussion - [GUIDE] Getting Started with 3D in GMS2

But besides making a basic primitive by manually setting the vertices it doesn't go into anything actually usable. Is there a tutorial on using standard obj / fbx / other basic 3d model format for GM:S2 ?

I don't work in blender but what I do know is that All well made programs like Maya/ Blender/ Max can export the obj format. This way it's regardless which 3d modeling software you use.


I saw the blender export plugin post but this plugin is... you guessed it... blender specific. It seems to read the vertex and uv data from the model and literally wirite it into a text file that is essentially a compilation of GM:S2 code functions, recording every vertex into the buffer.

As an output, you basically get a text file that you import into game maker as a script. Here's an example code of a simple model, straight from the demo project. That's basically all the exporter did - take all the vertices and insert their values into a game maker 2 function. One by One.

Code:
var format, output;

format = argument0;
output = vertex_create_buffer();
vertex_begin( output, format );
vertex_position_3d( output, -1.999998, -2.999997, -0.000000, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.216151, 0.962475 );
vertex_position_3d( output, 1.999998, -2.999997, -2.999998, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.042291, 0.881442 );
vertex_position_3d( output, -1.999998, -2.999997, -2.999998, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.215558, 0.880809 );
vertex_position_3d( output, 1.999998, -2.999997, -2.999998, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.042291, 0.881442 );
vertex_position_3d( output, -1.999998, -2.999997, -0.000000, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.216151, 0.962475 );
vertex_position_3d( output, 1.999998, -2.999997, -0.000000, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.042884, 0.963108 );
vertex_position_3d( output, 1.999998, 2.999998, -2.999997, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.679019, 0.881442 );
vertex_position_3d( output, -1.999998, 2.999997, 0.000001, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505159, 0.962475 );
vertex_position_3d( output, -1.999998, 2.999998, -2.999997, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505752, 0.880809 );
vertex_position_3d( output, -1.999998, 2.999997, 0.000001, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505159, 0.962475 );
vertex_position_3d( output, 1.999998, 2.999998, -2.999997, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.679019, 0.881442 );
vertex_position_3d( output, 1.999998, 2.999997, 0.000001, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.678426, 0.963108 );
vertex_position_3d( output, 1.999998, 2.999998, -2.999997, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.679019, 0.881442 );
vertex_position_3d( output, 1.999998, -2.999997, -0.000000, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.968633, 0.963108 );
vertex_position_3d( output, 1.999998, 2.999997, 0.000001, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.678426, 0.963108 );
vertex_position_3d( output, 1.999998, -2.999997, -0.000000, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.968633, 0.963108 );
vertex_position_3d( output, 1.999998, 2.999998, -2.999997, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.679019, 0.881442 );
vertex_position_3d( output, 1.999998, -2.999997, -2.999998, );
vertex_normal( output, -1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.968040, 0.881442 );
vertex_position_3d( output, -1.999998, -2.999997, -0.000000, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.216151, 0.962475 );
vertex_position_3d( output, -1.999998, 2.999998, -2.999997, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505752, 0.880809 );
vertex_position_3d( output, -1.999998, 2.999997, 0.000001, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505159, 0.962475 );
vertex_position_3d( output, -1.999998, 2.999998, -2.999997, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505752, 0.880809 );
vertex_position_3d( output, -1.999998, -2.999997, -0.000000, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.216151, 0.962475 );
vertex_position_3d( output, -1.999998, -2.999997, -2.999998, );
vertex_normal( output, 1.000000, 0.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.215558, 0.880809 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, 2.499998, 3.499997, -2.735399, );
vertex_normal( output, -0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, -2.499998, 3.499997, -2.735399, );
vertex_normal( output, 0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, -2.499998, -3.499996, -2.735400, );
vertex_normal( output, 0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, -2.499998, 3.499997, -2.735399, );
vertex_normal( output, 0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, 2.499998, -3.499996, -2.785400, );
vertex_normal( output, -0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, 2.499998, -3.499996, -2.785400, );
vertex_normal( output, -0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, 2.499998, 3.499997, -2.785399, );
vertex_normal( output, -0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, -2.499998, -3.499996, -2.785400, );
vertex_normal( output, 0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, -2.499998, 3.499997, -2.735399, );
vertex_normal( output, 0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, 2.499998, 3.499997, -2.735399, );
vertex_normal( output, -0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 0.000000, 3.499997, -4.199496, );
vertex_normal( output, 0.000000, -0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.439436 );
vertex_position_3d( output, 2.499998, 3.499997, -2.735399, );
vertex_normal( output, -0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 0.000000, 3.499997, -4.249496, );
vertex_normal( output, 0.000000, -0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.081601, 0.426620 );
vertex_position_3d( output, 2.499998, 3.499997, -2.785399, );
vertex_normal( output, -0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, -2.499998, -3.499996, -2.785400, );
vertex_normal( output, 0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, -2.499998, -3.499996, -2.735400, );
vertex_normal( output, 0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, -2.499998, -3.499996, -2.785400, );
vertex_normal( output, 0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, 0.000000, -3.499996, -4.199497, );
vertex_normal( output, 0.000000, 0.840236, -0.542192, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.439436 );
vertex_position_3d( output, 0.000000, -3.499996, -4.249497, );
vertex_normal( output, 0.000000, 0.609088, 0.793085, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.518399, 0.426620 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 2.499998, -3.499996, -2.785400, );
vertex_normal( output, -0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, 2.499998, 3.499997, -2.785399, );
vertex_normal( output, -0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 2.499998, 3.499997, -2.735399, );
vertex_normal( output, -0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, 2.499998, -3.499996, -2.735400, );
vertex_normal( output, -0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, 2.499998, 3.499997, -2.785399, );
vertex_normal( output, -0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, 2.499998, -3.499996, -2.785400, );
vertex_normal( output, -0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, -2.499998, -3.499996, -2.735400, );
vertex_normal( output, 0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, -2.499998, 3.499997, -2.735399, );
vertex_normal( output, 0.413831, -0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.759551 );
vertex_position_3d( output, -2.499998, 3.499997, -2.785399, );
vertex_normal( output, 0.687155, -0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.026491, 0.748587 );
vertex_position_3d( output, -2.499998, -3.499996, -2.735400, );
vertex_normal( output, 0.413831, 0.554460, -0.721976, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.759551 );
vertex_position_3d( output, -2.499998, -3.499996, -2.785400, );
vertex_normal( output, 0.687155, 0.610431, 0.393902, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.573509, 0.748587 );
vertex_position_3d( output, 0.000000, -2.999996, -4.149996, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.128525, 0.849829 );
vertex_position_3d( output, -1.999998, -2.999997, -2.999998, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.215617, 0.880818 );
vertex_position_3d( output, 1.999998, -2.999997, -2.999998, );
vertex_normal( output, 0.000000, 1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.042350, 0.881451 );
vertex_position_3d( output, -1.999998, 2.999998, -2.999997, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.505752, 0.880809 );
vertex_position_3d( output, 0.000000, 2.999998, -4.149995, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.592844, 0.849820 );
vertex_position_3d( output, 1.999998, 2.999998, -2.999997, );
vertex_normal( output, 0.000000, -1.000000, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.679019, 0.881442 );
vertex_position_3d( output, -0.060686, -2.163743, -3.520478, );
vertex_normal( output, -0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.678297, 0.354073 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.676517, 0.546573 );
vertex_position_3d( output, -0.060686, -2.655718, -3.520478, );
vertex_normal( output, -0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.597367, 0.354073 );
vertex_position_3d( output, -0.060686, -2.655718, -3.520478, );
vertex_normal( output, -0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.597367, 0.354073 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.676517, 0.546573 );
vertex_position_3d( output, -0.060686, -2.655718, -4.620913, );
vertex_normal( output, -0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.599122, 0.546573 );
vertex_position_3d( output, -0.612238, -2.655718, -3.520478, );
vertex_normal( output, 0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.837051, 0.355636 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.838664, 0.548135 );
vertex_position_3d( output, -0.612238, -2.163743, -3.520478, );
vertex_normal( output, 0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.763211, 0.355636 );
vertex_position_3d( output, -0.612238, -2.163743, -3.520478, );
vertex_normal( output, 0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.763211, 0.355636 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.838664, 0.548135 );
vertex_position_3d( output, -0.612238, -2.163743, -4.620913, );
vertex_normal( output, 0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.761555, 0.548135 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.676517, 0.546573 );
vertex_position_3d( output, -0.060686, -2.163743, -3.520478, );
vertex_normal( output, -0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.678297, 0.354073 );
vertex_position_3d( output, -0.612238, -2.163743, -3.520478, );
vertex_normal( output, 0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.763211, 0.355636 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.676517, 0.546573 );
vertex_position_3d( output, -0.612238, -2.163743, -3.520478, );
vertex_normal( output, 0.707083, -0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.763211, 0.355636 );
vertex_position_3d( output, -0.612238, -2.163743, -4.620913, );
vertex_normal( output, 0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.761555, 0.548135 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.838664, 0.548135 );
vertex_position_3d( output, -0.612238, -2.655718, -3.520478, );
vertex_normal( output, 0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.837051, 0.355636 );
vertex_position_3d( output, -0.060686, -2.655718, -3.520478, );
vertex_normal( output, -0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.931334, 0.354073 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.838664, 0.548135 );
vertex_position_3d( output, -0.060686, -2.655718, -3.520478, );
vertex_normal( output, -0.707083, 0.707083, 0.000000, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.931334, 0.354073 );
vertex_position_3d( output, -0.060686, -2.655718, -4.620913, );
vertex_normal( output, -0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.933089, 0.546573 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.850649, 0.330126 );
vertex_position_3d( output, -0.612238, -2.163743, -4.620913, );
vertex_normal( output, 0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.776217, 0.330126 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.776217, 0.255695 );
vertex_position_3d( output, -0.060686, -2.163743, -4.620913, );
vertex_normal( output, -0.577349, -0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.850649, 0.330126 );
vertex_position_3d( output, -0.612238, -2.655718, -4.620913, );
vertex_normal( output, 0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.776217, 0.255695 );
vertex_position_3d( output, -0.060686, -2.655718, -4.620913, );
vertex_normal( output, -0.577349, 0.577349, 0.577349, );
vertex_color( output, c_white, 1 );
vertex_texcoord( output, 0.850649, 0.255695 );
vertex_end( output );
return output;
 
Last edited:

Binsk

Member
Is there... something wrong with those scripts? If you just don't want to have the object definitions in the form of a script then you will have to write your own OBJ importer (or nab one off of the marketplace). GameMaker does not support any common 3D filetypes by default.

If you were to write your own OBJ loader then you would need to read up on the OBJ format, write a parser in GML and have the parsed data converted into the above function calls to create a model in-game.

I have written a mostly working OBJ reader for my 3D engine (previous version of GameMaker, though) and if you want a fully functional parser it is quite the chore. If you only need basic vertex data (without texture importing, group support and whatnot) then it is significantly easier and something you could probably pump out in several hours.

If it seems a bit beyond you then I would look into extensions for GameMaker.
 

MilesThatch

Member
Is there... something wrong with those scripts? If you just don't want to have the object definitions in the form of a script then you will have to write your own OBJ importer (or nab one off of the marketplace). GameMaker does not support any common 3D filetypes by default.

If you were to write your own OBJ loader then you would need to read up on the OBJ format, write a parser in GML and have the parsed data converted into the above function calls to create a model in-game.

I have written a mostly working OBJ reader for my 3D engine (previous version of GameMaker, though) and if you want a fully functional parser it is quite the chore. If you only need basic vertex data (without texture importing, group support and whatnot) then it is significantly easier and something you could probably pump out in several hours.

If it seems a bit beyond you then I would look into extensions for GameMaker.
There's... nothing wrong with those scrips. But it was a new subject that I've never looked at so the whole method of using 3D models was foreign to me. Now that I've looked into how the obj models are stored, the way they can be used in game maker is actually fairly straight forward.

Actually since there was no word, looking into the obj format and making my own converter program is exactly what I'm doing right now. OBJ file structure doesn't look complicated. This is fresh soil for me tho.
 
Last edited:
Top