Home Unreal Engine

Should I be worried about this warning message?

polycounter lvl 10
Offline / Send Message
Subtle 1rony polycounter lvl 10
Hey guys, had a quick question:

I have to manually apply a material to an already placed static mesh that was imported with multiple materials applied to it. I figured out that I can go to the static mesh properties(f4) and update the mesh there and it seems to work fine. But I see the following warning message when I hover over the material slot:

ques.jpg

This was enough to make me uneasy, so I thought I'd ask the fine people here about it. My concern is that I'll corrupt my file somewhere down the line, which would be quite devastating to my morale.

I have to do this for many instances of modular pieces, will it be okay?

Replies

  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    Changing it here will have no negative impact on anything nor lead to any chance of corruption and so on. Changing that is the normal way to go. Pretty much every level out there uses this property on at least one mesh, if not tons of them. I've been using that property aggressively since 2002 and never at a single point noticed a problem. I believe that comment relates to setting it via Unrealscript, not editor related.

    That said, I am not sure if you set the default materials for your meshes? A lot of people end up using this property instead of assigning the correct default material in the content browser and that is incorrect.
    You also mention your mesh was imported with multiple materials applied to it. It has multiple material slots then? Do you need those? Because it is vital any meshes uses as few material slots as possible.
  • Subtle 1rony
    Options
    Offline / Send Message
    Subtle 1rony polycounter lvl 10
    I'll show you what I'm doing specifically:

    basically I placed all my modular pieces in editor before I did any uvs or lightmaps. Then when I had everything all set up nice, I went back, uved them for both textures and lightmaps and reimported.

    I used two separate 512 tileable textures on the following example piece:

    Capture.jpg

    This mesh has 2 material slots, into which I plugged in the necessary materials in the mesh editor, under LOD info.

    I needed to update the material slot in the static mesh properties because only one material updated, after the reimport, on the already placed meshes.For example, in the piece above the red baseboard texture showed up, but the blue section still had my default gray material applied to it.

    So if I continue this way, Ill have several modular pieces and their many instances with 2 or more textures applied to them. Intended use for the final piece will be for pc. From your comment, it sounds as if this method is bad practice. Is there a better way I could be doing it?

    The reason I kept the materials completely separate is because I'm not sure how to combine them to one texture and still tile.

    Although, now as I type this I could see combining the to textures for a horizontal tiling texture, so long as I don't need to tile vertically. The way I'm doing my uvs would allow for it, because they're pushed beyond the 0 to 1 range currently:

    Capture2.jpg

    I tried initially doing a texture like this:

    test.jpg

    but I couldn't see how to get something like the brick to tile across a larger surface...unless the poly surface itself was subdivided into smaller sections.
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    I didn't get this part:

    "I needed to update the material slot in the static mesh properties because only one material updated, after the reimport, on the already placed meshes.For example, in the piece above the red baseboard texture showed up, but the blue section still had my default gray material applied to it. "

    Why do you need to add it in the properties then? If one of the two went blank, just add it again the static mesh editor instead?

    Two materials means two drawcalls, means the mesh is twice as heavy. You tend to want to avoid that, however if this is a small level (few hundred of these walls max) or not used throughout a whole game then you might as well just stick to what you have now. You won't notice the impact.

    If you do want to do it differently you can do

    a. make a horizontal tiling texture like you mentioned yourself

    b. make a texture atlas like bottom picture. You get these to tile by adding more polys. So you trade polys for fewer textures, but that is fine. Polys are super cheap anyhow. There are tons of tutorials and guides on this technique online. Note that you may need buffer space between each texture on the sheet as else the other one may bleed in.

    c. make an advanced material that embeds the two tiling textures into the same material, and then switches between the two based on some kind of mask (vertex colors, low res alpha map). Then it is just one drawcall but you will get the same result as you got right now.

    A is easiest and gives best quality, but makes your texture restricted to only these horizontal walls. C is most versatile but will end you up with just tiling textures on everything (meaning less opportunity to properly paint in details/edges/whatever).
  • Subtle 1rony
    Options
    Offline / Send Message
    Subtle 1rony polycounter lvl 10
    Thanks Hourences, that really helped to clear some questions for me.

    This is kind of hard to explain, but here's an attempt to clarify why I had to use the material slot in the static mesh properties:

    I had a basic grey material on all my static mesh instances, before they had any uvs, just so I could see and place them without the purple and white checker texture. So after I reimported the same static meshes with 2 materials, and plugged the materials in the static mesh editor(under LOD info), the instances I had already placed only showed the red baseboard texture. The face of the wall, which should have been blue, still had my basic grey material. The only solution I found to fix this was to select all the instances I had placed, go to their properties window and plug the blue texture into the material slot there.

    It was then I saw the message and figured I should see how serious it was:)

    After the re-import, any new instance I placed in the scene had the textures applied properly, but the instances that were already in my scene only had the red baseboard texture and my basic grey material initially.

    Hopefully that makes more sense.
    Thanks again!
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    Are you sure those meshes use the same mesh in the content browser? And not some copy located elsewhere? As I have never had it happen to me that upon reimporting it it won't show up material changes in the level.

    Alternatively you might have already had override materials on the meshes in the level/not having removed all overrides? Either way never happened to me, so I think it is rather something you did than the engine.
Sign In or Register to comment.