Material instance parameters losing values in 4.19

  1. In 4.18 or older versions, create a material with a material function in it.
  2. Enter and put some textures inside the material function.
  3. Set textures to be “Shared: Wrap” but keep one texture at “From texture asset” and connect them to corresponding slots.
  4. Multiply a UV node by a scalar parameter per texture so you can individually control tiling of each texture separately through material instance.
  5. Create and apply the material instance to landscape or something else, then set custom tiling values to each parameter.
  6. Save the project.
  7. Open the project in 4.19.0

Result: Texture samplers that are set to be “Shared: Wrap” have lost the parameter values associated with them. But the ones that were set to be “From texture asset” still have their values.

What we mentioned in repro steps regarding tiling, does not limit to tiling, but any other calculations associated with samplers that are set to be “Shared: Wrap”.

4.18:

4.19.0:

also experiencing this!

I reported a similar bug on day one, where mat functions parameters inside other mat functions wouldn’t be saved in mat instances.

Ah yeah I added the material function in the repro steps (steps 1/2).

Having the same problem. Quite simply, material instances of a parent landscape material will not save their changed settings properly. If I change, for example, the near distance tiling of a texture in the landscape material instance, as soon as I close and re-open it, it reverts back to default settings – instead of saving the changes that were made.

Hello,

Any word from Epic?

Unfortunately I wasn’t able to reproduce this issue with the repro steps you’ve provided.

In 4.18, I created a new project, then created a material with a material function:

I made sure all textures were set to “Shared: Wrap” except for the texture being used for the Normal, which was kept as “From texture asset.”

Here you can see the Material Instance and the scalar parameter values I entered, along with the resulting scene.

Next, I saved the project and opened it in 4.19 and all the scalar parameter values were copied over correctly and the scene looks as expected.

Please let me know if there is anything I’ve missed.

I believe the ‘lost’ parameters only get lost when they reside inside a material function. your repro doesn’t attempt to do that - I know the original repro steps didn’t mention it but they do now, as well as the comments below

given the seriousness of the issue, if that still fails I’d suggest the following:

  • from the marketplace import any of the “Realistic Landscapes Bundle” packs into a new project
  • open any of the showcase maps
  • notice the material instance parameters are lost
  • repeat in 4.18, and see how everything works correctly

Hi Jon, i think the real issues comes from mats with mat functions parameters inside other mat function, these parameters are not saved, so you need to create 2 mat functions add one inside the other then try saving the parameters inside that 2nd mat functuon inside a mat instance, you can do this just in 4.19.

Hi @Jon X :diamonds::diamonds:, Someone else from Epic said on the forum thread that they were able to reproduce the issue: https://forums.unrealengine.com/unreal-engine/marketplace/creators-hub/1447833-4-19-bug-and-marketplace-content?p=1451320#post1451320

I’ve got the exact same problem… Pretty annoying!

Hey all,

Trying to get a repro on this (Incorporated recent suggestion from OverRated_AU). Still not seeing it.

Attaching my 4.18 base project, anyone see what needs to be added/changed?

link text

Hi , This seems to have more than the single issue i have found, please download my debug project (materialinstancebug.zip) below, go into Test_Mat_Inst and set a value in TRYSAVEME save it and close it then reopen it, you will see the saved parameters is lost but then again it seems to be saving it to the above parameter? so it seems there’s more than just lost save data going on here, now i thought it mite of been because there no feed back from these to main node, but then again in the 2nd debug project (materialinstancebugtest2.zip) it is but instead this time its not saved in the above parameter its just not saved at all.

I hope these debug projects help.

link text

link text

Hi @ O :diamonds::diamonds:, In addition to OverRated_AU’s provided files, is there any way I can give you our project in private? unfortunately can’t share our projects in public. But it’s probably going to help you see what’s going on between 4.18 and 4.19.

Hi all, if it can be of any help I found out the problem lies in the expression guids of the material instances parents, there appears to be some collisions of IDs between materials expressions and materials functions expressions, leading to the rewrite of parameters names and consequent shuffle of parameters values.

Still not sure how or why this problem arises only when updating to 4.19, maybe a deserialization bug?

I got the materials to render correctly by invalidating the expression guids in the parameters, but the editing is still broken.

Thanks for these!

Just to clarify: were these created in 4.18 and converted to 4.19?

These are just made in 4.19, but creating them in 4.18 and converting the project you end up with the same result ether way.

I have entered this bug as Unreal Engine Issues and Bug Tracker (UE-57086) Critical Priority

Great thanks for the heads up O.

The target fix is 4.20? So 4.19 and all of the cool Paragon assets are essentially unusable because, quite frankly, landscapes suck without the ability to alter material function parameters. What a waste of time converting to 4.19, then. Can’t this get bumped up? Extremely disappointing.