I am trying to use the GLTF exporter through the blueprint, but I don’t see any result at the moment. I am not sure what should I put into the inputs and I don’t find any documentation
Any idea of what should I use ?
That I want is to export a single object from Datasmith, that I have selected, to a GLTF file with its Metadata
Thank you @UE_FlavienP,
With the changes you told me, I am able to export the whole level in a gltf file.
But, instead of that, that I need is to export a single file with the selected part.
The scene is composed of a building that I imported using Datasmith, so I have a building with its hierarchy of parts.
In my blueprints I have some functionality to walk around the building and select and highlight parts doing Raycast. That’s the way I get the unique part of the building that I want to export.
What we need at the final is to have a gltf with the same hierarchy that we can see in Unreal after importing it using Datasmith. And if this is not possible to do using a single export from the root of the model, (we tried to export in edit time, using the export from the menu, and it didn’t export any hierarchy)
the other approach that we are looking for is exporting all elements individually.
I just noticed that the “SelectedActors” input is to filter and export only the wanted parts. So I think I get it now.
So my main doubt right now is if this exporter can put all the metadata of the object into the gltf file… Or I need to do something manually or some modification in C++
First you need to make sure that on runtime import the hierarchy option is to keep full hierarchy and prevent datastmith to bundle all in one actor ( I think you are already doing that).
Second, correct my method will export full level if you pass an empty Set of selected actors. If you pass only the actors you want in the selected actors Set. Only those should be exported in your glTF file.
By default the glTF export should preserve the hierarchy of elements you are exporting. You should be able to check that if you open the glTF in a DCC such as blender.
You can also create a variable of glTFExportOption and edit its options to your needs and pass it to the “Export to glTF” function.
Hi Flavien. This is good, thank you for your help. I tried to create the export options variable via blueprints but I don’t see any block with that Make function. Is it possible to do with blueprint? or should I use C++ for that?
I’m using UE5. The gltfExportOptions just wants to reference something from the content browser, there are no options to set in the variable. But I can’t figure out how to create that type of asset in the content browser.
Does anyone have a sample of this BP working for any kind of mesh?
Can you, Razivoid, please share with us how you set up the GltfExportOptions ? I can make it as a variable but it will reference a content browser item from where it doesn’t seem to be possible to create such an asset.
You will still need to do the Construct GltfExportOptions on “begin play”/“Event Construct” to initialize the variable. Select “construct object from class” function + Select “gltf export options” in the class variable of your function.
Fill it the way you want. All variables can be found in the options instance