GLSL texture won't appear in the viewport?

I’m using glsl right now and I have attached the correct materials and textures to my floor. The problem is that the texture only appears when I start the game engine but not in editing mode. If a make a brand new mesh and attach the floor texture to then it appears fine, but not when I attach the same texture to the mesh I’m already working on.

This picture will probably explain everything better.


Here is my file.
GLSL texture.blend (440 KB)

As far as I know the settings between them are exactly the same, but only one of them displays the texture when I’m editing in glsl mode. Does anyone have any idea why?

:smiley:

The texture is on the other side.
Your normal is facing down.

If you flip the small mesh to the side that the light is aiming at, then that side also becomes black.

Also, if you notice, the bigger mesh displays the correct texture in editing mode no matter which direction you see it from, so I don’t think the direction the mesh is facing at has anything to do with this problem.

You are right, never said so though :smiley:
My fault I´ll be more specific.

I rephrase:
The normals are facing inward.

Your right plane is no plane, its a squashed cube.
The normals are inside, so you either extruded to the wrong direction, or moved the top plane of the cube down through the bottom.

Just select the small mesh, go into edit mode <tab> and press <ctrl+n> to recalculate the normals outside.

btw you forgot to pack the textures in your blend (for the future):
File>external Data> make all paths relative
File>external Data> pack into blend

Thank you, kind sir. Flipping the mesh faces worked perfectly :slight_smile:

I’ve been scratching my head for hours over this yesterday, who knew the solution was this simple? Oh, well. At least I learned something new today. This problem has been plaguing a lot of other models that I have made so I will also try to flip and recalculate their meshes.

Also, thanks for the tip about packing the textures into a blend file. When I did that with my current file its sized jumped from 500 KB to 12 MB :eek:
I guess its because I was using high resolution textures and blender just packed them into the same file.

Exactly.
You simply can use a free tool like IrfanView and “batchconvert” them.
You can create a drag and drop list of the files and say, make them 20% the original size and jpg with 60% compression and store each file to the place where the original is for instance.
Keeps your filesize down for matters like this.
For every other collaboration you´ll need the full textures anyways.