We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

How Many Textures does this Material Use

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

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

    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.

    Jeremy Wernick

    #20357
    D3Pixel
    Customer

    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

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

    #20365

    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!

    Chief 3D Verger | LinkedIn | Twitter

    #20366

    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!

    Chief 3D Verger | LinkedIn | Twitter

    #20372
    jem
    Customer

    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.

    Jeremy Wernick

    #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.