Turning an in-game model into a mesh for rendertargets
🖼️ Rendering•Updated 2 days ago•0 views
Use mesh.getModelMeshes() to extract MeshVertex data, but mesh.createFromTable needs the 'triangles' subtable (not 'vertices') and you must clear the 'weights' …
How to render a mesh of an in-game model inside a rendertarget
Use mesh.getModelMeshes() to extract MeshVertex data, but mesh.createFromTable needs the 'triangles' subtable (not 'vertices') and you must clear the 'weights' keys since it doesn't handle unknown fields. See the model-meshes.lua example on codeberg.