Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question materials and LODs

Discussion in 'Universal Render Pipeline' started by steveh2112, Aug 7, 2023.

  1. steveh2112

    steveh2112

    Joined:
    Aug 30, 2015
    Posts:
    314
    i've just started setting up LODs in my scene and i have a house wall that's fine LOD0

    its composed of a wall with a brick material and i use tiling on that. then there's a window which has wood and glass textures.

    i want to make a LOD1 version which is simply a plane, done, but how about the combined texture of tiled bricks, wood and glass? right now i'm just zooming in to the wall in ortho view on the editor and taking a screen shot and using that for the LOD1 texture, and it kinda works, except brightness and saturation don't look right so its easy to see when the LOD level changes.

    any idea how to make the combined texture to perfectly map the uncombined (beside going into photoshop i guess)

    thanks
     
  2. pixelChisel

    pixelChisel

    Joined:
    May 19, 2016
    Posts:
    17
    So if I understand this correctly, you want to bake textures for your LODs directly from the Unity viewport?
    If you're getting color differences between the actual textures and the screenshot textures, without having an actual image illustrating the issue, my first guess is that maybe your lighting setup is influencing the output?

    When baking textures, you usually want textures that have not been influenced by lighting, so that the textures don't look overexposed when placed in the context of a lit scene.

    One way I'd do that is to setup a series of materials that will only be used for baking.
    Duplicate all the materials whose texture sets you need to bake, and set the shader on the copied material to "Unlit."
    Apply those materials to your object, and take your screenshot.
    This will ensure that only the colors from the textures get saved.

    If you have normal maps or mask/material maps (i.e. metalness, glossiness, AO) you'll have to bake them the same way, by sticking them into the "base color" slot of an unlit shader.
     
  3. steveh2112

    steveh2112

    Joined:
    Aug 30, 2015
    Posts:
    314
    i want to make a material for the LOD1 model which is a combination of all the materials used on the LOD0 model.
    i don't want to do it in unity viewport, i'm thinking i need to do it in photoshop but that will mean tiling a bunch of textures and stuff but i don't see a more automatic way to do it

    i guess my problem is i'm tiling the brick wall texture in the material in unity, not in the UV map in blender. if i did it there i could render in blender, but probably have the same problem with color balance not matching so i think photo editing may be the only way

    BTW, i don't care about normal maps for LOD1, i doubt you'll see them from 10m away anyhow