Author Topic: Substance in Unity 2018: Updated info with each release  (Read 3569 times)

flo


After upgrading my project from 2017.4.9 to 2018.2.11 and installing substance plugin from asset store (CTS needs substance support) i get this popup frequently!

It's worse than just this popup.

Every time i change a line of code Unity recompiles and following happens:

1. I get the mentioned popup
2. Log says:
Code: [Select]
Updated 1 "old Substance plugin" entries.
UnityEngine.Debug:Log(Object)
Substance.Editor.SubstanceImporter:ReflectAll()
Substance.Game.SubstanceMain:ReflectAll()
Substance.Game.SubstanceMain:DelayCall()
UnityEditor.EditorApplication:Internal_CallDelayFunctions()
3. Scene is reloaded and all changes get lost

Due to 2. i removed "Assets/Allegorithmic" folder and reinstalled the substance plugin. Same again :-(

Unity version: 2018.2.11 (upgraded from 2017.4.9)

Uniy 2018.2.11.f1 with the substance plugin imported from the asset store. Attempting to import https://assetstore.unity.com/packages/3d/characters/humanoids/realistic-mannequin-doll-character-9489 from Asset Store fails with multiple error message pop-ups:

Quote
Asset Store Substance Import Glitch!
Remove package from project browser and re-import it from Unity 2017...

Hey @eugd ,

The Asset Store page for this says:

Package has been submitted using Unity 4.2.0, 5.0.1, 5.3.1, and 5.3.5 to improve compatibility with the range of these versions of Unity

Which means that this asset's Substance files have not been updated to work with the latest Substance in Unity plugin. Since from 2017-2018 we had to change from an integrated Unity plugin to an external Unity plugin, we had to change the Substance file architecture. This means that Substances that may have worked in older versions of Unity (prior to Unity 2018 and the new Substance plugin) will not work in the new Substance plugin without being converted. This can be done in two ways:

1. The Asset Store creator can update the asset's Substance files to be compatible with the new Substance in Unity plugin and re-upload them to the Asset Store.
OR
2. You can download the assets from the Asset Store into an older version of Unity, and then update that Unity project using the Substance Reflection steps listed here:

https://support.allegorithmic.com/documentation/integrations/upgrading-2017-x-projects-170460267.html

The project will then include the updated assets. You can then work in that project, or export the assets+Substances as a package and then import them into another project with the updated Substances.

We are working to make the "Asset Store Substance Import Glitch" error more descriptive, and eventually hope to make this process easier to deal with but for now this is a workaround.
Integrations QA Analyst

I really hope we get the support we need for the terrain shaders we use like our own, or if someone uses CTS, RTP, or mega splats...  This has caused many long time users I know to leave Unity all together since it caused issues.   Yes I know we can export as a texture... which helps sure. but this does cause issues.


We are staying  on 2017.4, until you guys get this worked out...I do hope this is resolved by next year some time as we are expected to early release our new Steam game late 2019 -early 2020.   we use Substance a ton as I have for Unreal, Cry, AAA engines and now Unity...the support for Unity has really made , many users upset...  We understand that some of it is due to Unity and there nonsense... so we hope that you guys understand, many experienced users need this, not sure who made the choose to worry about mobile over the support for shaders for terrains.... but regardless we hope this is going to be addressed soon as I was told it was, then I was told you guys didn't know when..... I mean I stopped buying Substance products since the current games i'm under contract with, I can't even use your stuff the way we like....the plug in, is a total joke right now even for meshes....    I get its a beta, but for how long??  we go through this nonsense  every year with the newest version of Substance ..making it useless for us to buy a new version...  I own all of your products since day 1..and have thousands of hours.. and hate to even rant about this...but I just don't understand the thinking behide this, when its your tool.. and its making us where there is no point to buying newer versions since we can't use commercial currently.. I hope you guys  understand our frustration...…   I plan to buy the new stuff, once this is resolved, but, it does make me rethink about bothering for future Unity games....     anyways, do your best, and we hope since mobile is done, you will resolve these issues soon.     Thank you. for understanding our frustration. 

I really hope we get the support we need for the terrain shaders we use like our own, or if someone uses CTS, RTP, or mega splats...  This has caused many long time users I know to leave Unity all together since it caused issues.   Yes I know we can export as a texture... which helps sure. but this does cause issues.


We are staying  on 2017.4, until you guys get this worked out...I do hope this is resolved by next year some time as we are expected to early release our new Steam game late 2019 -early 2020.   we use Substance a ton as I have for Unreal, Cry, AAA engines and now Unity...the support for Unity has really made , many users upset...  We understand that some of it is due to Unity and there nonsense... so we hope that you guys understand, many experienced users need this, not sure who made the choose to worry about mobile over the support for shaders for terrains.... but regardless we hope this is going to be addressed soon as I was told it was, then I was told you guys didn't know when..... I mean I stopped buying Substance products since the current games i'm under contract with, I can't even use your stuff the way we like....the plug in, is a total joke right now even for meshes....    I get its a beta, but for how long??  we go through this nonsense  every year with the newest version of Substance ..making it useless for us to buy a new version...  I own all of your products since day 1..and have thousands of hours.. and hate to even rant about this...but I just don't understand the thinking behide this, when its your tool.. and its making us where there is no point to buying newer versions since we can't use commercial currently.. I hope you guys  understand our frustration...…   I plan to buy the new stuff, once this is resolved, but, it does make me rethink about bothering for future Unity games....     anyways, do your best, and we hope since mobile is done, you will resolve these issues soon.     Thank you. for understanding our frustration.

We definitely understand the frustration. We are right there with you. In many ways, we are in the same boat. The Unity plugin architecture is changing sometimes drastically between releases and it's been a very non-predictable moving target for us.

For the terrain shader, the issue I believe is that the normal map is not working. Is that correct? We have plans to address normal maps by giving you options to what compression to use to resolve issues with terrain. I don't give eta, because depending on what Unity does between updates, we may have to rewrite or reshuffle work.

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Is there an ETA on when the plugin will support the flood fill node in Unity?

Hello!

I followed the upgrade process, but i only get black textures. any idea?

Substance Plugin is not working in Unity 2018.2.15f1 (64-bit) - tried deleting and re-installing and it doesn't help. Unity crashes every time the importer popup runs after the installation.

Code: [Select]
========== OUTPUTTING STACK TRACE ==================

0x00007FFC82AECABB (VCRUNTIME140) memcpy
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFC66A72C99)
0x00007FFC66A72C99 (Substance.Engine) (function-name not available)
0x00007FFC66A7AC9B (Substance.Engine) cppShutdownSubstance
0x00007FFC66A794A4 (Substance.Engine) cppShutdownSubstance
0x00000000425DB30E (Mono JIT Code) (wrapper managed-to-native) object:wrapper_native_00007FFC66A749A0 ()
0x00000000425DB76D (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_intptr (object,intptr,intptr,intptr)
0x00007FFC3C0AA69B (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFC3C031BB2 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2915] do_runtime_invoke
0x00007FFC3C03AD72 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:3067] mono_runtime_invoke_checked
0x00007FFC3C03B509 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:5253] mono_runtime_try_invoke_array
0x00007FFC3C03AD06 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:5131] mono_runtime_invoke_array_checked
0x00007FFC3BFDFE04 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\icall.c:3357] ves_icall_InternalInvoke
0x000000001BF8F416 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
0x000000001BF8DA1B (Mono JIT Code) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
0x000000004069710F (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
0x00000000420A6183 (Mono JIT Code) System.Delegate:DynamicInvokeImpl (object[])
0x00000000420A588B (Mono JIT Code) System.MulticastDelegate:DynamicInvokeImpl (object[])
0x00000000420A5765 (Mono JIT Code) System.Delegate:DynamicInvoke (object[])
0x00000000425DB163 (Mono JIT Code) Substance.Game.NativeFunctionsShared:cppGetChannelNames ()
0x00000000425DAE6B (Mono JIT Code) Substance.Game.NativeFunctions:cppGetChannelNames ()
0x00000000425D998B (Mono JIT Code) Substance.Editor.SubstanceImporter:UpdatePluginVersion (uint[]&,string[]&,string[]&,int[]&)
0x00000000425D7A0B (Mono JIT Code) Substance.Editor.SubstanceImporter:OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x00000000425D74D8 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\AssetPipeline\ScriptedImporter.cs:20] UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x000000004249ABD6 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
0x00007FFC3C0AA69B (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFC3C031BB2 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2915] do_runtime_invoke
0x00007FFC3C03AB9F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2962] mono_runtime_invoke
0x0000000140C0731A (Unity) scripting_method_invoke
0x0000000140BFF670 (Unity) ScriptingInvocation::Invoke
0x0000000140FCA41C (Unity) ScriptedImporter::GenerateAssetData
0x0000000141FE4D90 (Unity) AssetDatabaseV1::ImportAsset
0x0000000141FF6083 (Unity) AssetDatabaseV1::UpdateAsset
0x0000000141FEA056 (Unity) AssetInterface::ProcessAssetsImplementation
0x0000000141FF3F81 (Unity) AssetInterface::StopAssetEditing
0x0000000141FEF61D (Unity) AssetInterface::Refresh
0x0000000141FA4880 (Unity) AssetDatabase::Refresh
0x0000000141444013 (Unity) Application::InitializeProject
0x00000001415EF018 (Unity) WinMain
0x000000014243400A (Unity) __scrt_common_main_seh
0x00007FFC8CEE3034 (KERNEL32) BaseThreadInitThunk
0x00007FFC8ED91461 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

