Results 1 to 8 of 8

Thread: Material issues and Invalid FlattenType: 2

  1. #1

    Material issues and Invalid FlattenType: 2

    I'm getting some _really_ weird material instance problems:

    - Certain parameters have less and less effect depending on how many times
    I open and save the package (without modifying anything).

    - When opening a map using the problematic material, I keep getting the
    prompt informing me that a package needs re-saving because the parent
    material has changed. Over and over again, when nothing has changed
    in the parent or in it's package.

    - Changing something in the child material instance (in its own package) makes
    the _parent_ material's package dirty.

    - The same matinst looks different in the viewport than in PIE. It changes look
    in the viewport if I open matinee once (without changing anything). The different
    look is due to the weirdness going on with those certain parameters.

    I tried to following to fix this:

    - Update UDK from February to May.
    - Replace the affected 3 scalar parameters with a single vector.
    - Copied and reassigned the parent material.
    - Rebuilt the material instances from scratch.
    - Removed the affected parameters, saved everything, closed the editor then
    added everything back with a different name.
    - Fixed up redirectors.
    - Deleted the shader cache.

    At the last step I finally saw a warning in the log:

    Warning: ConditionalFlattenMaterial: Invalid FlattenType: 2

    Which, along with the other clues, seem to indicate that something in the
    node tree is hard to stomach for the engine. I didn't find anything on this
    message on the internet.

    The parameters are linked to simple multiply nodes so no custom code nodes
    or any other exotic stuff is used.

    I'd appreciate any pointers.

  2. #2
    Got the same issue today in 2012-May, and very interested in how it can be fixed.

  3. #3
    Could either of you please post back with a step by step process of reproducing any of these issues? This makes troubleshooting these problems much easier.


  4. #4
    Thank you for looking into this!

    Reproducing the warning is simple, I just create a new material, create scalar
    constant, link it to diffuse, apply changes:

    Log: Missing cached shader map for material Test_mat, quality 0, compiling.
    Warning: ConditionalFlattenMaterial: Invalid FlattenType: 2

    I kept connecting it to other slots (emissive, specular) but the only change
    I saw in the log was that after a while the "Log:..." lines were printed with
    red too, not just the "Warning:..." ones.

    As for reproducing the actual weird results, I had no luck so far. The material
    I mentioned above is fairly complex. I made it months ago with no problems.
    The issue arose when I adjusted a few things, most notably added a parameter
    to scale a value. Only the modified fork is screwed, the rest of the material
    versions seem to work fine still.

    Also, DX9-DX11 modes both behave the same and windows reinstall didn't help.

  5. #5
    One more clue: this is how things work now, everywhere:
    - I make a new package with a new material instance of an existing material.
    - I modify material instance, save pack, use material on a new map.
    - Save everything and quit UEd.
    - I start UEd and open the map.
    - Popup tells me that since the parent materials have changed (they haven't)
    I must resave the package (the one I've just created above).
    - After saving the pack I quit UEd without changing anything.
    - I start UEd, open map, no popup.
    - However if I change any parameters in any of the material instances,
    then next time I open the map I will be prompted to resave the package.

    And of course the log is spammed with the "ConditionalFlattenMaterial" warning.

  6. #6
    Hello I have the exact same issue. I got a Diffuse Texture atlas (2k texture) with a Alpha map (for testing purpose its in the alpha, later on it will move to a greyscale RGB Mask).

    Have some black meshes some dont even appear...

    Hope someone has a workaround?


  7. #7
    Tom Shannon
    I'm getting simmilar issues. I haven't takent he time to track them down to a better degree than Zoltan does, however I'm getting the Type 2 error as well as the matierials package needing to be resaved over and over. It's at like 25 revisions in perforce already (mark as dirty and submit process).
    As of right now it's not causing any serious issues, just log spam and a lot of version of my materials package.

  8. #8
    I'm getting the same issue, coupled with the inability to assign ANYTHING from the Content Browser using the little green arrows or copying the path and pasting it into the text box. This is the case with Nov 12 and Feb 13 versions. Reinstall's don't work either.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts