Pic2 Notice the jags where the wings intercept with the body. The seconds mesh is low poly and is one single mesh for the whole object. Edited by - voodoo on 9/17/00 10:03:40 PM
🔒 Locked
Z-Buffer Problems
Advertisement
Original Post
I have a riva tnt2 32 megs not ultra.
When I draw my spaceship and rotate it it looks like part are overlapping each other.
Actually it's more like artifacts I guess, but you can c certain parts through each other.
Let's say my ships is composed of several parts meaning it's not one mesh but several to compose the ship: Wings, body, window etc...
Now the wings are comming out of the body so there some part of the wings within the body, for it to be ok I am not suposed to see underneath the body and c part of the wing. The same mesh was ok, in PR 3.8
I am using pr4.0
Edited by - voodoo on 9/17/00 1:30:57 PM
Here are some screen to help out...
Pic1
Pic2 Notice the jags where the wings intercept with the body. The seconds mesh is low poly and is one single mesh for the whole object. Edited by - voodoo on 9/17/00 10:03:40 PM
Pic2 Notice the jags where the wings intercept with the body. The seconds mesh is low poly and is one single mesh for the whole object. Edited by - voodoo on 9/17/00 10:03:40 PM
This seems to be an obvoius z-buffer depth issue.
Personaly, I don''t see how the near and far clip would affect this in anyway. You get those edges because the z-buffer is not acurate enough.
Have you tested with 32-bit color to see if it still occures?
Have you tried scaling the object? make it 2 or 3x larger then zoom the camera out so the view is the same but in the zbuffer the poly''s are further apart
You could post your program (if it''s not too big) and we could test it on our video cards, since your friend of the voodoo didn''t notice a problem.
Personaly, I don''t see how the near and far clip would affect this in anyway. You get those edges because the z-buffer is not acurate enough.
Have you tested with 32-bit color to see if it still occures?
Have you tried scaling the object? make it 2 or 3x larger then zoom the camera out so the view is the same but in the zbuffer the poly''s are further apart
You could post your program (if it''s not too big) and we could test it on our video cards, since your friend of the voodoo didn''t notice a problem.
The near and far clip will effect this greatly, as the ZBuffer is stretched between the near & far clip planes. (I Think)
You can access these thru your camera.
ie
YourCamera->nearclip = 10;
YourCamera->farclip = 1000;
Otherwise, I agree about the Scale thing, work out a good scale and stick too it.
Hope this helps
Darrin
Edited by - darrin on September 19, 2000 5:56:05 PM
You can access these thru your camera.
ie
YourCamera->nearclip = 10;
YourCamera->farclip = 1000;
Otherwise, I agree about the Scale thing, work out a good scale and stick too it.
Hope this helps
Darrin
Edited by - darrin on September 19, 2000 5:56:05 PM
Darrin and Meduza are right about clipping with the cam...
The optimal values are
near = 10
far = 10000
Source
This way you dont have to play with the scale of your objects.
Another, thing I noticed is that when I choose 32 bit z-buffer the video modes defaults to 320x240 nd I cant seem to set any resolutions...
In the code if set the width and height to 800x600, it will skip the if sttement and pic the default video mode which is 640x480. It seems I cannot go higher then 640x480.
Herer is a screen with the clipping values set:
Z buffer fixed
Herer is a screen with 32 bit turned on:
32 bit on. Notice the picture is smaller because PR goes into 320x200 mode.
Either the TNT 2 really sux or these are bugs in PR??
Edited by - voodoo on September 19, 2000 11:07:55 PM
The optimal values are
near = 10
far = 10000
Source
This way you dont have to play with the scale of your objects.
Another, thing I noticed is that when I choose 32 bit z-buffer the video modes defaults to 320x240 nd I cant seem to set any resolutions...
In the code if set the width and height to 800x600, it will skip the if sttement and pic the default video mode which is 640x480. It seems I cannot go higher then 640x480.
Herer is a screen with the clipping values set:
Z buffer fixed
Herer is a screen with 32 bit turned on:
32 bit on. Notice the picture is smaller because PR goes into 320x200 mode.
Either the TNT 2 really sux or these are bugs in PR??
Edited by - voodoo on September 19, 2000 11:07:55 PM
You might need to read up on the Z buffer for the TNT 2 chip as some cards have a 32-bit Z buffer and some have a 24-bit Z buffer with an 8-bit stencil buffer. Trying to use a 32-bit Z buffer on one of the latter types (24-bit z, 8-bit stencil) can have unexpected results. Of course, this might be the wrong tree again.
The TNT 2 chip supports 320x200?
I am kind of happy I have been dragging my feet on PR as there are quite a few things I''d do that you all did that are getting set right. I''ll probably have my own bunch of questions and blame PR for my problems in a few. Just gotta finish that ESB (Extensible Small Basic) parser.
The TNT 2 chip supports 320x200?
I am kind of happy I have been dragging my feet on PR as there are quite a few things I''d do that you all did that are getting set right. I''ll probably have my own bunch of questions and blame PR for my problems in a few. Just gotta finish that ESB (Extensible Small Basic) parser.
Let me see the code you''re using for choosing the video mode.
You should set it manually if you know a mode is supported, or find the closest match in the modes list.
If you''re using PR_VideoModes[0] you''ll get the smallest mode since the list is sorted from smallest to largest. The TNT just happens to support 320x200x32 and not 320x200x16 for some reason. I''ve noticed this in other cards as well.
Just picking the first video mode in the list is not something you want to do in a real application. You''ll want some kind of resolution picker in the setup dialog. For the examples to get something up and running it was fine though.
You should set it manually if you know a mode is supported, or find the closest match in the modes list.
If you''re using PR_VideoModes[0] you''ll get the smallest mode since the list is sorted from smallest to largest. The TNT just happens to support 320x200x32 and not 320x200x16 for some reason. I''ve noticed this in other cards as well.
Just picking the first video mode in the list is not something you want to do in a real application. You''ll want some kind of resolution picker in the setup dialog. For the examples to get something up and running it was fine though.
Well I use your default code if the desired videomode is not suported then it picks the next best one, the coide is posted further up.
2 scenarios...
If i pic 32 bit rendering in the dialog box when it pops up i get the 320x200 if i dont pick 32 bit and I try lets say 800x600 it defaults to 640x480
2 scenarios...
If i pic 32 bit rendering in the dialog box when it pops up i get the 320x200 if i dont pick 32 bit and I try lets say 800x600 it defaults to 640x480
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement