0 votes

I have modeled a cube* in Blender which I want to use as a section of a wall in a 3D GridMap. The problem is that in Godot, when I apply the texture, I cannot get four consecutive faces on any axis to have the texture in the right orientation. That is, on one of the faces, the brick texture always has the wrong orientation.

I have tried different things with UV unwrapping in Blender. In there, I can get the brick texture to align horizontally along all four vertical faces, but when I import it to Godot and apply the texture, it is at most horizontal along 3 faces.

enter image description here

**OK, admittedly it's the cube from the default scene; I didn't actually "model" it :-D*

These were my settings when I exported the .obj from Blender (they are the defaults):

enter image description here

in Engine by (115 points)
edited by

Did you check that you exported the model with an Y-up setting?

I checked that. It seems to be the default when exporting .obj in Blender: http://i.imgur.com/ao2hUE5.png

Please see my answer. I found that when playing the game, the faces on the sides were all aligned the same way (but wrong orientation), not like displayed in the editor! So I just rotated the texture, but not sure if that is the optimal solution.

1 Answer

0 votes

So this is probably not the perfect solution, and something I tried avoid doing, but anyway:

When I run the game, I noticed that, unlike in the 3D view of the editor, the brick pattern is going down (wrong orientation) on each side of the cube.

I actually had the same thing in Blender, but to fix that, there is an option under the texture properties, in the "Image Sampling" section, called "Flip X/Y axis", which did the trick.

I did not see anything similar in Godot under the material settings, so I resorted to the only other thing I can think of doing, which is to rotate the texture by 90 degrees.

enter image description here

Now, when the game is running, at least the texture is aligned the right way on all sides.

enter image description here

I am not sure this is the best solution, so if you have any better ideas, please add them.

by (115 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.