Home › Forums › Graphics / Blender › How Many Textures does this Material Use
- This topic has 5 replies, 4 voices, and was last updated 5 years ago by Ivan Lyubovnikov.
-
AuthorPosts
-
2019-10-15 at 8:56 pm #20355jemCustomer
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
2019-10-15 at 9:18 pm #20357D3PixelCustomerWhile 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-gltfYou 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-vscode3D Animation and Web3D services - www.d3pixel.co.uk
2019-10-16 at 8:32 am #20365Yuri KovelenovStaffAre 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 CurvesFinally, 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!
2019-10-16 at 8:34 am #20366Yuri KovelenovStaffThat 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!
2019-10-16 at 10:10 am #20372jemCustomerYuri, thank you for the explanation. It will help me with my projects.
@3DPixel, I will check out the Visual Studio Code extension that you linked to today. Thank you.Jeremy Wernick
2019-10-17 at 9:26 am #20396Ivan LyubovnikovStaffHi,
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.
Attachments:
You must be logged in to view attached files.Co-founder and lead developer at Soft8Soft.
-
AuthorPosts
- You must be logged in to reply to this topic.