r543
Relic Team
Posts: 408
|
Post by r543 on Aug 1, 2012 6:28:12 GMT -5
I noticed that Sonic sometimes has texture flickering and then you can see if there is an other 3d model part under the part. It happens when there is texture overlay on the stage and i didn't have the problem on my xp. does someone know how to fix this ?
|
|
|
Post by EightBitDragon on Aug 1, 2012 9:37:37 GMT -5
I noticed that Sonic sometimes has texture flickering and then you can see if there is an other 3d model part under the part. It happens when there is texture overlay on the stage and i didn't have the problem on my xp. does someone know how to fix this ? The effect is called z-fighting. en.wikipedia.org/wiki/Z-fightingSonic is going so far from the origin of the world (0, 0, 0) that the floating point value responsible for z-buffering is becoming less accurate, which means Sonic is so far away that the end of the float value gets cut off! So basically the polygons seem to think they are in the same place, and are trying to render on top of one another. The easiest way to fix it is to model your stage so that the starting location is way back from the center, so that you have the maximum amount of room before z-fighting occurs. Sonic would cross the origin of the world at some point (0,0,0) and keep going until reaching the other extreme end before the z-fighting starts. This would reduce the chance of encountering the problem because you would be using the largest possible space before polygons start overlapping each other from z-fighting. If that fails, and your stage is super-ridiculously-huge, You could also try moving the stage during play. Yes, that means the stage mesh, objects, and the player. At some point during the game, you can move them all back so that the player is at or around 0,0,0 and that would give you the extra space to keep the polygons from fighting. I don't know how fast this would be, as I have never tried it. I tend to keep my stages small and detailed, so I haven't really had the need to do something like moving the stage. Another thing you might try, is modeling your stage to zig-zag back and forth, to maximize the space you have. There is another way to fix it, but its too advanced to discuss here, and I think it might be beyond the capability of Blitz3D anyway.
|
|
r543
Relic Team
Posts: 408
|
Post by r543 on Aug 1, 2012 10:52:03 GMT -5
um the model flashes, the stage problem was always there,but the model thing wasn't a problem in xp
|
|
|
Post by Marble (LS5) on Aug 3, 2012 7:37:03 GMT -5
Haa, you should make some kind of system where the stage moves, but Sonic does not.
|
|
|
Post by Th33z on Aug 3, 2012 18:12:45 GMT -5
^ I love this idea.
|
|
r543
Relic Team
Posts: 408
|
Post by r543 on Aug 4, 2012 5:17:28 GMT -5
but why is this problem with the sonic model only on my new pc ?
|
|
|
Post by Th33z on Aug 4, 2012 9:25:03 GMT -5
I can assure you this "problem" happens on other PC's as well. There really isn't a fix to it unless you can find a way to keep the player at the origin point at all times while having the world move itself, but that idea is almost impossible to do.
|
|
r543
Relic Team
Posts: 408
|
Post by r543 on Aug 5, 2012 4:29:33 GMT -5
i never had texture flickering on my old xp
|
|
|
Post by Marble (LS5) on Aug 5, 2012 4:44:14 GMT -5
You already said that.
|
|
|
Post by EightBitDragon on Aug 5, 2012 15:33:34 GMT -5
If it didn't occur on your old machine, there's a possibility you had a superior video card with its own z-buffer, or better rendering capability.
The advanced fix I briefly mentioned is a method of drawing each polygon one at a time on top of one another without clearing the buffer. I forget what the method is called, but it wouldn't depend on the z-buffer because polygons would simply draw on top of the stuff already drawn on the screen. I seem to recall an example of this somewhere in the Blitz3D archives but I really don't think it would work fast enough for something like BlitzSonic.
There are 2 other methods I didn't mention, both have issues though.
First, you could shrink the stage. But that wouldn't do you much good because you would have to adjust the camera's clipping, which would reduce your z-buffer. Also, you would have to replace every single object as the stage would be smaller, and adjust all the math.
The second one involves the clipping that I mentioned. You could adjust it on the fly as Sonic gets near the point that z-fighting occurs, but it would only be a temporary fix. Eventually walls would start to clip off and would look really bad. You would lose some visibility in front of you, visibility which is necessary for a Sonic game in which you are moving pretty fast and need to see whats coming!
I really think you should consider zig-zagging your stage to delay reaching the point where z-fighting becomes an issue. You could get creative and have the stage curve back on itself, but at a much lower level, so as to go underneath itself. It would also make the stage more interesting, and you could even add shortcuts along the way.
Edit: I thought z-buffering in Blitz3D was software driven, but it might not be. I'm not sure on this. But, you can try to make your own soft z-buffer in Blitz3D. As I said its pretty advanced, and I have never tried it as its a little beyond what I can do.
|
|
|
Post by Chini on Aug 5, 2012 17:21:14 GMT -5
so 8, What if the the person who make a stage clears all rotation, location, and scale of the mesh to the origin. the origin of the level and the origin of the player will start out a the same place. Shouldn't this work? It only applies to the world origin?
|
|
|
Post by Redler Red7 on Aug 6, 2012 1:13:28 GMT -5
Well, I also noticed that effect on sonic's eye globe, but only if you're zoomed way out. I believe this problem was first put out in the BSU forums
|
|
|
Post by Marble (LS5) on Aug 6, 2012 2:32:33 GMT -5
The first time I've encountered the problem was when I used my mother's crappy Windows Vista Laptop when we were traveling.
|
|