Archived

This topic is now archived and is closed to further replies.

Cube mapping... which image is which?

This topic is 5112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, so, with this image (or similar) can someone fill in the ID numbers for each texture? I''m just not sure which texture should be loaded as which part of the cube map... I hope that makes some sense. If I''m being incredibly stupid please don''t refrain from telling me.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
______
| |
_____| nx |___________
| pz py nz | ny |
|_____ _______|____|
| px |
|_____|

??? maybe this will work (common sense only)

ps where did you get your textures?

Share this post


Link to post
Share on other sites
That one was on the nVidia website, but the one I''m actually using I made. But I''m slightly confused by your labels. I''m just looking for numbers 1-6 so I know which to store it as when I load the textures. I guess I can get it by trial and error fairly easily though.

Share this post


Link to post
Share on other sites

are you actually referring to a cube map or some sorta sky box? If you are refering to a cube map then what the previous poster gave you seems to be correct, logical atleast. If you mean a sky box then it doesn''t matter what order you load what, just display them in the correct place.

nx = negative x, etc all others with n
py = positive y, etc all others with p


p.s. you are being incredibly stupid

Share this post


Link to post
Share on other sites
Yes, I am talking about cube mapping, and all I''m wondering is that when you use

glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT + (some number), etc...

what values of (some number) correlate to which part of the cube (top, bottom, front, back, left, right).

Share this post


Link to post
Share on other sites
just look in the header what the constants are..

but to help you, this is the order
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515; (right)
GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516; (left)
GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517; (top)
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518; (bottom)
GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519; (behind camera)
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A; (in front of camera)


values inside () suppose you are inside the cubemap

[edited by - MazyNoc on December 16, 2003 2:35:20 AM]

Share this post


Link to post
Share on other sites