Sandman13sq / DmrVBM-blender-to-gms2

Vertex Buffers from Blender to Game Maker Studio 2
MIT License
28 stars 0 forks source link

.vbm model not appearing in GameMaker - DmrVBM(v1.4) #19

Open xhixzi opened 3 months ago

xhixzi commented 3 months ago

Hello again, I downloaded your most recent version (1.4) and it appears that when I try using it, the .vbm model I have isn't showing up in gamemaker. My model I tried using is simply the default Blender cube, and I added the format with default parameters upon exporting, but it's not appearing. Does the .vbm's format require specific info? (I'm trying to import it using your tutorial project, with the "fpath" name changed, so GML code shouldn't be the issue.)

It also looks like you removed the option to export to a .vb file in this newest version? Since the button isn't there and the VertexBuffer function also seems to be removed from the GML script. Would I have to download the older version if I want to use just .vb files? Thanks

Sandman13sq commented 3 months ago

Exporting meshes without vertex color layers uses the default_value parameter for the color attribute in the vertex format, which initializes at (0,0,0,0). This means that the cube is exporting, but with an alpha of 0. When submitting in GM the mesh is drawing, but since alpha is 0 nothing shows up. Alternatively, you can use gpu_set_blendenable(false); before the submit call to ignore alpha channel completely. forums-defaultvcvalues

I haven't included raw vb files in v1.4 because I wanted to focus on less data management as a whole. Condensing everything down to one file format seemed to be the best way to reach that. Though if you have a use case for raw vb files I'll add it back.