Material not showing on some objects

So I just downloaded a seamless texture, slapped it on the “Albedo” of a new material, and applied it to a character model, but the whole thing is just a flat color, and doesn’t actually show the texture.

This doesn’t happen with the Unity models (cube, sphere, cylinder, etc.), and the texture looks fine. It also works on some small parts of the character (head), but not on the bigger ones (torso).

1 Like

Some objects require multiple materials. You can check the Materials section of the Mesh Renderer. Some materials may be missing.

What other material do I need, aside from the texture one?

Don’t forget dudes.
A texture and a material, are two different things. :wink:

A material, is what gives an object and a texture, a certain look or appearance.
eg. A material, can make a wood texture, look like real wood, or, make it look
like a shiny plastic looking wood object.

A texture, is a like an outer skin, that makes an object, look like something
from the real world, or other.
eg. A wood texture applied to a cube object, makes it look, like a block cube of wood.

But, put a flower texture on that cube object, and it might look like a toy block.
Or something unusual or alien looking.:hushed:

And as I mentioned before, the material, plays a big part, in how that cube object
with a wood texture applied, will appear to look.
And can even make the wood texture, look real, fake, glassy, plastic looking
or toyish.:smile:

2 Likes

Guess I should’ve called it “Texture not showing on some objects” in that case.

1 Like

That sound like a uv map issue. If the model does not have a propper uv map unity can not display the texture the way you like.

1 Like

Would it be better to create a UV map (in something like Blender) and export it as a whole file, or just take the UV map on it’s own, and somehow apply it to the model inside Unity?

And if it’s the second one, how do I apply/assign a UV map onto a model in Unity?

The uv map is part of the mesh and can not be brought in seperatly.
It defines on what vertice what point of the texture is mapped.
And yes you would need to do that in the 3D modeling application of your choice.
Normally if you buy a Model is has already a working uv map for the character textures.

Thanks for that. Just needed clarification since I haven’t worked with UVs much. :slight_smile:

So if I have a model that does not have a UVmap, I cannot just add/create one. Is there a way around this? I work in a research project of psychoacoustics in VR environment. The colleague that created the rooms is not working in our department anymore, so I do not have access to the original models (nor I am familiar with SketchUp or other similar software). Thanks in advance.

It’s possible with scripting. I think you have to set read/write enabled in the import settings for the mesh. then you can access individual vertices, including the u,v values.
https://docs.unity3d.com/ScriptReference/Mesh.html

As to what you actually set the U,V values to, there are different ways to compute these, such as tri-planar projection. If you’re going to do that though, you might as well just find a shader that automatically does this already and save you the trouble of scripting.

I haven’t tried this one yet, but it looks good:
https://github.com/keijiro/StandardTriplanar

The advantage to using the shader is that you don’t even need uv coordinates anymore. The only problem with this is you don’t really have any control over how the texture is applied to your geometry. If you need that sort of control than you’d really need to create the uv coordinates in some 3D modelling software, such as Blender,

2 Likes

No need to use a 3D modeling program if you just want to modify UVs.

Just use ProBuilder…it’s an asset that is now part of Unity. You can easily modify the UVs and save them.

By the way, providing images of your issue helps to get your issue across much easier.

One more note: are you sure the model doesn’t require two or more materials? The materials slot is an array, so it can hold more than one.

1 Like

Yes, you can. Just go into Blender (I say blender because I don’t use any other 3d modeling software) import whatever model you do have that needs the UV, smart unpack the project, create a new material with a uv image. Texture paint it, pack all into .blend file and then export the model back into Blender and import the UV texture (which is likely a .png) once in Unity.

I just downloaded a 3D asset of walls but all objects are pink in fact when I make a new material /legacy shaders/deffuse and add my texture then material is also pink…pls help…

This shader you mentioned works perfectly! it solved my problem!

Just used this on IFC files exported from Revit, it was pretty much the last thing that needed to be solved for a simple import from Revit to Unity for architecture models as I’m not currently getting UV maps from the IFC models. Thanks a bunch, as you mentioned there isn’t a whole lot of control but at least with most architecture materials they are just tiled.

Guys! Thank you so much for pointing me to Triplanar Shader. It made my day! =))