Exporting and Importing Using Script (Plugin Scripting) - Scripting Help / Developer Discussion

Hi, is there any way I am able to code a script that will export a model into a path on my computer and wait until it’s finished exporting then import it back in again and set the render fidelity to performance? (I have a model with a bunch of parts and making it a mesh will up the performance and practically optimise the model) I’ll save it as a local plugin if that helps explain why I want to do this.
Cheers,

1 Like

You can export models as meshes by right clicking the model in the Explorer and clicking “Export Selection”, you can then import them back in with Roblox’s Asset Manager tool.

But there’s a few misconceptions here, exporting your models and reimporting them as unedited meshes wont give you a boost in performance, and it just may not be the most optimal thing to do. When it comes to meshes triangle count is a large part of what dictates graphical performance, and the model you are exporting as parts will contain the same amount of triangles as when you reimport it as a mesh. It actually may contain even more as im not sure if backface culling works exactly the same with meshes as it does with parts.

1 Like

I know I can export meshes manually that way but would like to do all that automatically. Also I’m pretty sure meshes shadows are different from part shadows and if I set the model to performance mode and go far away from the model, the model’s LOD with switch to a lower res or once with less triangles (which is what I want) Thanks for the reply though.

There is a property for models called LevelOfDetail that will do exactly what your asking for. Just set it to “StreamingMesh”

I’m not sure about the shadow part though, I wouldn’t see a reason for meshes to have their shadows handled different from parts, but then again I dont know.

Neither but I noticed it in a game I was making.
Also StreamingMesh depends on lag (kinda), for example, if your moving along the road which is set to streamingMesh in a fast car and the streaming mesh hasn’t transformed into the mesh yet then the player and car will go through the floor. Also I don’t think streaming mesh is live, only when the player first joins.