Advertisement

Best way to export project from UE4 to unity

Started by June 09, 2018 04:13 PM
9 comments, last by davejones 6 years, 6 months ago

I have seen a number of posts about this topic but was wondering what the most effective way is. I have been working on a project in unreal engine 4 and am struggling to get virtual reality mode to work in the engine. A route I am pursuing to solve the problem is to use the unity game engine. I have a virtual reality template set up in unity and need to export the project from unreal engine 4 into unity. Whats the best way to export the project from UE4 and than import into unity?  

20 minutes ago, davejones said:

am struggling to get virtual reality mode to work in the engine.

Did you download all the samples? Unreal has a VR and AR sample that has everything ready to go, it's automatic.

UnrealARandVR.jpg.aa4526005c22536927303a742ede8c2b.jpg

If you don't have the samples, most of Unreal's VR and AR just needs you to turn on the addon with your device plugged in and it works. VR and AR share a lot of stuff so grab both while you at it.

28 minutes ago, davejones said:

A route I am pursuing to solve the problem is to use the unity game engine.

Unreal allows you to export all content if you don't have the source files anymore.

You will export your meshes as FBX and import into Unity. C++ and C# is similar so some code you can paste but will need to translate to C#. Unreal's Blueprints is just classes so in Unity make Mono classes for them and translate. Use components to fill gaps.

For materials if you have Substance you can just use it to change the material so it works better with Unity. Unity's BPR isn't as good as unreals and is still more like the old shaders. Without Substance you will need to mod the textures to get them looking right.

 

There is no direct way to transfer from Unreal to Unity. The easiest is to build everything over using the source assets. These engines were never designed to work with each other.

Advertisement
1 hour ago, Scouting Ninja said:

Did you download all the samples? Unreal has a VR and AR sample that has everything ready to go, it's automatic.

UnrealARandVR.jpg.aa4526005c22536927303a742ede8c2b.jpg

If you don't have the samples, most of Unreal's VR and AR just needs you to turn on the addon with your device plugged in and it works. VR and AR share a lot of stuff so grab both while you at it.

Unreal allows you to export all content if you don't have the source files anymore.

You will export your meshes as FBX and import into Unity. C++ and C# is similar so some code you can paste but will need to translate to C#. Unreal's Blueprints is just classes so in Unity make Mono classes for them and translate. Use components to fill gaps.

For materials if you have Substance you can just use it to change the material so it works better with Unity. Unity's BPR isn't as good as unreals and is still more like the old shaders. Without Substance you will need to mod the textures to get them looking right.

 

There is no direct way to transfer from Unreal to Unity. The easiest is to build everything over using the source assets. These engines were never designed to work with each other.

Thanks for your response. I will look at exporting the 3d assets as fbx files. The thing is I am looking to see if there is a way to export the 3d models placed in the world as actors. I can export the 3d models from the content browser but I would have to spend much time getting them to be aligned with each other in unity.  

4 minutes ago, davejones said:

The thing is I am looking to see if there is a way to export the 3d models placed in the world as actors.

If you know how to make your own exporter or if you make a script that saves all the positions and rotations to a text, you could read that in Unity and create instances at that point.

Another option is to use Unreal's new mesh merge option, then export the resulting mesh. The problem with this is you will have one solid mesh. If you merged only parts that are related and shared materials, Unity would actually like that, it is similar to how it's batch works.

Ok thanks for your response. I will keep this forum updated on the progress I am making. So far I have exported the 3d assets as fbx files into unity. 

When I imported the solids into unity they were in the correct position relative to one another. I just encountered a problem with one 3D model. In UE4 the 3d model had multiple materials but when I imported it into unity it only had one material.  

Advertisement
3 hours ago, davejones said:

In UE4 the 3d model had multiple materials but when I imported it into unity it only had one material.

In Unity you need submeshes, In Unreal also , so you need to export with the materials still on, so that the exporter makes submeshes.

It's very simple, a single mesh with more than one material gets split into more meshes. This is why texture mapping and atlasing exist, to reduce the amount of meshes and drawcalls.

1 hour ago, Scouting Ninja said:

In Unity you need submeshes, In Unreal also , so you need to export with the materials still on, so that the exporter makes submeshes.

It's very simple, a single mesh with more than one material gets split into more meshes. This is why texture mapping and atlasing exist, to reduce the amount of meshes and drawcalls.

Atlasing is something I've never heard of but at some point I will do my research into it. 

At this point I am trying to get the positioning of the google daydream VR camera correct. I have watched a few tutorials online but I cant seem to get it right. So effectively when I place the main camera in the desired position and play in VR mode through my phone, the phone camera renders a part of the scene that I don't want to see.

I place the cube in front of the camera so that when I play in VR mode the cube should be in front of me. What actually happens is the cube is a wrong distance away or angled. 

Looks like scaling the scene to match the size of the google daydream made a difference. I was scaling down the size of the controller when I should have scaled the size of the 3d models in the scene. 

This topic is closed to new replies.

Advertisement