Sign in to follow this  
tion80

weird symptom (screen shot fixed)

Recommended Posts

Hi ~! I've been making this cute tennis game :> However, from some moment, the texutre looks like crashed. like the picture above. I mean, court, background and players , they all have correct y position like.. background=-2.0f court=-0.1f. player=its height. I hardly describe the scene.. but as you see , some part of texture has gone~! it seems like they are all mixed Ah! and , if I set the each Y position higher than i used to be like below , it looks fine, but this is not what I want.. background=-500.0f court=-0.f player=its height+100.0f Has anyone experienced same problem? or can figure out what's wrong?

Share this post


Link to post
Share on other sites
Based one what you've given it's hard to tell exactly what the problem is. But I would suggest that you just try rendering the scene WITHOUT the floor and see if those lines still show up. The fact that if you move the texture up suggests that you may be rendering some other objects that you don't want to be rendering (perhaps caused by an for loop or something). Once you determine this it'll be easier to isolate the problem.

(I assume your talking about the horizontal lines across the court, but if I'm mistaken feel free to correct me)

Share this post


Link to post
Share on other sites
Yes!!! you were absoultely right!

The seqeunce was probelm. wow.. I never realize that sequence of the object drawing could be messed up....

I really appreciate you.


I've got to think about this issue more..hm..

Share this post


Link to post
Share on other sites
I've fix it!

However I can see little black horizontal line on the court when I'm apporaching it. ( Ive implemented camera flying around the court)

What's wrong with this?

Share this post


Link to post
Share on other sites
Perhaps another screenshot would be helpful. Is it just one line? Is it always in (relatively) the same place. First thing I would check is the Z-Buffer (although idealy you should be drawing objects from back to front). If that isn't the problem consider checking the type of texture filtering (min and mag filters for instance). But without seeing it it's hard to tell very precisely.

Also, you may want to include some code (or pseudo-code would be equally helpful) of the render sequence.

Good to hear the other suggestion worked out though ;)

Share this post


Link to post
Share on other sites
this is it ;>



now You can see the progress. thanks


The code below is for setting up d3d,
// Set texture filters.
//
game->d3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
game->d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
game->d3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_POINT);
// Turn on the zbuffer
game->d3dDevice->SetRenderState(D3DRS_ZENABLE, TRUE);

well, I tried to change sampler state like liner and anti... I've forgot :< anyway It wasn't working

the code is below is putting objects in list... so.. y'know last in - first out, so player should be drawen first.


game->objects.Add(oBGBottom);
game->objects.Add(oBG);
game->objects.Add(oCourt);
game->objects.Add(oNet);

game->objects.Add(oPlayer1);
game->objects.Add(oPlayer2);

I can't see what's going on based on what I've learned so far.


Share this post


Link to post
Share on other sites
First thing I recommend is setting the background (ie. the wood texture) to be further down -- -15.0 or something -- just so that it's nice and far back and then check to see if the lines are still there. If they are it's a more difficult problem. If they disappear, the reason is because the court and the floor are too close together and ZBuffer isn't able to differentiate between them. If this DOES prove to be the issue then the solution is simply to disable the ZBuffer when drawing the court. So, move the background further away and let me know how that works out ;)


[Edited by - rjackets on November 14, 2004 3:07:55 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this