|Topic was automatically imported from the old Question2Answer platform.
I’ve started using Magicavoxel to create meshes for my first Godot 3D project and am trying to nail down a workflow. I tried installing the Magicavoxel import extension to import .vox files directly, but noticed it was changing the size of my meshes so I’ve reverted to exporting the files to .obj and having Godot import those instead.
I’m wondering about the potential impact on performance when scaling large meshes. I might make a tile, like a grass/dirt tile or floor of a building, that is 100x100x100 in Magicavoxel. Having more voxels to work with means higher detailed results. The problem is that 1 voxel = 1 unit(meter) in Godot, so the imported meshes are gigantic. I’ve been playing around with different sized models and noticed that a 100x100x100 mesh takes much longer to import than a 10x10x10. Would using scaled meshes cause any performance issues at runtime? Just to be clear, I’m talking about meshes scaled in the editor, not dynamically via scripting. I’d like to have a couple thousand on screen at once, and be able to add/remove them. For example, the player constructing a building. Would it be a better idea to import the voxel mesh into something like Blender, scale it to the correct size there, and import the result to Godot?
I’ve also seen some inconsistent behavior with scaling. Some objects, when imported and scaled, align perfectly with the unit size in Godot. For example, this frame is 40x40x72 voxels. The feet on the edges are right along the bounds of the mesh in Magicavoxel, and align perfectly with the Godot grid:
I’ve noticed while trying to create floor tiles of any size, the cube ends up being offset by .5 on the X and Z axes. The example image is a 1x1x1 cube, but I’ve noticed the same issue with scaled 40x40x40 and 100x100x100 cubes:
Ideally the tiles would align perfectly with the grid so I wouldn’t have to think about managing the offset, but unless I can change the pivot to be in the corner, I might need to rethink that.
Any help would be appreciated! Thanks