Maintain Location and Pivot when Importing

Hi!

tl;dr: How to import a model with many meshes so that each have their own pivot at the center of the mesh?

I am trying to figure how I could import a model from Blender while maintaining each objects location while having their own pivot. I would need to achieve this in order to have a system, where I can import a top down Blender map model where the objects would be replaced in Unreal through automatized script with different models. There are hundreds of objects so I cannot start to place them manually. This would require that the model retains the pivot for each object AND that they would be in their correct locations when imported. These two requirements however seem to be impossible to achieve:

In order to import model with several meshes, each having own pivot, I import a model with ‘Bake Pivot in Vertex’ enabled. However, this makes all the models lose their relation to one another, so when the objects are added to level, they are all dropped on the same location.

I am asking is there any way to import a mesh from Blender, where each mesh would have its own pivot but they can all be dropped on the level without loosing their location to one another. One way to sort this would be to differentiate location between location of the pivot and the actual location of the mesh model but UE does not seem to have any way of doing this (get locations always return the location of the pivot).

Only solution I can think is to export the location data of each separate object and then somehow add them to the level via script but I would like to ask if there is another way.

2 Likes

So you want the pivots at the center of each object but you also want the offset you set in your modelling program to be maintained?

Precisely, thanks for wording it perfectly.

Bumping this thread, anyone got any ideas?
I was thinking about getting the 3D location of each object and then somehow setting the new pivot in blueprint to that?

Hi. If I recall correctly, in the end I found it impossible to do this with blueprint. I think I bought a pivot tool from marketplace with what I think I managed to sort the issue but it was and likely is not possible to automate this process in any way with blueprints.

Theo, you made my day :slight_smile: thanks

Which pivot tool did your use from the marketplace TheoT? I have a similar issue I am trying to solve where I have a scene with hundreds of assets and I need to have each object origin maintained, but the location, rotation, and scale maintained as well.

Sorry, I’m sure its of no use any more but it was called Pivot Tool