Blender materials question

Hi,

Ok… So I’ve been making some meshes in blender which I’m planning on importing into unity. I’m a bit of a noob when it comes to blendering and unitying, and I can’t really find a good way of assigning different materials to different faces of my mesh in blender so that it works in unity. In unity, in the mesh renderer component I can see its an array variable, so you can have more than one material, and I’ve seen other people’s meshes where different materials are used for different faces of a mesh and the materials are all listed in there. So far I’ve only found how to have one material per mesh, which is kinda annoying. Does anyone know of a way to have different materials for different faces in blender that’ll also work in unity?

Also, this might not exist at all, but if it does it’d be totally awesome. Does anyone know if it’s possible to make a mesh in blender with materials like… fading into each other? so what i mean is like, instead of like 1 material per face, if there can be like a gradient where one material fades into another? like if you imagine the vertex painting thing, but instead of painting on colours you could paint on materials? of course, it needs to be something which will also work when i put it into unity after exporting it to an .fbx file…

Sorry about the noobishness of this question

thank you very much for reading all of this, and happy Unitying! :smile:

Hi, I’ve made a little image explaining the steps needed if you literally want just a different material on each face. If this doesn’t answer your question, or has any spelling mistakes, sorry!

Regarding materials fading into one another, I would first ask you to look into specular/gloss (all types of texture) maps, which control the shinyness of an object (sorry if you know this but you said you were a noob haha), which might be what you’re looking for. If not, I believe you can UV unwrap a model, give it a colour texture (a different colour corresponds to a different material, and you paint the colour where you want that material to show) and then use a shader to assign the material via the colours in the texture. I can’t give you this shader, or write you one, because whilst I’m quite fluent with Blender, I’m a total noob with shaders. I believe there is one on the web, or the wiki somewhere though. Just google ‘Unity shader assign material via texture’ or something like that and I’m sure something will show up :smile:

If not, the only other thing I can think of on the fly right now is maybe vertex weight painting with materials. I don’t do much with weight painting though, so I don’t even know if Blender allows you to assign materials like this. That’s just a thought, can’t confirm it :slight_smile: Considering how open Blender is though, I’d be surprised if Blender didn’t do this in some way - Unity’s probably the limiting factor in that regard. I’m sure someone else can correct me and chip in though.

Thank you so much! This is really helpful, useful stuff! I can’t believe how quickly I got a reply as well - and a really detailed one! This has got to be the nicest community on the internet.

No problem! Glad I could help.
The unity community is fantastic, uber helpful and very friendly. I recently decided I’d try and be more active on the forums, just to give something back considering how much I’ve learnt from them. I thought I’d try and answer some questions to help beginners out. Blender’s probably my best area, so I thought I’d start in this forum! :smile: It’s nicer when you answer questions and get a grateful response from people like you rather than ‘K thnx’ haha
Good luck in whatever projects you’re working on! :slight_smile: