UV Maps not getting exported into unity

I mapped image textures onto some buildings I made in Blender.

I used boolean modifiers to make the buildings look destroyed, added material to the fractured parts and applied the modifier.

Then i made a collection of all the buildings and exported them as a collection using the FBX export window

Now I wanted to import them into unity.
This is what i’m getting:-

The material on the fractured surface is being recognized by unity but not the UV map I used on the buildings. How do I fix this?

Do you mean the textures? UV maps are part of the mesh and just defines where on the texture each vertex lies. When you import the fbx into Unity there’s a Materials tab where you can extract the materials and textures from the fbx
image
I usually ignore the materials because it’s very possible and easy to make materials in Blender that’s not supported in Unity. Just extract the textures, make a new material in Unity and assign the texture to the Albedo of the material. Then assign the material to the relevant slots on the model

Yeah i figured it out now.

  1. Import the FBX file into unity
  2. Extract the materials
  3. Import the images we used as textures
  4. Assign each image in the albedo section of the corresponding material

This is what i understood. We can add our normal maps, bumpmaps etc as well into unity
Thank you!!

Btw one more thing…

Suppose im creating a tile with a texture and a normal map. I import it into unity and add the materials etc. Now i want to offset the material in some tiles for variety. How do i do that?

Because if i offset the material itself, it would apply to all instances of the model right?
Should i make different instances of the same object kinda like a nested prefab?

Because im making a tower defense game, i need the environment to be tiled. I can add props but the base must be tiles so any way to get variety without losing the tiled layout?

When you change the tiling on the material it changes the material, so everything that uses that material gets the change. Unfortunately, the only simple way I know of is to make copies of the material and offset each. Then apply the material to each piece. It’s not ideal, but it’s the simple way.

More complicated ways would include

  1. creating a script that would make a new instance of the material in Awake and then set the offset based on the tile position (some integer math should work) - this is the same as above but automated and performed at runtime only
  2. writing a shader that looks at the object’s position and calculates what the offset should be (like point 1), or
  3. writing a world-space shader. this one looks a little strange when you are building your scene because the tiles move around but the material stays right where it is… Now that I think of it, point 2 will do something similar

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms