Ursina engine texture mapping

Question:

So the problem I’m facing is that I cannot figure out how to apply textures to a model in a way that texture would be different on each side. For example I wanted to create Minecraft like grass blocks with bottom being brown, sides – green and brown and top – green. I already searched up this issue and found that it is possible to use UVs but I cannot figure out how. I already tried creating UV map in Blender then exported it and put it both as a texture and model and other combinations however it did not change the model so I let it be built-in ‘cube’ and changed just texture but it literally just put the UV’s .png file on all sides.

Asked By: Matiiss

||

Answers:

uvs are in model definition not texture.

make sure that you have only one uv in blender and unwraped model (default cube is not unwraped).

when you import from blender to ursina it should import uvs as well (around line 224 here)

then you should apply the texture to mesh

Answered By: szczur0

Also, you can use Microsoft’s 3D Builder to build models and Paint 3D to paint it. Re-import it to 3D Builder to save as a .obj with a .mtl file and a .png texture map. It works for Ursina as I’ve tried.

Answered By: SamTheProgrammer
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.