OBJ bump map = blue textures?
-
WaxyChicken
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
OBJ bump map = blue textures?
Why are my textures coming out blue when i apply a bump map to them?
my map with out bump mapping in the OBJ loaded in irrlicht:
http://img440.imageshack.us/img440/438/ ... 111011.png
my map with bump mapping in the obj loaded in irrlicht:
http://img217.imageshack.us/img217/438/ ... 111011.png
my material node in Maya 2012 when bump map is applied:
http://img269.imageshack.us/img269/5639/grassnode.png
the texture in the screen shot:
http://img829.imageshack.us/img829/2743 ... round1.jpg
the bump map i'm applying
http://img36.imageshack.us/img36/8436/g ... d1bump.jpg
if i understand this post correctly then bump maps are supported in .obj + irrlicht
http://irrlicht.sourceforge.net/forum/v ... hp?t=43920
(stefbuet, 2nd from last post)
so what am i doing wrong?
my map with out bump mapping in the OBJ loaded in irrlicht:
http://img440.imageshack.us/img440/438/ ... 111011.png
my map with bump mapping in the obj loaded in irrlicht:
http://img217.imageshack.us/img217/438/ ... 111011.png
my material node in Maya 2012 when bump map is applied:
http://img269.imageshack.us/img269/5639/grassnode.png
the texture in the screen shot:
http://img829.imageshack.us/img829/2743 ... round1.jpg
the bump map i'm applying
http://img36.imageshack.us/img36/8436/g ... d1bump.jpg
if i understand this post correctly then bump maps are supported in .obj + irrlicht
http://irrlicht.sourceforge.net/forum/v ... hp?t=43920
(stefbuet, 2nd from last post)
so what am i doing wrong?
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
-
shadowslair
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
Re: OBJ bump map = blue textures?
Umm...
1) Do you apply some of the Irrlicht material types that use normalmap? (like for ex. similar to the one in 11.PerPixelLighting.exe example)
2) Are you using some shader?
After you do one of the above you gotta have some light correctly set up.
This ain`t an artists` community, neither a seers` one. Pictures will definitely help, but please show us some code. Especially the one where you set up your material and put the normalmap.
1) Do you apply some of the Irrlicht material types that use normalmap? (like for ex. similar to the one in 11.PerPixelLighting.exe example)
2) Are you using some shader?
After you do one of the above you gotta have some light correctly set up.
This ain`t an artists` community, neither a seers` one. Pictures will definitely help, but please show us some code. Especially the one where you set up your material and put the normalmap.
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
-
hybrid
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: OBJ bump map = blue textures?
There's some support for automatic loading of bump maps in .obj files. But this requires a certain setup. It looks as if your normal map is simply used as diffuse map, probably nothingmore. Please also upload the .obj file and, more important, the material file.
-
WaxyChicken
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
Re: OBJ bump map = blue textures?
shadowslair wrote: 1) Do you apply some of the Irrlicht material types that use normalmap? (like for ex. similar to the one in 11.PerPixelLighting.exe example)
you were both right.hybrid wrote:It looks as if your normal map is simply used as diffuse map, probably nothingmore.
Because my materials were not set up correctly the bump was being treated as a diffuse (engine default, i'm guessing).
now once i get the lighting bugs out it should solve the problem.

each bump is applied to each surface correctly.
the part i still have a question about is:
multiple objects and textures/materials in the same .OBJ file.
is the bump-map for a Non-BumpMapped surface to default to the {first-or-last} bump-surface in the mtl file?
for example- the ground areas have bump maps and are now being rendered correctly (with exception of my lighting glitches)
but the building surfaces have no bump maps applied yet.
but the surfaces in the building are defaulting to one of the other bump maps.
as seen here:

so are material effectors for an OBJ file a "All-Or-None" condition?
as in - "all must be diffused, or none must be diffused mapped. All must be bumped mapped or none must be bumped mapped."
Apologies if these questions sound a bit dense, but it's my first time trying to do lights, shadows, sharers in a 3D app.
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
-
shadowslair
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
Re: OBJ bump map = blue textures?
Let`s say you have "N" count materials in your model. If its made of different meshbuffers, each of them points to different material in the [0, N] interval. Then, in each material you have some texture layers. So, for example for material "i" you`ll have sth like:
The way the materials are assigned to the corresponding meshbuffers depends on your modelling application. And the way the texture layers will be used depends on your application.
Code: Select all
node->getMaterial(i).setTexture(0, Driver->getTexture( "diffuseMapHere.jpg" )); // Texture layer 0
node->getMaterial(i).setTexture(1, Driver->getTexture( "normalMapHere.jpg" )); // Texture layer 1"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
-
WaxyChicken
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
Re: OBJ bump map = blue textures?
Gotcha. 
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
Re: OBJ bump map = blue textures?
The material file (.mtl) contains the specification for the materials. If you have a separate material for each part of your object, it will have different properties. There is no "globbing" of materials. The OBJ file loader creates a new mesh buffer for each material in use.
Look in your material file and see if you can explain what you see.
Look in your material file and see if you can explain what you see.
-
hybrid
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: OBJ bump map = blue textures?
Although I'm not sure if the bump map support is working correctly in all cases. Again, just upload the files somewhere and I can have a look.
-
WaxyChicken
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
Re: OBJ bump map = blue textures?
http://www.megaupload.com/?d=Q3FKB3W0
info in the .txt
all OBJs are the same physical mesh with exception of "Sample-Obj-Bump"
exported from Maya 2012
info in the .txt
all OBJs are the same physical mesh with exception of "Sample-Obj-Bump"
exported from Maya 2012
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
-
WaxyChicken
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
Re: OBJ bump map = blue textures?
problem has been found - a stray material command was floating around.
your obj loader is a work of art
your obj loader is a work of art
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.