Announcement

Collapse
No announcement yet.

Variant Manager giving Problems when swapping material

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Variant Manager giving Problems when swapping material

    Okay so I managed to get the variant manager working with the following workflow.
    Created 2 material instances. One light and one dark.
    Created a duplicate of a wall and applied the above two materials to each one.
    USed the Variant Manager to set up material swaps and baked the lighting.
    Now inside the game, it looks weird. Please look at the attached video to see what I mean and someone help me please

    https://vimeo.com/376053345

    #2
    Anyone? Any help would be great

    Comment


      #3
      Instead of duplicating the wall, you can swap the material applied to the mesh with variant manager. This way you will not have issues with baked lighting as the mesh will be the same and only the material will change.
      From your video, it seems each mesh is inside the other with only one side sticking out, that way unreal bakes the inside mesh as shaded.

      Comment


        #4
        Originally posted by Corviera View Post
        Instead of duplicating the wall, you can swap the material applied to the mesh with variant manager. This way you will not have issues with baked lighting as the mesh will be the same and only the material will change.
        From your video, it seems each mesh is inside the other with only one side sticking out, that way unreal bakes the inside mesh as shaded.
        Thanks. I have tried that but couldn't get it to work. Could you please share a screenshot of the blueprint that can swap material?

        Comment


          #5
          Originally posted by scott1391990 View Post

          Thanks. I have tried that but couldn't get it to work. Could you please share a screenshot of the blueprint that can swap material?
          When you're adding the static mesh to the variant, check the material option as in this screenshot, then configura different materials for different variants.
          Attached Files

          Comment


            #6
            Originally posted by Corviera View Post

            When you're adding the static mesh to the variant, check the material option as in this screenshot, then configura different materials for different variants.
            Thanks. I will try that and update here. In the tutorial given on the Unreal page, the instructor selects the "Visible" option instead of this "Material" one that you have pointed out.

            Comment


              #7
              Originally posted by Corviera View Post

              When you're adding the static mesh to the variant, check the material option as in this screenshot, then configura different materials for different variants.
              Many Thanks. Just tried it and it worked like a charm. Now I just need to learn to change the object so I can start having furniture options. Do you think you could help me with that?

              Comment


                #8
                So I followed the same procedure for model swap as I did in texture swap but to my surprise, it doesn't work.
                Please have a look at this recording I made and let me know what did I miss
                https://vimeo.com/379217715

                Comment


                  #9
                  Changing meshes is more complicated because of baked lighting, try changing the mesh to movable.

                  Comment


                    #10
                    Originally posted by scott1391990 View Post
                    So I followed the same procedure for model swap as I did in texture swap but to my surprise, it doesn't work.
                    Please have a look at this recording I made and let me know what did I miss
                    https://vimeo.com/379217715
                    You don't have the second blueprint with the wall materials in the video but I think the problem may be that you have two Level Variant Sets in the level. When you get all the actors of class you are grabbing the first one, this works on the walls but when you feed it the info for the objects it can't find the variant names.

                    Try using one Level Variant Set on the level, and add all your Variants inside (materials switch, mesh switch, etc) inside the same LVS. Then on Switch Variant by Name just feed it the other set name and then the variant index.

                    Comment


                      #11
                      Originally posted by PabloNajurieta View Post

                      You don't have the second blueprint with the wall materials in the video but I think the problem may be that you have two Level Variant Sets in the level. When you get all the actors of class you are grabbing the first one, this works on the walls but when you feed it the info for the objects it can't find the variant names.

                      Try using one Level Variant Set on the level, and add all your Variants inside (materials switch, mesh switch, etc) inside the same LVS. Then on Switch Variant by Name just feed it the other set name and then the variant index.
                      Thanks. I figured it later that I have two different LevelVariantSets and only the material swapping level is bound to the level. In the next project, I used only 1 LevelVariant just like you said

                      Comment

                      Working...
                      X