1danielcoelho / 1danielcoelho.github.io

My personal page and blog. Check the about.md page for more details.
https://1danielcoelho.github.io/
MIT License
3 stars 0 forks source link

downgrade-unreal-asset/ #3

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

How to downgrade Unreal Engine assets · Daniel Coelho's Blog

How to move an asset from a newer UnrealEngine version to an older one

https://1danielcoelho.github.io/downgrade-unreal-asset/

Kemerd commented 2 years ago

Interesting!

luneyq commented 2 years ago

hi, I want to degrade from UE5 to UE4.27, what the "updated_values" should i set?

luneyq commented 2 years ago

and also are these values the correct ones? i cannot find "engine_changelist" in code, just copied from the menu "Help-->About Unreal" window, is this correct?

update_engine_version = True engine_major_version = 4 engine_minor_version = 27 engine_changelist = 17735300 asset_major_version = 5 asset_minor_version = 0 asset_changelist = 16682836

1danielcoelho commented 2 years ago

and also are these values the correct ones? i cannot find "engine_changelist" in code, just copied from the menu "Help-->About Unreal" window, is this correct?

update_engine_version = True engine_major_version = 4 engine_minor_version = 27 engine_changelist = 17735300 asset_major_version = 5 asset_minor_version = 0 asset_changelist = 16682836

Those values seem right to me, although downgrading from UE5 to UE4 seems very prone to failure... This method works by assuming that the assets' serialized representation hasn't changed all that much between the two versions, but there were major changes between UE5 and UE4, so just pretending the version/guid versions are different likely won't work very well.

Murazaki commented 2 years ago

Tried this on some imported assets and a level, with the exact same configuration (4.27 to 4.26.2) and it did not work as expected unfortunately. The editor does not give any errors per se but any asset is unable to be loaded or opened by the editor. Leaving this as an FYI and for my own future usage.

1danielcoelho commented 2 years ago

Tried this on some imported assets and a level, with the exact same configuration (4.27 to 4.26.2) and it did not work as expected unfortunately. The editor does not give any errors per se but any asset is unable to be loaded or opened by the editor. Leaving this as an FYI and for my own future usage.

What types of assets did it fail to work with? Whenever I have some extra time I could have a look to see if there's anything I can improve on the script, maybe it's an easy tweak

Murazaki commented 2 years ago

What types of assets did it fail to work with? Whenever I have some extra time I could have a look to see if there's anything I can improve on the script, maybe it's an easy tweak

This was on a fairly simple third person project, with simple levels (+ one case of level streaming but simple already fails) and some meshes and materials. Any imported element tries to load for a microsecond and eventually fails. No log in the editor though, if you have information on where to find more details please let me know.

1danielcoelho commented 2 years ago

This was on a fairly simple third person project, with simple levels (+ one case of level streaming but simple already fails) and some meshes and materials. Any imported element tries to load for a microsecond and eventually fails. No log in the editor though, if you have information on where to find more details please let me know.

I've just tried this again and it seems to work fine for moving from 4.27.2 to 4.26.2, for a level, static mesh and a material asset. Here are the relevant values for the script:

updated_values = {
    "Dev-Rendering": 44,
    "Dev-Physics-Ext": 40,
    "FortniteMain": 43,
    "Release": 38,
}
target_folder = r"E:\Work\Unreal projects\Retail4262\Content"
asset_types = ["uasset", "umap"]

update_engine_version = True
engine_major_version = 4
engine_minor_version = 26
engine_changelist = 15973114
asset_major_version = 4
asset_minor_version = 27
asset_changelist = 17155196

I've used Python 3.7.9. Make sure the engine is closed when you try doing this (or else it may hold file handles to the assets and prevent them from being modified). Keep in mind that when you run the script you're looking for this output:

E:\Work\Unreal projects\Retail4262\Content\Cone4272.uasset
File: 'E:\Work\Unreal projects\Retail4262\Content\Cone4272.uasset'
        Downgraded 'Dev-Rendering' from '45' to '44'
        Downgraded 'Dev-Physics-Ext' from '41' to '40'
        Downgraded 'FortniteMain' from '47' to '43'
        Downgraded 'Release' from '43' to '38'
        Replaced first occurence of asset version 'b'04001b0000007cc40501'' with 'b'04001a000000fabaf300''

