Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Emilio Moretti |
Hi, I’m not seeing textures when I import a custom tile with a texture into Godot.
These are the steps I followed
- Imported a .obj tile from the Kenney - Extended Nature Pack into Blender 2.80 (it’s a box. no more no less)
- Removed all materials
- Went to UV Editing:
- Loaded my texture
- Unwrapped the box
- set the UV mapping the way I wanted it to look with my texture
- Went to Modeling
- Selected the top face of the tile (the two triangles)
- Added a Texture material with UV coordinates
- The render looks good. The texture is shown in the top face.
- I export the .obj file.
- I copy the texture, the ‘textured-tile.mtl’ and the ‘textured-tile.obj’ files into the godot project
- I drag the object from the list of assets into the scene
- The texture is missing.
Did I miss any step to make it work? I thought that was all I needed. Am I supposed to export it differently?
I also tried copying the texture into the project, and updated the .mtl file to fix the path location, but it didn’t work.
I exported it as Collada (.dae), and it worked on first try, but it adds an entire scene, an animation player, and a mesh. I just wanted the mesh. The mesh is also rotated, and I haven’t found a way to lay it as floor yet, because changing the transform actually changes the entire gridmap plane.
Thank you in advance
I didn’t fix this, but it’s partially working with the collada format, since .obj textures are not shown. The model rotation is broken and I have to manually fix that when laying down the floor, but at least I can use it. The .dae and .tscn files are easy enough to modify, so I took one model, with one scene + collissions… and used a script to create 160 copies with different textures. I just had to make sure the internal materials had different names. It’s definitely not a good fix, but at least I’m able to export a usable gridmap with 161 different textures.
Emilio Moretti | 2019-05-09 17:32