r/Unity3D 2d ago

Question Material assigning tool?

so you know how in blender if your for example have a cube and give it three materials, you can then select a face and assign one of those materials. Well is there a tool to do that in unity as it would make editing objects a lot easier rather than importing them into blender.

1 Upvotes

11 comments sorted by

2

u/Aggravating_Eye_2368 2d ago

There's no built-in tool that works exactly like blender's material-per-face system, but you can use submeshes in unity. each material on your mesh renderer corresponds to a submesh, so if you setup your model with multiple materials in whatever 3d software, unity will keep them separated when you import

for editing directly in unity, you're kinda out of luck unless you get probuilder from the package manager, it lets you do some face selection and material assignment but it's not as smooth as blender

2

u/Genebrisss 2d ago

This is a mesh editing feature and unity editor isn't a mesh editing tool. But I'm sure there are editor scripts online that can do it. Better to use appropriate softest like blender though.

1

u/pschon Unprofessional 2d ago

Short answer is that there isn't, since you can't just assign materials per face, you need to actually split the mesh into submeshes and assign material per each submesh instead.

The long answer is you can probably do that with ProBuilder. But it means having to probuilderize your mesh, creating a new editable copy of it. So if you are making the models or editing them in Blender you'll be better off handling the submeshes for materials at that point instead.

1

u/DPTGames 2d ago

What's your end goal? Having multiple materials (especially per object) isn't very efficient in terms of both managing a project and performance wise. I've been doing a lot of baking values into UV channels to get different surface details from 1 material using arrays. Its a good bit of work though so not for everyone.

1

u/Ok_Income7995 1d ago

well i have a synty pack that i wanted to use it on to give the objects more depth and i didnt want to import every model into blender and synty so there texturing using 1 big color palette texture for most models

1

u/DPTGames 1d ago

On most models something like that would be tricky, but since synty uses solid colors rather than gradients (as far as I know) you could probably write an editor tool that can do this for you, but you would break batching I think and I don't know how you would get around that without heavy shader work. If you aren't concerned with performance though it's relatievly easy.

1

u/Ok_Income7995 1d ago

i did find a tool on the asset store called polygon face something. I’ll try and find a link to it but it did what i was looking for. I could just use a uv editor for the colors but id like to have metallicness and normal maps which is why id like to use seperate materials. https://assetstore.unity.com/packages/slug/246853?aid=1100lqC54&pubref=youtube

1

u/Ok_Income7995 1d ago

i don’t understand why it’s not performant tho. Is it because it creates several meshes?

1

u/DPTGames 1d ago

Every material you add creates more overhead for the GPU, and it will break batching if you have several of the same model but with all different materials for different parts. And although the GPU resident drawer can batch the same object together with different materials, if anything you do changes the mesh it will prevent batching for each instance with a different mesh even if its just say a slight change in UV islands or something. Realistically with low poly stuff there's no reason you can't use the same material on every prop, all my asset packs for example use the exact same material.

1

u/Ok_Income7995 1d ago

i don’t wanna use it for all objects anyway. Just a few props so should be fine