displaying large textures (composed from small ones)

Started by chriddle, March 09, 2005, 10:08:06

Previous topic - Next topic

chriddle

Hi there,

I'd like to display some kind of video sequence in my game. therefore we rendered it (taken from 3d studio) in 512x384 resolution (to use less RAM in the game).
then we cut the frames in pieces of 128x128 (4 horizontal and 3 vertical) to display them as textured rectangles in opengl.

so far so good - it works perfectly when I show the video in 512x384. but when i display it in 800x600 (so every piece is zoomed to 200x200) we see small horizontal and vertical lines between the texture pieces  :(

i ran a search through this forum and red something about "clamp_to_edge" but it doesnt changed anything  :?

anyone can help?

here's a screenshot of the video (and the hor. and vert. lines):


thanks in advance,

chris

Fool Running

Are you applying texture filtering to the textures? (Bi-linear, Tri-linear)

I think the lines are sometimes a result of filtering.  (I could be wrong  :lol: )
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

chriddle

yep! perfect answer!!!   :D

i found the following lines:
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);

GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);

and i changed them to:
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);

GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);

now the lines have disappeared  :D
i only hope that it doesnt slow down the rendering.  :?

thanks a lot

chris

princec


Chman

.. but you'll get a horrible result if you zoom on the texture ...

Chman