Getting a broken model on import. #9
-
this is how I'm importing the exported vbuffer from that project and i'm trying to draw it like this: matrix_set(matrix_world, matrix_build(room_width/2, room_height/2, 0, 0, 0, 0, 1000, 1000, 1000)); no idea why the result looks so corrupted, in the attached file is my blender project for the object |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The addon had some attribute building errors where normals used the wrong array size and colors would be missing if no vertex color layers were found for a mesh. This has been fixed in the latest commit. Your format defined in the Blender file you sent uses color floats. If this is intended, the color attribute will differ GM and will show a stride error when not set correctly.
You can change the format either in GM or Blender to match the other. I suggest |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for the quick response! And also thanks for the tip on the color usage, I had noticed I had it wrong in my testing. Awesome work man! |
Beta Was this translation helpful? Give feedback.
The addon had some attribute building errors where normals used the wrong array size and colors would be missing if no vertex color layers were found for a mesh. This has been fixed in the latest commit.
Your format defined in the Blender file you sent uses color floats. If this is intended, the color attribute will differ GM and will show a stride error when not set correctly.
vertex_format_add_color()
is native GM, but will give a stride error with your current vb format:vertex_format_add_custom(vertex_type_float4, vertex_usage_color)
matches what you have defined in your Blender file:You can change the format either in GM or Blender to match the other. I suggest
Color Bytes
since i…