I am using GLTF exporter plugin to runtime export my CAD geometry scene which I am importing at runtime using Datasmith. The problem I am facing is that exports are very big in size compared to the imports I made into the scene. I understand that is maybe because of lights, materials etc. The thing is I don’t want any of them. I just want the geometry data to be converted to GLTF I don’t care about materials, textures, lights. Please let me know if that’s possible.
PS: Datasmith at runtime doesn’t allow us to import only geometry excluding lights, materials/textures unlike Datasmith in editor. If it had allowed my problem would be solved.
I will note in the backlog the option to import only some of the elements at runtime.
I would first check what is taking a lot of space in your gltf export:
mesh size (number of trianles)
number of textures
resolution of textures.
Then you can play on those different parameters:
I would deactivate baking all together, and if you still want baking put it ridiculously low: 1x1
Lights and animation are not what would take most disk space but you can deactivate them too
for the mesh it is trickier as you import at runtime you do not have lods. In that case you should reduce number of triangles that you get on import using the tessellation settings.
I have found out that my high triangle count (ranges from 30 million-60 million) is responsible for the increased size in GLTF. But the problem is I am not able to reduce triangle count while importing (Do tessellation options doesn’t apply for .UDATASMITH files? Sorry I mentioned CAD file before but it’s actually a .udatasmith file) This is my blueprint for datasmith runtime import.
Whatever tessellation values I provide in Datasmith tessellation options the triangle count don’t change at all (I’ve provided ridiculous higher values too).
Also, I’ve been playing around with GLTF export options and they don’t cause any change at all. Here’s my blueprint of export options.
Any other options, I honestly can only think that huge triangle count is responsible for huge size but can’t wrap my head around on how to reduce it’s count.