Main Menu

Texutre Flicker

Started by DustWorm2, August 13, 2005, 23:39:27

Previous topic - Next topic

DustWorm2

Hi,
This might be a noob question but I just cannt pin point the problem. I have created this simple world with simple texture (note size does not matter I have tried small and large textures already). I also tried all sorts of filtering. Ok, the problem is that when i move away from a textured object, texture starts to flicker. You can actually see in fast motion texture being redrawn. Does that have to do with some buffer not being cleared or the clearing is too slow. Any ideas?
Regards
Dust  :P
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

oNyx

Tearing? Set vsync to on by default.

No mipmapping?

*shrug*

DustWorm2

-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

elias4444

What kind of frame-rate are you getting?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Fool Running

Could you post some code? It sounds like either the z-buffer bits are too low or that you are in single buffering mode (highly unlikely)  :lol:
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

DustWorm2

Hey
Sorry for late post, but couldnt. Anyway, I would like to post some code, but do not know which part. Code is pretty extensive. Now, I clear my buffers in Render class (depth buffer and color buffer) I do not know what Z buffer is, yet. So could you please be more specific in where I can find this buffer (I mean place in a code that it would be ).
Regards
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

Fool Running

The z-buffer is also called the depth buffer and is one of the parameters in the PixelFormat class you passed to Display.create().
PixelFormat(int bpp, int alpha, int depth, int stencil, int samples

depth should be 16 or 24
From the way you are talking, though, it sounds like you are already doing this  :lol:

The code I think we want to look at is the code that renders the object (and possibly the code that sets up the rendering state).

Another idea: Is it possible to post a screenshot (or maybe a short avi of the problem)?
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

DustWorm2

BPP - ahh LOL i just call it this way. Bits Per pixel I have a choice under my GC between 16 or 32 bit.
I already try to change resolution, texture size and BPP, but it makes no difference.
I will post video, I would post JNLP, but I have a problem with loading images from JAR. It is a major pain. Anway, video should be up soon.
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

DustWorm2

NVM video, I finally got JNLP up and running.
I will post it on my web and post link in here. (Tonight)
9pm EST
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

DustWorm2

Hey
Alright here is the link: http://www.dustwormsoft.com/temp/temp.jnlp
Now, what you need to know. The problem is when you move away from lets say a wall, texture starts to flicker. You can see (like in slow motion) texture being applied (sort of blinds effects). This happens even with the most minimum settings (low textures, no fog, no light, etc.). I wonder if it's my graphic card or bad programming.

Also, to move around the world, use arrow keys, 'a' look up, 'z' look down, 's' fly up, 'x' fly down.

Please test it and report results.

Thanks

Oh! and also, fog and ambient light is on.
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

DustWorm2

GLU.gluPerspective(
         45.0f,
         (float) frame.getDisplayMode().getWidth() / (float)frame.getDisplayMode().getHeight(),
         X,
         400.0f);

I have increased the value of X from 0.1f to 2f and it reduced the flickering.
Hmm?
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

tomb

Did not get the test to run. It crashes after the window is created.

But it sounds like you are seeing z-fighting. You have 2 triangles that is very close and the depth buffer switches between the 2 depending on rounding errors.

Is it correct that it only flickers when you move? When you're still there might be tearing but it is not moving?

Try going over the object your rendering and make sure there is no overlapping triangles.

DustWorm2

Hey,
Yes, overlaping of geometry. That helped a lot. It is true that this "flickering" occurs while I am in motion.
Thanks!

Going back to the test run, was there any error msg when it did n't load?

I am asking because texture take a bit time to download so you need to wait (with DSL about 20 seconds) for the progress bar to begin indincating the hmm progress.

Regards
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]

tomb

Finaly found out where webstart wrote the log. Here's a snippet:

java.lang.NullPointerException
at models.Models.set3dsModelInfo(Models.java:55)
at init.Render.render(Render.java:61)

DustWorm2

Hey
I am sorry but, I am still a bit foggy when it comes to JNLP. I cannt find the problem. It works fine on my computer :).
If I have time I will post it as a zip file. In fact I was thinking to do that with all my work. It seems that JNLP is not perfect yet and have some issues with loading resources. Anyway, thanks all for helping out.
Regards
-_-] Dust Worm [-_-] www.DustWormSoft.com [-_-]