Just wondering If I have some textures and I want to render them directly (flat texture without any lighting). What is the recommend approach in practice? In terms of cpu / ram usage, stability and control options.
There are 2 ways that I have known of:
approach #1: use StandardMaterial: set disableLighting to true. and connect texture to emissiveTexture.
approach #2: use PBRMaterial: set unlit to true, and connect texture to albedoTexture.
#1 vs #2 which one works better? Or are there any other approaches?
This question asked the similar topic but I don’t think it got solved.
Hi,
I believe ‘mesh.material.unlit = true’ is the way to go. Knowing that by using this method that will remove all light from the material and display it ‘flat’ in the colorspace, also means that the material you use has no need for anything depending on ‘light’ - Since, in the end (or better said prior to any processing) it will simply be ‘ignored’. So, you can use any type of material for it but you don’t need to set anything relying on light. Although, as said, it should have no impact on performance, since ‘unlit’ happens early in the process and will simply ‘ignore’ all materials settings relying on ‘light’.
I hope this helps and meanwhile, have a great sunday
I was just looking back at this post. Just to make this clear, when I said ‘is ignored’, this is at rendering level. Any texture you load to a material and any parameter you pass-on will still be in (and will affect loading time). So, the best way to go (I suppose), knowing that your mesh.material will be ‘unlit’ is to use the less heavy standard material and assign an emissiveTexture only.