Archived

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

Xero-X2

Preventing Seams in CubeMapRenders

Recommended Posts

hello, I have implimented a sky render-er, and I made it so I can capture it into a cubemap, and in doing so I get seams because the projections dont match up perfectly. Im using 90 fov like I should be but the 3d sky objects dont matchs up when re-rendered using the cubemap on a skydome. Any ideas on how to prevent these aweful seams? Addition: It mainly happens where the Images meet in the corners. Heres a screenshot of it, its not that visible in this particular shot, but I hope you can see it. "I seek knowledge and to help those who also seek it" [edited by - Xero-X2 on May 18, 2004 11:16:48 PM]

Share this post


Link to post
Share on other sites
Enable texture clamping when you load the textures for the skybox.
Like so...

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);


Basically, texture clamping prevents blending with the other side of the texture like what you''d want with repeating / tileable textures.

I think you can disable it by using GL_REPEAT in place of GL_CLAMP_TO_EDGE, but you may wanna check on that one.

Share this post


Link to post
Share on other sites
Already tried that, the rendered images them selves dont match, I need help with that, Im rendering the skybox images while in the game. using 90 degree rotations, and 90 fov for every box side.

"I seek knowledge and to help those who also seek it"

Share this post


Link to post
Share on other sites
Yes, the aspect ratio is 1.

"I seek knowledge and to help those who also seek it"

[edited by - Xero-X2 on May 19, 2004 4:35:24 PM]

Share this post


Link to post
Share on other sites
You have to slightly adjust the FOV to make the edges of the texture exactly match the other one. It''ll be a bit higher than 90 degrees. This is because the *middle* of the edge pixel has to be at a 45 degree angle... the correct FOV is something like 2*atan(Texwidth/(Texwidth-1)) Even this won''t be quite perfect but it may be smoother.

Share this post


Link to post
Share on other sites