Same here.

Uniy 2018.2.11.f1 with the substance plugin imported from the asset store. Attempting to import https://assetstore.unity.com/packages/3d/characters/humanoids/realistic-mannequin-doll-character-9489 from Asset Store fails with multiple error message pop-ups:

Quote
Asset Store Substance Import Glitch!
Remove package from project browser and re-import it from Unity 2017...

Hi there -

We're seeing this still spontaneously on 2018.2.17f1 with the 2.10 plugin, and the substance fails to import - any chance of a workaround?

Can confirm:
- Worked on 2017.X (and prior) just fine.
- The meta file is present and intact (if that's how you're parsing it?)
- The SubstanceImporter class is present & loaded.

Can supply a folder of sample files affected - but among other things, we're triggering this on the old "20 Free Substances" asset that used to be in the Asset Store.

Thanks!

Uniy 2018.2.11.f1 with the substance plugin imported from the asset store. Attempting to import https://assetstore.unity.com/packages/3d/characters/humanoids/realistic-mannequin-doll-character-9489 from Asset Store fails with multiple error message pop-ups:

Quote
Asset Store Substance Import Glitch!
Remove package from project browser and re-import it from Unity 2017...

Hi there -

We're seeing this still spontaneously on 2018.2.17f1 with the 2.10 plugin, and the substance fails to import - any chance of a workaround?

