I’ve just implemented cubemapping in my engine, and everything seems to work fine except that the maps are flipped verticaly. I’ve checked that the loading is working as it should, I bind the right stuff and so on. Anyone got a tip on this?
nay. tga. the loader is working fine, been using it for six months.
Does your TGA loader actually flip the image when required, or all the time?
Most programs save TGA’s flipped, but ACDSee sometimes does it the other way.
Are you calculating the cubemap coords in a vertex program, or letting texgen do it?
texgen is calculating (using refmap-ext)
the loader loads and sets all TGA images the right way. when i bind a texture to a quad it shows like it should, and the texture loading method is the same that I use when I load the cubemap files.
Cube maps orientation is very weird, it’s based on Renderman standard.
NVIDIA has some info on this in the SDK. But I dunno where exactly.
Cube map orientation isn’t weird IMO. It in fact seems the most intuitive to me.
Anyway, to check that indeed the cubemap is correctly loaded, map it onto a simple cube around in the origin and use texcoord = vertex.
well, it’s not that weird but it can be disorienting when using cubemaps for the first time.
I mean, if you check NVIDIA demos, almost each one uses a different orientation. Can be puzzling.
So, one advice: do not use NVIDIA demo file (dds) to check that your orientation is ok.
Check this thread: http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/004760.html
cass’ post will help you. The NVIDIA doc is correct.
When we load cube maps that were exported / generated from 3D Studio max, we were forced to flip them. Maybe you are having the same problem …
Just for the heck of it, I updated that ppt to show why the cube map orientation makes sense for right-handed coordinate systems where images are specified with their origin in the upper left corner.