How Many Textures does this Material Use

Home Forums Graphics / Blender How Many Textures does this Material Use

This topic contains 5 replies, has 4 voices, and was last updated by Ivan Lyubovnikov Ivan Lyubovnikov 1 month, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20355
    Avatar
    jem
    Licensee

    Hi Soft8soft team,
    There have been a few threads here on the forum about the limits of materials on iOS. iOS only supports eight texture per material. I want to have a better understanding of how many textures my materials use so I can stay under this limit. I thought that counting the textures might be simple, but it is not. For instance, Yuri mentioned that color ramps are baked into textures upon export. Or, a light source that casts a shadow requires a texture, so I have two questions on this topic.
    1. Are there any other special case shader texture uses (like the color ramp node) of which we should be aware when counting textures?
    2. Could you tell me how many textures are used by the material in the attached screenshot? It is from the scooter example. It is the leather material. I see that there are three image texture nodes, but the middle node is used three times (for AO, metalness, and roughness ). Also, what about the normal map, is that part of this calculation?
    Thank you.

    Attachments:
    You must be logged in to view attached files.
    #20357
    D3Pixel
    D3Pixel
    Licensee

    While waiting for a better answer…

    That middle texture is using “Texture packing” which can use different colour channels of the image for Metallic/Roughness. Red is AO.
    This is a good read on that: https://www.khronos.org/blog/art-pipeline-for-gltf

    You can also open the gltf in a text editor as it is in JSON format. Search for “Material” to see what the exporter is exporting or search for “textures” to see what files it expects.

    You can also install “Visual Studio Code” and then install the gLTF Tools addon which allows you to see the properties of a material like texture count etc
    https://marketplace.visualstudio.com/items?itemName=cesium.gltf-vscode

    • This reply was modified 1 month, 3 weeks ago by D3Pixel D3Pixel.
    • This reply was modified 1 month, 3 weeks ago by D3Pixel D3Pixel.
    • This reply was modified 1 month, 3 weeks ago by D3Pixel D3Pixel.

    3D Animation and Web3D services - www.d3pixel.co.uk

    #20365
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Are there any other special case shader texture uses (like the color ramp node) of which we should be aware when counting textures?

    First of all, we always got an environment texture (even if we don’t use one explicitly, it is still created out of background color for the purpose of image-based lighting). So we really have 7 textures at our disposal on iOS.

    Then, the following shader nodes take a texture each:
    Image Texture
    Color Ramp
    Vector Curves
    RGB Curves

    Finally, if a light source casts shadows, it takes one texture slot too.

    Could you tell me how many textures are used by the material in the attached screenshot?

    That material uses 3 Image Texture nodes plus one environment texture = 4 textures in total. The Scooter demo does not use any light sources nor real-time shadows.

    I agree that having knowledge about the actual texture count would be very useful for cross-platform deployment. We’ll think about possible solutions. I’ve added a task to our dev tracker too. Thanks for the feedback!

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #20366
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    That middle texture is using “Texture packing” which can use different colour channels of the image for Metallic/Roughness. Red is AO.

    Yep, packing image information into RGBA channels is always a good idea – saves video memory too!

    Thanks for the links!

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #20372
    Avatar
    jem
    Licensee

    Yuri, thank you for the explanation. It will help me with my projects. :good:
    @3DPixel, I will check out the Visual Studio Code extension that you linked to today. Thank you.

    #20396

    Hi,

    We’ve just added a warning message in the browser console showing which objects/materials use more than 8 textures (iOS limit). Should be available in the next pre-release.

    warn.png

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.