Home Unreal Engine

AO texture for multi mat mesh

Hi

I have a mesh with 7 materials. Each has its texture applied correctly in the material editor.

In 3ds max I mapped the uv's on the meshes second channel, and baked an ao texture.

Now I have this single ao texture, I am unsure how to apply it in unreal engine.

Help greatly appreciated.

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Assign the same ao texture into each material/material instance with the second channel applied.
  • Shockpuppet
    Options
    Offline / Send Message
    Ok thank you I will give that a go.

    As I'm new to unreal, what's the way to apply the second channel for the ao texture?....
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    put a texture coordinate node, select it, and on the details panel, you can set the coordinate index. Set it to 1 if you want second channel, 0 if you want first channel, etc. Then plug that into the UVs input of the texture.
  • Shockpuppet
    Options
    Offline / Send Message
    Thank you.

    Wont doing it like this mean that the AO for my mesh is applied to the material (which the mesh is using), regardless of if i need to use this material for more than 1 mesh?

    Let me clarify, what good is an AO for a material in this way if i need to use that material on multiple meshes? The AO will need to be different for each mesh, but the material needs to be the same because the meshes are sharing that. How do i achieve a unique AO per mesh?



    (see i need to use that door texture on a few buildings, but each building mesh needs its own ao :S )
    I know the best solution is to make 1 material per building, and just use the AO like you said, but im after a multi material solution.

    I worked on a custom engine a lot that besides the main diffuse material(s) it would need a single AO only material per mesh that only had the AO texture hooked up to it.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Right click on the ao texture, "convert to parameter". Now if you make a material instance from this material, and open it up, you will see the ao texture can be changed in the instance. Or you can do the same with any other texture and leave the ao. I'm not entirely sure anymore if I understand your setup correctly. But either way, you can have those parameters and change a thing that you want to, in the instance.Why are you plugging a base color texture into the normal input by the way?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    If your mesh have 5 material, 5 unique texture sets, but the ao goes with a secondary uv channel, you can add 5 materials with the different textures, and reuse the ao. So just put the same ao into all 5 of them.
  • Shockpuppet
    Options
    Offline / Send Message
    Obscura said:
    Right click on the ao texture, "convert to parameter". Now if you make a material instance from this material, and open it up, you will see the ao texture can be changed in the instance. Or you can do the same with any other texture and leave the ao. I'm not entirely sure anymore if I understand your setup correctly. But either way, you can have those parameters and change a thing that you want to, in the instance.Why are you plugging a base color texture into the normal input by the way?
    Ah i had the base color texture wrong i realised after screenshot :)
    So, i convert the AO to parameter, set coordinate to 1 for my first material, looks like this:



    Im not sure about using a material instance? You mean make a material instance from the AO material? How do i apply that?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Please look up "creating and using material instances in unreal engine" on google. It will give you everything you need.
    https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/MaterialInstances/

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    AO isn't a material its a texture in a material. A component of the shading that comes from the different attributes of a complete material. Making the textures or the values to be a parameter allows you to change them in a material instance. So lets say you have a base material that has a base color and an ao texture. The ao texture is unique to the mesh, and the base color texture is some tiling wood for example, like on your image. And this material goes on one part of your mesh. Then the another part  would require brick texture but the same ao. Then you can make the base color texture to be a parameter, make a material instance, and only change the base color map, but leave the ao. So its an altered version of the original material. Only the values are different, but the way things are hooked up and connected, is the same.
  • Shockpuppet
    Options
    Offline / Send Message
Sign In or Register to comment.