Can confirm:
- Worked on 2017.X (and prior) just fine.
- The meta file is present and intact (if that's how you're parsing it?)
- The SubstanceImporter class is present & loaded.

Can supply a folder of sample files affected - but among other things, we're triggering this on the old "20 Free Substances" asset that used to be in the Asset Store.

Thanks!

Hey @Adam Frisby 0 ,

A workaround for this issue is here: https://youtu.be/uU0zV7zP-G4?t=176

In Unity 2018.1, the Substance plugin became an external plugin and was no longer integrated into Unity. Substances contained in packages that were uploaded to the Asset Store prior to 2018.1 (i.e. Unity 2017, when the plugin was still integrated) will not work right out of the box. These Substances contain old Substance data and will need to be updated for use in the new Substance in Unity plugin.

From here there are two scenarios:

1. The Asset creator will have to update their Substances in these Asset Store packages and reupload them to the Asset Store.

or

2. The user will have to update these Substances manually using the workaround in the video above.

I couldn't find the exact asset you mentioned in the post, but the method listed in the video should work for these assets.



While it is detailed in the video, the process for manually updating assets from the asset store is as follows (Assuming you do not already have a project you are working on):

  • Download old assets (that contain Substances) into older Unity version
  • Update the project using Unity's project updating process to a newer Unity version (i.e. 2018.2)
  • Import the Substance in Unity plugin from the Asset Store
  • The assets should now be updated

If you already have a project and wish to use these assets in that project, it gets slightly more involved:

