Is there a way to rebuild levels built in UDK in UE4 by cutting and pasting meshes? I have done this with other versions of Epics engines, but it doesn’t work in UE4. Going from UT2004 to UDK worked perfect, you copied in UT2004, hit paste in UDK, then in the mesh properties you selected the mesh you wanted to use, and the meshes were place just as in UT2004.
The copy/paste information is a bit different in UE4, if you had some way of making a script in UDK you could reformat it, but otherwise it won’t work.
The only way how you can import UDK meshes or other assets into the UE4 , is to export the UDK assets as a fbx/obj, png/tga,… and after that just import them.
You can compare the unreal text formats in notepad between the two engines, and then use Notepad ++ for example to do an intelligent search and replace on it to convert the unreal text to UE4 standard.
I successfully got this to work, but it only works for meshes (did not set up anything else), and it does require you to manually assign and import the actual models into the content browser.
Following are the notepad ++ search and replace steps to take for this to work:
begin actor.*?location
replace with
End Object 888888888 StaticMeshComponent=StaticMeshComponent0 888888888 Components(0)=StaticMeshComponent0 888888888 RootComponent=StaticMeshComponent0 888888888 ActorLabel=“AutoMovedMesh” 888888888 End Actor 888888888
Tag.*?=
with
End Object 888888888 StaticMeshComponent=StaticMeshComponent0 888888888 Components(0)=StaticMeshComponent 888888888 RootComponent=StaticMeshComponent0 888888888 ActorLabel
CollisionComponent.*?end actor
with
an empty space
DrawScale3D
with
RelativeScale3D
And then you might get somewhere. Not the easiest and best thing to do…
Does that actually work Hourences? :eek: cause the formats seem to have many differences.
Also isn’t the scale different in UE4? doesn’t that mean mean that you would have to also modify the coordinates accordingly? or they translate across properly?
At the very least you would have to change other things such as package names & paths that’s for sure.
Format example (I just drag & dropped a random asset then copy/pasted to notepad).
UDK
Begin Map
Begin Level
Begin Actor Class=StaticMeshActor Name=StaticMeshActor_0 Archetype=StaticMeshActor'Engine.Default__StaticMeshActor'
Begin Object Class=StaticMeshComponent Name=StaticMeshComponent0 ObjName=StaticMeshComponent_2 Archetype=StaticMeshComponent'Engine.Default__StaticMeshActor:StaticMeshComponent0'
StaticMesh=StaticMesh'PhysTest_Resources.RemadePhysBarrel'
ReplacementPrimitive=None
bAllowApproximateOcclusion=True
bForceDirectLightMap=True
bUsePrecomputedShadows=True
LightingChannels=(bInitialized=True,Static=True)
Name="StaticMeshComponent_2"
ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshActor:StaticMeshComponent0'
End Object
StaticMeshComponent=StaticMeshComponent'StaticMeshComponent_2'
Components(0)=StaticMeshComponent'StaticMeshComponent_2'
Location=(X=-160.000000,Y=-464.000000,Z=0.000000)
CreationTime=25.259260
Tag="StaticMeshActor"
CollisionComponent=StaticMeshComponent'StaticMeshComponent_2'
Name="StaticMeshActor_0"
ObjectArchetype=StaticMeshActor'Engine.Default__StaticMeshActor'
End Actor
End Level
Begin Surface
End Surface
End Map
UE4
Begin Map
Begin Level
Begin Actor Class=StaticMeshActor Name=MaterialSphere_4 Archetype=StaticMeshActor'/Script/Engine.Default__StaticMeshActor'
Begin Object Class=StaticMeshComponent Name=StaticMeshComponent0 ObjName=StaticMeshComponent0 Archetype=StaticMeshComponent'/Script/Engine.Default__StaticMeshActor:StaticMeshComponent0'
End Object
Begin Object Name=StaticMeshComponent0
StaticMesh=StaticMesh'/Game/Props/MaterialSphere.MaterialSphere'
StaticMeshDerivedDataKey="STATICMESH_34081786561B425A9523C94540EA599D_359a029847e84730ba516769d0f19427_8DD9E36847F52D3AC7A70C8A8FBAB191000000000100000001000000000000000000803F0000803F00000000000000000000344203030300000000"
RelativeLocation=(X=-555.000000,Y=-1267.000000,Z=256.999207)
End Object
StaticMeshComponent=StaticMeshComponent0
RootComponent=StaticMeshComponent0
ActorLabel="MaterialSphere"
End Actor
End Level
Begin Surface
End Surface
End Map
Notice that StaticMeshDerivedDataKey ? what is that? lol
Yes it works. I did this for a client to convert their project. It is not clean though. You must indeed manually reassign the models. So what I did was before export in UDK I would tag everything with the names of the models assigned to the mesh actors, and then I would make that tag become the label in UE4, and then I’d manually look at the label -> reassign correct mesh, look at next group of meshes sharing a label -> reassign mesh, etc.
Again this is not ideal. But if you truly truly must have it ported, it can be done yes.
Scale would be identical. There is no way around that.
Not all properties are essential by the way. You can just drop or generate some of it like DerivedDataKey. Note how I name all components the same also. It will fix that by itself upon import.