Quantcast
Channel: Answers by "Noise crime"
Viewing all articles
Browse latest Browse all 90

Answer by Noise crime

$
0
0

If the model is a single mesh, with a single material you can just 'add' materials to its mesh in the inspector.

If you look at a model in the inspector with a mesh render component assigned you'll notice you can add further materials by setting the size value. Normally this is for use with mulit sub-meshes, but you can assign as many materials as you like.

Any materials > number of meshes will be applied over the top of the material assigned to the last sub-mesh (if you have a single mesh then its just applied over the top of it). Frankly its rather odd behaviour as although it works for single meshes, its no use for multi sub-mesh models as only the last sub-mesh will have the additional materials applied to it.

Its a bit hard to explain, but if you give it a go, it should become obvious. I asked a question about this behaviour myself, but never really got a good answer as to why it works as it does or if its even intentional.

If you have multiple sub-meshes then its unlikely to be of use, in which case writing a shader is your best. Although I guess you could always write some code to composite a sequence of textures into a final version, avoiding the need for a shader and reducing draw calls.


Viewing all articles
Browse latest Browse all 90

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>