This scenario includes two projects: Your current project and an updating project (which will be used for updating assets)

  • Download old assets (that contain Substances) into your updating project (older Unity version, i.e. Unity 2017)
  • Update the project using Unity's project updating process to a newer Unity version (i.e. 2018.2)
  • Import the Substance in Unity plugin from the Asset Store
  • The assets should now be updated
  • Right click the Asset folder and click 'Export Package' (make sure to uncheck the Allegorithmic folder, so you DO NOT include the Substance plugin
  • Import the newly repackaged updated Assets into your current project
Last Edit: November 26, 2018, 09:48:46 pm
Integrations QA Analyst

Okay the missing step on your upgrade guide page is

1- Import the sbsar's into a project under Unity 2017.3/4
2- Import the subtance plugin into 2017.3/4 (other versions cannot import the Substance plugin)
3- THEN upgrade the project.

This isn't an ideal solution - we're going to have to quickly write something to just read this data out of the .meta files instead of reflecting the ProceduralMaterials class (which is what I was hoping to avoid having to do.)

If you already have a project and wish to use these assets in that project, it gets slightly more involved:

This scenario includes two projects: Your current project and an updating project (which will be used for updating assets)

  • Download old assets (that contain Substances) into your updating project (older Unity version, i.e. Unity 2017)
  • Update the project using Unity's project updating process to a newer Unity version (i.e. 2018.2)
  • Import the Substance in Unity plugin from the Asset Store
  • The assets should now be updated
  • Right click the Asset folder and click 'Export Package' (make sure to uncheck the Allegorithmic folder, so you DO NOT include the Substance plugin
  • Import the newly repackaged updated Assets into your current project

This does not seem like a good recommendation to make. I don't think it's a good idea to re-import your entire Asset hierarchy. It could take a very long time and also cause unexpected issues.

What I did was a bit different and much safer in my opinion. My steps (will only work in Windows):

1. Updated project from 2017.4 to 2018.2.14
2. Opened updated project, fixed any compilation errors in project or asset code
3. Imported Substance in Unity plugin
4. Closed Unity Editor
5. Made a copy of my 2018.2 version of the project
6. Searched the Assets folder (do NOT start from the project root, start at the Assets folder) of the copied project, using the search filter to only return files that do NOT have the sbsar extension: extension:~!sbsar kind:~!folder
7. Deleted all the search results so that only the sbsar files are left
8. Opened the copied version of the project that only has the sbsar files.
9. Exported a Unity Package of the Assets folder
10. Opened the original upgraded 2018.2 project and imported the Unity package to re-import the .sbsars


It worked, but not perfectly. I've seen the following two issues:

1. On some GameObjects connected to prefabs, the GameObjects were reset to the prefab state and the Substance Material failed to apply properly. There is no material assigned at all.

2. On GameObjects with more than one material assigned to them, the upgrade did not put the assigned materials back in the correct order.

And an enhancement request:

1. Please give the top level asset a custom icon so I'm not constantly confusing them with the fbx models :)
Last Edit: December 02, 2018, 09:57:21 pm

Hello!

When can we expect .net 4.x support for unity substance plugin? if its going to be part of 2.2 release, Can you give me a rough time frame? Also do you have an internal copy  that I can use?

...

Hi Keston,

I've built a better importer process - I've put it under a MIT license. You can grab the source here: https://github.com/AdamFrisby/SubstanceImportPluginConverter

This version instead rewrites the .meta files from the old format, into the new. This means you can drop 'old substances' into a Unity 2018.X project, without having to do the annoying 'push through a 2017.3 instance' dance. It also makes the upgrade process a lot simpler.

It's only a first implementation, there is more to do - texEnvs for example need to be properly converted as do other things. But the process & idea I think is fairly sound.

The basics are we take the old .meta format ("SubstanceImporter"), parse it into a structure, then remap that to the new "ScriptableImporter" structure and write it back to a .meta file.

This has a few advantages:
- First, we can preserve the GUID and FileID -- this means you do not need to rewrite .prefab and .unity files to remap the file IDs; this is good for the very common case where people were storing those in binary format.
- Second, you don't need to round-trip through an older Unity version and 'reflect' these properties (we just read them from the .meta file)

There is one downside; if you did not have visible meta files enabled (which I think has been the Unity default since 5.X) you wont have a .meta file and have to go through your original convoluted upgrade process. But this should help in a lot of cases. It might be possible to get Unity to write the .meta file if importing from a .unitypackage though; so that might be a solution.

If you find this useful, please feel free to integrate into your official plugin - just give us (Sinespace) a shout-out in your release notes. ;)
Last Edit: December 06, 2018, 11:05:00 am