Preventing Seams in CubeMapRenders

Started by
4 comments, last by Xero-X2 19 years, 11 months ago
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]
"I seek knowledge and to help those who also seek it"
Advertisement
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.
------------------------------yage3d.net—a free 3D game engine written in D.listpod.net—a community powered web 2.0 site of lists.
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"
"I seek knowledge and to help those who also seek it"
and the aspect ratio is 1?
f@dzhttp://festini.device-zero.de
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]
"I seek knowledge and to help those who also seek it"
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.

This topic is closed to new replies.

Advertisement