PDA

View Full Version : Texture Problem on distance elements



uwi2k2
04-05-2011, 05:39 AM
hi,

i have a texture problem. sometimes on objects far away from my camara the texture looks strange..
i will add 2 screens : near and far.
i allready use mipmaps but that does not solve it..

thanks for ideas
uwi

ZbuffeR
04-05-2011, 06:07 AM
This looks like Z-fighting.
Are you sure to draw the geometry only once ?
Old but useful to know : http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

uwi2k2
04-05-2011, 11:41 AM
hi zbuffer,

thanx first of all, but this was not the solution.
itīs only drawn once per frame.
but a strange thing is.. this objects ( cubic planes ) have this texture on all sides, but this effect only apperes on the top of them , not at the bottom...
can you think of a reason for this ?

thanx a lot
uwi

ZbuffeR
04-05-2011, 11:50 AM
Then this is definitely z-fighting.
If you reverse the drawing order of faces, the "effect" will happen at a different place.
What are your glFrustum / gluPerspective / projection values ?

uwi2k2
04-05-2011, 12:11 PM
hi,

thanx ! one value here was defnetly wrong and lowed as well my fps !

so, i only have a call to:
gluPerspective (60, 1.6, 0.5, float(sight) ); //(1280x800)
in my script.
no glFrustum call and i am not quite shure what you mean by projection ?
i am not so familiar with opengl, can you give me a hint pls.

thanx
uwi2k2

mhagain
04-05-2011, 12:44 PM
gluPerspective (60, 1.6, 0.5, float(sight) ); //(1280x800)
Depending on the value of sight your znear is too low. Try changing it to 1, 2, 3, 4 etc until you find an acceptable value that gives you the scene you want but doesn't z-fight.

uwi2k2
04-05-2011, 11:26 PM
hi,

and thanx , thanx thanx !!
that was it. i never tought of that value.
i guess i need to read even more on this topic.

cu
uwi