[RESOLVED] Textures appearing as a flat color


#1

This is what happens when I try to texture something.


I am just getting a flat color while using a diffusemap and no normalmap is appearing either, I am using Lighting.j3md.
Any ideas what i am doing wrong?


#2

We’d have to see “what you are doing” to know what’s wrong with it.

What do you mean when you say “I try to texture something”. There are roughly 135863894659246597825 to interpret that, I guess.


#3

Sorry, apply a texture to a box (the yellow things) using a diffuse map and a normal map.


#4

Your code looks fine from here.


#5

no uv mapping coords on your objects perhaps ?


#6

The texture & normals use the entire image, there shouldn’t be any UV mapping.


#7

Looks like what’s in the picture :stuck_out_tongue:

You imported this from something then applied texture with what code exactly?


#8

You don’t understand what UV mapping is for, then.


#9

How does UV mapping work?


#10

UV coordinates tell which coordinate in the texture maps to which vertex. When you don’t specify a UV coordinates then you are saying that all vertexes map to UV coordinate 0, 0… which is the effect you have. one texel stretched over the whole shape.


#11

Thank you, sorry


#12

Can we mark this topic as “resolved”?


#13

yes