E:\Work\Unreal projects\Retail4262\Content\Material4272.uasset
File: 'E:\Work\Unreal projects\Retail4262\Content\Material4272.uasset'
        Downgraded 'Dev-Rendering' from '45' to '44'
        Couldn't find custom version 'Dev-Physics-Ext'
        Downgraded 'FortniteMain' from '47' to '43'
        Downgraded 'Release' from '43' to '38'
        Replaced first occurence of asset version 'b'04001b0000007cc40501'' with 'b'04001a000000fabaf300''

E:\Work\Unreal projects\Retail4262\Content\Level4272.umap
File: 'E:\Work\Unreal projects\Retail4262\Content\Level4272.umap'
        Downgraded 'Dev-Rendering' from '45' to '44'
        Couldn't find custom version 'Dev-Physics-Ext'
        Downgraded 'FortniteMain' from '47' to '43'
        Downgraded 'Release' from '43' to '38'
        Replaced first occurence of asset version 'b'04001b0000007cc40501'' with 'b'04001a000000fabaf300''

Sorry about the UX, it was meant more as a proof of concept sort of thing :)

irenenaya commented 2 years ago

Hi Daniel, First, thanks for putting this up! The script works perfectly, from what I can see, but I still can't get my assets to be seen by UE. I'm trying to downgrade some assets from 4.26.2 to 4.24.3 (my intention is to actually downgrade to 4.23 but since in this computer I have 4.24, thought I'd give this a try here first). I tried this with some UI assets. I ran the script after putting all the custom versions with -1, and the ones found were: Dev-Blueprints, Dev-Core, Dev-Editor, Dev-Framework, FortniteMain and Release. I then set the values for those to the values for the 4.24.3 version (got them from the output log when the editor loads). I couldn't find the value for "Release", but ran your script with -1 again with some other assets that i had in 4.24 and put the value I found. I also set the correct values for major, minor and changelist to the ones that appear in the "about" section of the Unreal editor. By looking at the assets in a hex editor, i can see that the custom versions have been correctly changed (not sure how to check the values for the engine version), but still they won't appear in the Content Browser. I can't find any errors in the logs, but if i try to drag any of them into the CB, it tells me "unable to load package .... PackageVersion 522, MaxExpected 518 "

So it would seem that I'm still not able to "fool" UE to think the assets are 4.24 compatible. If you can find any error in what I did please do let me know. Same if you have some idea on something else I could do.

As a side comment, I ran the script with some UI assets I had in 4.24 (mostly old assets I had downloaded from the store), and the script didn't find any custom versions in them. No idea if that's something to be expected?

I will test it further in the next couple of days. Thanks again!!

MattSynapse commented 2 years ago

Hey, trying to downgrade from 4.27 to 4.24.3 for html platform but I cannot find the Release number, even the script cannot :

File: 'D:\Unreal\Project\Content\Test\randomstuff.uasset'
        Read 'Dev-Rendering' with value '36'
        Couldn't find custom version 'Dev-Physics-Ext'
        Read 'FortniteMain' with value '31'
        Couldn't find custom version 'Release'

(asset created with 4.24.3 engine)

@irenenaya how did you do it ?

lordrex34 commented 2 years ago

Hello, I still have errors even after running the script.

LogAssetRegistry: Error: Package YourAsset.uasset has newer custom version of Dev-Sequencer
LogAssetRegistry: Error: Package YourAsset.uasset has newer custom version of Dev-Sequencer
LogLinker: Error: Package YourAsset.uasset was saved with a newer custom version than the current. Tag 7B5AE74CD2704C10A95857980B212A5A Name 'Dev-Sequencer' PackageVersion 13  MaxExpected 12

My settings:

updated_values = {
    "Dev-Rendering": 44,
    "Dev-Physics-Ext": 40,
    "FortniteMain": 43,
    "Release": 38,
}
target_folder = r"D:\Unreal Projects\MyProject\Content"
asset_types = ["uasset", "umap"]

update_engine_version = True
engine_major_version = 4
engine_minor_version = 26
engine_changelist = 15973114
asset_major_version = 4
asset_minor_version = 27
asset_changelist = 17155196

I am trying to downgrade 4.27.2 to 4.26.2

Any idea @1danielcoelho ?

brugr9 commented 2 years ago

Wow - great job. Worked for me. Thanks a thousand times!

yqlizeao commented 2 years ago

good job! I tried to downgrade from 4.27 to 4.26 successfully, but cannot downgrade from 4.27 to 4.25.

Cybertwip commented 1 year ago

Hello, I still have errors even after running the script.

LogAssetRegistry: Error: Package YourAsset.uasset has newer custom version of Dev-Sequencer
LogAssetRegistry: Error: Package YourAsset.uasset has newer custom version of Dev-Sequencer
LogLinker: Error: Package YourAsset.uasset was saved with a newer custom version than the current. Tag 7B5AE74CD2704C10A95857980B212A5A Name 'Dev-Sequencer' PackageVersion 13  MaxExpected 12

My settings:

updated_values = {
    "Dev-Rendering": 44,
    "Dev-Physics-Ext": 40,
    "FortniteMain": 43,
    "Release": 38,
}
target_folder = r"D:\Unreal Projects\MyProject\Content"
asset_types = ["uasset", "umap"]

update_engine_version = True
engine_major_version = 4
engine_minor_version = 26
engine_changelist = 15973114
asset_major_version = 4
asset_minor_version = 27
asset_changelist = 17155196

I am trying to downgrade 4.27.2 to 4.26.2

Any idea @1danielcoelho ?

For the sequencer just add the max package value admitted

updated_values = { "Dev-Rendering": 44, "Dev-Physics-Ext": 40, “Dev-Sequencer”: 12, "FortniteMain": 43, "Release": 38, }

Cipr0 commented 1 year ago

Hi, This is pretty cool, I'm trying tu downgrade from 5.2 to 5.1 and i would like to know how do you know wich value you need to update. in the log i have a few asset that precise "xxxx has newer custom version of UE5-Main" so i have added the UE5-Main guid, but all others assets only says this "xxxx is too new. Engine Version: 1008 Package Version: 1009" in the log in this case what value do i need to change ?

Thanks in advances !

BongoMASK commented 11 months ago

Hi, This is pretty cool, I'm trying tu downgrade from 5.2 to 5.1 and i would like to know how do you know wich value you need to update. in the log i have a few asset that precise "xxxx has newer custom version of UE5-Main" so i have added the UE5-Main guid, but all others assets only says this "xxxx is too new. Engine Version: 1008 Package Version: 1009" in the log in this case what value do i need to change ?

Thanks in advances !

Facing the same issue here.

CH512 commented 11 months ago

@Cipr0 were you ever able to make that downgrade? I've been trying for so long

littlelinks commented 11 months ago

Hi, This is pretty cool, I'm trying tu downgrade from 5.2 to 5.1 and i would like to know how do you know wich value you need to update. in the log i have a few asset that precise "xxxx has newer custom version of UE5-Main" so i have added the UE5-Main guid, but all others assets only says this "xxxx is too new. Engine Version: 1008 Package Version: 1009" in the log in this case what value do i need to change ?

Thanks in advances !

Hello, is your problem solved now? Now I'm facing the exact same issue, and the version I use to package is UE5.1. Thank you!

littlelinks commented 11 months ago

你的邮件我收到了,稍后给你回复。

大佬,这个问题现在解决了吗🥺@yqlizeao

yqlizeao commented 11 months ago

你的邮件我收到了,稍后给你回复。

大佬,这个问题现在解决了吗🥺@yqlizeao

@littlelinks 我并未在虚幻5中进行降级尝试,可能无法帮助到你。如果你有需求可以尝试下从4.27降级到4.26(我尝试成功了),更加了解原理后,再到虚幻5中进行降级处理。

GliessenMA commented 8 months ago

Hi! So I'm a complete noob. How is this supposed to work? How and where do you run the python script? Just Tools -> Execute Python Script in the UE Editor? I've tried to read the blog but don't understand it.

SteffanoDeMoura commented 7 months ago

I was able to downgrade most of my assets from 5.3.1 to 5.2.1 using this python script (thanks to the author btw). Here's what I changed:

################################### add these to the guids: "UE5-Main": "697DD581E64F41ABAA4A51ECBEB7B628", "UE5-Release": "D89B5E4224BD4D468412ACA8DF641779"

updated_values = { "Dev-Rendering": 45,
"Dev-Physics-Ext": -1, "FortniteMain": 83, "Release": -1, "UE5-Release": 41, "UE5-Main": 104, "FortniteRelease": 6 }

update_engine_version = True engine_major_version = 5 engine_minor_version = 2 engine_changelist = 26001984 asset_major_version = 5 asset_minor_version = 3 asset_changelist = 27405482 ################################### In my tests the Animation Blueprints do not work though, but all the rest so far works good such as Blueprints, Static Meshes, Skeletal Meshes, etc...

kj4483 commented 4 months ago

I was able to downgrade most of my assets from 5.3.1 to 5.2.1 using this python script (thanks to the author btw). Here's what I changed:

################################### add these to the guids: "UE5-Main": "697DD581E64F41ABAA4A51ECBEB7B628", "UE5-Release": "D89B5E4224BD4D468412ACA8DF641779"

updated_values = { "Dev-Rendering": 45, "Dev-Physics-Ext": -1, "FortniteMain": 83, "Release": -1, "UE5-Release": 41, "UE5-Main": 104, "FortniteRelease": 6 }

update_engine_version = True engine_major_version = 5 engine_minor_version = 2 engine_changelist = 26001984 asset_major_version = 5 asset_minor_version = 3 asset_changelist = 27405482 ################################### In my tests the Animation Blueprints do not work though, but all the rest so far works good such as Blueprints, Static Meshes, Skeletal Meshes, etc...

I'm trying to downgrade my project from 5.3.2 to 5.2.1 using the python script above. How did you get the asset_changelist?

gabb101 commented 3 months ago

Downgrading from 5.3 to 5.1. After running the script, I still had this error: "[...] is too new. Engine Version: 1008 Package Version: 1009".

I opened two assets in a hex editor, one saved in 5.3 and the other in 5.1, and looked for anywhere those numbers appeared. I only found one spot that matched up - the first two bytes of the second line. In the 5.1 asset they were F0 03, but in the 5.3 asset they were F1 03 (1008 and 1009 in hexadecimal). So I changed the 5.3 assets to F0 03, and now it works with no issues.

I'm afraid I don't know how to get the script to do this - if anyone makes that happen, I'd love to know how.

I had originally run the script with these values:

"Dev-Rendering": 45,
"Dev-Physics-Ext": 41,
"FortniteMain": 80,
"Release": 44,
"UE5-Release": 41,
"UE5-Main": 88,
"FortniteRelease": 4

update_engine_version = True
engine_major_version = 5
engine_minor_version = 1
engine_changelist = 23901901
asset_major_version = 5
asset_minor_version = 3
asset_changelist = 27405482

And added the following to the list of GUIDs:

"UE5-Main": "697DD581E64F41ABAA4A51ECBEB7B628",
"UE5-Release": "D89B5E4224BD4D468412ACA8DF641779"

Thanks to @SteffanoDeMoura for those. I got the other values by running the code with -1 for all the values, on an asset I'd saved in 5.1.

A few other things I had to figure out, for any other beginners: I believe the engine_changelist is the long number found in the 'About Unreal Editor' window, the asset_changelist is the same thing but for the editor version the asset was saved with, and there's heaps of information online on how to run a Python script (essentially save it somewhere, then run it using a line of code in command prompt).

Thanks to everyone who's contributed to the discussion, hope this is helpful to someone.

Heavenswind commented 3 months ago

I'm trying to migrate from 5.3.2 to 5.2 some blueprints under Content/Systems

when I run @SteffanoDeMoura 's script I get them in the editor but when I opened them it crashes the engine. Saying a file was serial-size-mismatch expecting 1441 but got 1440

=================================================== Engine where assets were made : Version: 5.3.2-29314046+++UE5+Release-5.3

"UE5-Main": "697DD581E64F41ABAA4A51ECBEB7B628",
"UE5-Release": "D89B5E4224BD4D468412ACA8DF641779",

updated_values = { "Dev-Rendering": 45, "Dev-Physics-Ext": -1, "FortniteMain": 83, "Release": -1, "UE5-Release": 41, "UE5-Main": 104, "FortniteRelease": 6, }

update_engine_version = True engine_major_version = 5 engine_minor_version = 2 engine_changelist = 26001984 asset_major_version = 5 asset_minor_version = 3 asset_changelist = 29314046

if anyone could help it would be appreciated

cippyboy commented 3 months ago

I made a plugin (https://www.unrealengine.com/marketplace/en-US/product/asset-downgrader) that does just that, downgrades assets all the way back to 4.27, with certain limitations (for now)

RazaZaidi2802 commented 4 weeks ago

YOU ABSOLUTE PRODIGY! You script worked wonderfully and helped me convert an entire vehicle system + Content project (FGear) from 4.27 to 4.26. The asset developer only supported 4.27 lowest so I was stuck since my project is in 4.26. Thank you! <3