Parallax - colormap texture does not line up with normalmap

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
freegadgets
Posts: 10
Joined: Sat Dec 04, 2004 6:37 pm
Location: Canada

Parallax - colormap texture does not line up with normalmap

Post by freegadgets »

I just took the demo that comes with Irrlicht and changed the room to an obj model I made. The color map is correct but the normal map seems to repeat many times in both directions. The obj model only has one set of texture coordinates, so where is the normal map getting its texture coordinates from, and how can I make them the same as the color coordinates?
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Usually the obj loader should put the first coords into the 2nd coord layer. I'll check with the code, but it might also help to provide an executable with the mesh to test.
And don't forget to test with OpenGL...
freegadgets
Posts: 10
Joined: Sat Dec 04, 2004 6:37 pm
Location: Canada

Have a look

Post by freegadgets »

I'm using the same stone wall texture and height map as the demo, both load in successfully. I thought the normal map was repeating, just really small, but after a closer look, it seems to be made from random data. So this error probably has nothing to do with texture coordinates.

Image

At the top of the screenshot you can see the parallaxed polygon close up. Below that is the same material seen from a distance. The parallaxing and per pixel lighting are working but the normal map is messed up...
freegadgets
Posts: 10
Joined: Sat Dec 04, 2004 6:37 pm
Location: Canada

Post by freegadgets »

It's this line of code that doesn't seem to work:

driver->makeNormalMapTexture(normalMap, 9.0f);

But no worries, I was able to make the normal maps using a separate program and load them in directly.
Post Reply