timetocode Posted November 5, 2018 Share Posted November 5, 2018 Having some texture inconsistencies with *.obj from MagicaVoxel. Original: Texture problem (in browser). The problem is the magenta roof's color is bleeding into the light blue walls. and making weird triangles. Imported from MagicaVoxel to Blender just to test a render: Any idea what the problem might be, or how to test further? I made a few other meshes and had the same problem, somewhere on there one of the colors starts to do some weird blendy thing with its neighboring voxels, but most of of the model maintains crisp edges. Quote Link to comment Share on other sites More sharing options...
timetocode Posted November 5, 2018 Author Share Posted November 5, 2018 Nevermind! This turned out to be one of those things fixed with BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true Now the lines are clean. Also if anyone happens to be playing with magicavoxel, I found out a few more things. For everything to line up perfectly, the mesh needs to be moved by half its size and flipped on the z axis. I mean it looks fine as a mesh by default when imported, but if you want the coordinates from magicavoxel to line up with coordinates in babylon space such that 0,0,0 in babylon is 0,0,0 in voxels, then the offsetting + flipping needs to occur. Then it becomes possible to do voxel collisions instead of mesh collisions, which is what I'm working on next. GameMonetize and brianzinn 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 5, 2018 Share Posted November 5, 2018 Well done!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.