Search Unity

Unity --> UE4 scene export.

Discussion in 'Works In Progress' started by neginfinity, Mar 18, 2016.

  1. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    update 2019/04/24:

    Project exodus is a unity to unreal conversion tool originally developed a few years ago.

    Demo:



    The project is currently available at github, under permissive bsd license and free of charge. There's no catch.

    https://github.com/NegInfinity/ProjectExodus

    There are limitations, of course and it is still work in progress.

    Information from project page:

    There are installation videos:

    Unity side installation:



    Unreal side installation:


    To report problems, feel free to open issues on github.

    Have fun.

    update 2019/04/02:

    Hello there, and long time no see.

    This is not april fools, but the tool has been updated and is currently available at github under BSD license and for no charge.



    https://github.com/NegInfinity/ProjectExodus

    Have fun.
    ------------
    Original message from March 16, 2016:


    I wrote a tool for converting unity engine scene to unreal 4 scene.
    It imports materials, meshes, etc.

    Video:




    The tool is not currently available anywhere, I'm contemplating selling that on either asset store if there's some interest...

    The clip is 30 minutes long, so feel free to skip ahead. Texture importing took forever while I was capturing the video.

    -----

    The tool has been released for free, it is experimental, unsupported and was last tested against Unreal 4.12.5.

    It is available here.
     
    Last edited: Apr 24, 2019
    DevMember and mk1978 like this.
  2. Tortyfoo

    Tortyfoo

    Joined:
    Mar 6, 2012
    Posts:
    130
    Are there any limitations?

    Not yet watched video so maybe this explains but a few bullet points about the process, any assumptions/options/limitations/etc. would help.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    I'd advise to check the video. Just skip ahead when something takes too long in it.

    There are always limitations.

    • Terrain currently is not being processed. I might look at this eventually.
    • Export is one way at the moment. Unity -> UE4. You can' transfer files back right now.
    • Skinned meshes are not converted. I might look into this, but this was intended as a level transfer tool, not a character transfer tool.
    • Particle systems are not converted, and that one most likely is not fixable, becasue unity particles are a black box.
    • There are differences in lighting systems between engines, so even after export result won't be identically lit. You can see it at the end of the video. UE4 lights have slightly different shape/attenuation, and emissive light from static objects doesn't bounce. Converted scene will have identical materials, though, and meshes with emissive materials will have "use emissive for light" flag set.
    • UE4 doesn't import tiff files. This one needs to be handled by you at the moment, might be fixed later.
    • Exporter gathers material parameters from unity standard shader or from compatible shader (meaning same parameters). So, if you write completely custom vertex/fragment shader pair with completely custom parameters , that won't get transferred properly.
    • Some texture maps are not currently being processsed, but this one is easily ffixable. Currently material converts albedo color, albedo texture, emissive color, emissive texture, normalmap, occlusion, it also connects specular alpha channel (smoothness for specular setup shaders and maps it properly to roughness. Specular color is also used (both color and texture) when available. Adding support for the rest of unity textures should be fairly easy.
    Aside from that, you'll get meshes at the same locations, with same names, they'll be organized into folders, and you'll have corresponding assets from unity imported and properly converted into UE4. That means reconstructing materials, rotating meshes properly, etc.

    Pretty much, select what you want to export in unity, export it, go to unreal, import, and go for a cup of coffee/tea while engine imports textures.
     
    Last edited: Mar 19, 2016
  4. Tortyfoo

    Tortyfoo

    Joined:
    Mar 6, 2012
    Posts:
    130
    Thanks for those extra details, definitely helps. I'll watch the video later. I'd potentially be interested in a tool like this. Terrain would definitely be a huge plus if somehow could be achieved.
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    IIRC there were some tools that could read terrain data in unity, so terrain conversion *might* be possible.
    I just never needed to work with terrain, so I haven't looked deeply into that, and can't be sure if conversion is viable/doable.
     
  6. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    690
    @neginfinity - If you could convert standard unity terrain to an Unreal Terrain and retain the details of said terrain.

    Either way - HYPE!
     
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Original video silently got deleted by youtube due to "failed processing" error. Thanks, youtube.

    Video reuploaded.

    Moral of the story: never upload avi to youtube, remux to mp4.
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,583
    That would be very interesting, does it also port scripts ?
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    No, porting scripts would be either very difficult or impossible, due to vast differences in engine APIs.
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,583
    Thanks
     
  11. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi, when would this be available to try/buy? Even at this early stage, I'd like to try it:)

    Is your tool using serialisation to save into a binary/json file?
     
  12. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    My apologies for the late reply.
    I'll be looking into putting this onto either Unreal or Unity asset store (or both) next week. I'll see how it goes from there.
     
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    Can't use the Unity scene in the unreal marketplace can you? Don't know, you'll have to make sure of the legal small print in using the dr charles level thing.
     
  14. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi, not sure why this should be a legal issue, you're allowed to import/export other objects/data. How do you see this being a legal issue? Maybe I don't understand it, would like to know more about the specifics.

    Me personally I am staying with Unity as I love the tool, but would like to see how things compare in Unreal.I think a exporter tool would be a very useful thing to have.
     
  15. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    I'm not planning to repackage someone else's unity content for unreal marketplace, if that's what you meant.

    As far as I can tell, using unity assets in UE4 project is allowed (see asset store EULA - it doesn't specify engine), plus there's absolutely no issue if people run the plugin on scenes they made themselves from scratch.

    You can get the rough idea by looking at the end of the video. The biggest difference is that UE4 processes emissive light from materials very differently - it doesn't bounce. On the other hand reflection tech in UE4 is better than unity stock reflections.
     
  16. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    206
    Unreal Terrain to Unity would be awesome, Unity looks terrible compared to Unreal terrains.
     
  17. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    But this is not only terrains, it is all the vegetation etc that might make a difference, the terrain object itself I think is the same.
     
  18. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    Gaia makes pretty good "terrains" for Unity, have you seen some of the results from that?
     
  19. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    I've released the tool for free, by the way. It is available in my signature, last tested against Unreal 4.12.5 and is completely unsupported.
    "No warrranty of any kind", as they say:

    Link.
     
  20. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    Hi, I tried the link but cannot see where to download the file, is this a unity asset file? Apologies if I do not understand this.
     
  21. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Links lead to patreon which leads to bitbucket repository which should be public as far as I know. Also, there should be a visible readme in each repository.
     
  22. Jimbo10

    Jimbo10

    Joined:
    May 8, 2016
    Posts:
    6
    Its a great conversion project, but as you and others have drawn attention to the legal aspects.
    Its one year on but trying to get some legal agreement seems unlikely

    There isn't any [Contributor License Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for Unity or Epic or the Unreal Engine.

    Recent changes to EULA by Epic in Legal terms seem to forbid any use of Public Domain software in Epic Products.

    Microsoft has agreed to Epic demands that *any* contributions become Copyright of Epic.
    Therefore it is unlikely that any content for Unity Asset store or from Unity Samples would be accepted.

    Microsoft demands that their Contributor License Agreement is signed by anyone contributing code agrees that the content is unique and comes from a verified source.

    The legal ramifications are huge but as a matter of etiquette, mentioning Unity in an Unreal conference gets you really "bad Karma", trust me, see my scars!

    An Independent developer with a foot in all three groups, but not employed by any of them, these are my thoughts on what has been agreed
     
    Last edited: Jun 23, 2017
  23. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Lemme check the eula. As far as I'm aware unreal eula only forbade use of viral opensource code (for obvious reason).

    This plugin is not viral-licensed.

    Also, nobody said anything about contributing content to unreal asset store. You use it in your own project. Unity asset store eula allows use of content in different engines.

    --edit--
    Well, alright. From unreal EULA:

    The project is under zlib license, which does not fall under "non-compatbile licenses" category.

    If you were talking about this section:
    Then I haven't submitted anything to epic games. So as far as I can tell, there's no new problem with unreal EULA.

    Besides, restricting people form using 3rd party tools would've been suicide for unreal engine.
     
    Last edited: Jun 23, 2017
  24. jfran227

    jfran227

    Joined:
    Dec 29, 2017
    Posts:
    14

    Can it transfer particle effects yet?
     
  25. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    No. Only geometry and lights. Didn't bother with particles due to differences.
     
  26. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    37
    So, as the links are dead, and the talk is over - I guess the project is dead ? Why ? Any chance of continuation ? I would really appreciate and even pay for such a tool ..
     
  27. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    Maybe you should make a Unreal to Unity exporter... now that Unity has the very fast job system / burst compiler.
     
  28. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    The project is not currently publicly available.

    My advice would be to check the thread again during first half of january.
     
  29. unity_MNhE_0x7-hmb9Q

    unity_MNhE_0x7-hmb9Q

    Joined:
    Nov 19, 2018
    Posts:
    2
    Можно купить этот плагин?
     
  30. unity_MNhE_0x7-hmb9Q

    unity_MNhE_0x7-hmb9Q

    Joined:
    Nov 19, 2018
    Posts:
    2
    Can I buy this plugin?
     
  31. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Is there a way to export terrain to Unreal?
     
  32. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    I would export just the heightmap and splatmap textures, then work from there. Accessing these are covered by tuts online / unity docs. This is the highest resolution method you can use, although you may need to resize the textures to power of 2, as Unity adds a pixel border along x and y.
     
    elettrozero likes this.
  33. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Hello there, and long time no see.

    This is not april fools, but the tool has been updated and is currently available at github under BSD license and for no charge.



    https://github.com/NegInfinity/ProjectExodus

    Have fun.
     
  34. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    If anyone knows better place to post this, or a good subforum to start a new thread for the tool, I'm all ears.

    Also, feedback is accepted, and the plugin is still being developed.
     
    PicturesInDark likes this.
  35. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Thank you very much. I just was migrating from Unity to Unreal and I was searching info about how to migrate characters. I found your plugin, I hope it will be very usefull to me. Continue with this works. Regards!
     
  36. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Sorry, An absolut dissaster: In Unity 5.6.4 f1:

    Assets/ExodusExport/Scripts/Editor/Exporter/JsonKeyframe.cs(9,25): error CS0246: The type or namespace name `WeightedMode' could not be found. Are you missing an assembly reference?

    In Unreal 4.12.5:
    upload_2019-5-1_18-52-23.png
     
    Last edited: May 1, 2019
  37. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    I was thinking about this some more, why would anyone want to go from Unity to UE4? What are the advantages?
     
    ArachnidAnimal likes this.
  38. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    @khos , Unity is very limited, believe me. When you try to make a great project, Unity cannot ..... performance problems, editor constantly drops .... etc ...
    By example, if you have a scene with a lot of vegetation Unity has pikes of performance.
    No matter if you buy assets to solve that problems, the assets doesn't work well ...
    Another example, the pixelation of terrain. In Unity you have to buy assets, in Unreal not, it works well, the same quality of terrains as the professional videogames.
    Unreal haven't that problems. Unreal is far superior. If you want to make a good videogame, you need to pass to Unreal.
    I have been working with Unity for 7 years, and I tried to not have to pass to Unreal, I didn't want to pass to C++, less complete marketplace, ...etc ... but it is an error.
     
    Last edited: May 2, 2019
  39. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    The export module works well in Unity 2018.3

    However, the import module doens't work work well not Unreal 4.12.5 not 4.20.3

    It says you have to compile the plugin manually. If I try to compile manually:
    [1/3] Module.ExodusImport.cpp
    \plugins\exodusimport\source\exodusimport\private\JsonObjects/JsonGameObject.h(178): error C2653: 'EComponentMobility': is not a class or namespace name
    \plugins\exodusimport\source\exodusimport\private\JsonObjects/JsonGameObject.h(178): error C3646: 'getUnrealMobility': unknown override specifier
    \plugins\exodusimport\source\exodusimport\private\JsonObjects/JsonGameObject.h(178): error C2059: syntax error: '('
    \plugins\exodusimport\source\exodusimport\private\JsonObjects/JsonGameObject.h(178): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    \plugins\exodusimport\source\exodusimport\private\AnimationBuilder.h(7): error C2061: syntax error: identifier 'UAnimSequence'
    \Plugins\ExodusImport\Source\ExodusImport\Public\JsonImport.h(11): error C2011: 'FJsonImportModule': 'class' type redefinition
    \UE_4.20\Engine\Source\ExodusImport\Public\JsonImport.h(11): note: see declaration of 'FJsonImportModule'
    \Plugins\ExodusImport\Source\ExodusImport\Private\AnimationBuilder.cpp(17): error C2511: 'void AnimationBuilder::buildAnimation(UAnimSequence *,USkeleton *,const JsonAnimationClip &)': overloaded member function not found in 'AnimationBuilder'
    \plugins\exodusimport\source\exodusimport\private\AnimationBuilder.h(5): note: see declaration of 'AnimationBuilder'
    \Plugins\ExodusImport\Source\ExodusImport\Private\JsonGameObjectRegistry.cpp(67): warning C4458: declaration of 'objects' hides class member
    \Plugins\ExodusImport\Source\ExodusImport\Private\JsonGameObjectRegistry.h(11): note: see declaration of 'JsonGameObjectRegistry::eek:bjects'
    \ue_4.20\engine\source\runtime\slate\public\Widgets/Input/SSearchBox.h(15): warning C4005: 'LOCTEXT_NAMESPACE': macro redefinition
    \Plugins\ExodusImport\Source\ExodusImport\Private\builders\JointBuilder.cpp(10): note: see previous definition of 'LOCTEXT_NAMESPACE'
    \Plugins\ExodusImport\Source\ExodusImport\Private\JsonImport.cpp(55): error C2027: use of undefined type 'FJsonImportModule'
    \UE_4.20\Engine\Source\ExodusImport\Public\JsonImport.h(11): note: see declaration of 'FJsonImportModule'
    ...............................
    ..............................

    ERROR: UBT ERROR: Failed to produce item: \Plugins\ExodusImport\Binaries\Win64\UE4Editor-ExodusImport.dll
     
    Last edited: May 2, 2019
  40. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    The plugin requires Unity 2018.3 and Unreal 4.21.2 at the moment. Update to 4.22 is WIP.

    It is not possible to backport it to support every unity version due to changes in 2018.3.

    Please reports problems/request to github.

    The plugin will be actively updated/supported at least till the end of the year.

    There should be terrain support and I have blueprint reconstruction planned, but it was delayed due to IRL issues.

    C++ API and source code access.
     
    PicturesInDark likes this.
  41. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Currently supported Unreal version is 4.21.2, which is a bit behind latest release. Please try 4.21.2 and see if it works for you.

     
    PicturesInDark likes this.
  42. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Thank you very much. Please, put it somewhere, I have tried some versions ....
    Now the plug in compiles ...
    Great work!
     
    Last edited: May 3, 2019
  43. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    37
    the Plugin works A+++. Thank you so so much. This saves so much time and hassle. Now I can easily use all that Assets that I bought when before I came to Unreal Engine. Thank you sir.
     
  44. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    I thought that there are licenses for each engine, you might want to double check if you are legally allowed to use unity assets in unreal..also the unreal agreement.. just to be on the safe side.
     
  45. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Do keep in mind that it is work in progress. There are other features planned - for example I want to properly convert prefabs to blueprints.

    Unity asset store content typically allows use of content in production of interactive media. So as long as you aren't publishing the modified result, you can use it in unreal engine as well.

    However, if you're in doubt, you should consult a lawyer, and additionally this only applies to standard asset store license.

    There are non-standard licenses on some assets now and then, you have to watch out for those, as they may impose additional restrictions.

    https://unity3d.com/legal/as_terms (see part 1.3)
     
  46. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    836
    "consult a lawyer" Ok, I imagine that will be cheap :)