Switch flickering/disappearing in Spaceport (Polymost)
#1 Posted 30 July 2015 - 10:51 PM
Tried it with different resolutions and settings etc, with and without and HRP in the folder, etc.
Nvidia 560ti card and whatnot, I posted my gl info log thingy and whatnot in the other topic made recently.
Here's a pic of the flickering switch thingy.
#2 Posted 30 July 2015 - 11:07 PM
never seen that on a nonsprite wall.
In your case dunno what causes that.
Try to move the switch 1-2 pixels away from wall and see if it still does it.
This post has been edited by Zaxtor: 30 July 2015 - 11:08 PM
#3 Posted 30 July 2015 - 11:12 PM
Zaxtor, on 30 July 2015 - 11:07 PM, said:
I'm not a mapper, that's from the Spaceport map in Duke3D. For what it's worth, it displays well in Megaton, I'm not sure what the difference in renderers are between eduke32 and that one.
#4 Posted 30 July 2015 - 11:46 PM
Even in Polymer.
Runs clean.
Maybe can be your video card or can be your EDuke32 version.
You use 32 or 64 bit?
I use 64 bit
#5 Posted 31 July 2015 - 12:47 AM
This post has been edited by PsychoGoatee: 31 July 2015 - 12:47 AM
#6 Posted 31 July 2015 - 01:02 AM
I use W7 Home premium (legal version).
64 bit.
Maybe can be your video card.
#7 Posted 31 July 2015 - 03:26 AM
This post has been edited by Mark.: 31 July 2015 - 03:27 AM
#8 Posted 04 October 2015 - 08:05 PM
#9 Posted 05 October 2015 - 02:36 AM
Anyhow, when the switch is misbehaving, certain duke-to-switch angles reveal that either left or right portions of switch is visible, suggesting the sprite/wall angle is relevant and indeed elsewhere in the level where switches are NOT on angled walls I do not see the problem. Some kinda rounding error in angle calcs ? Whatever, as has been said, best to move sprites away from walls - moving S2E1's switch the smallest distance possible from the wall is, on my machine, enough to completely cure the problem. I suspect this only needs doing on angled walls ?
TTFN,
Jon
#10 Posted 05 October 2015 - 02:39 AM
#12 Posted 05 October 2015 - 04:25 AM
Hendricks266, on 05 October 2015 - 02:39 AM, said:
If someone tries to use Polymer but their machine can't run it, doesn't Eduke (or just some versions?) drop back to using polymost automatically ?
TTFN,
Jon
#13 Posted 05 October 2015 - 07:36 AM
Hendricks266, on 05 October 2015 - 02:39 AM, said:
Doesn't Megaton use Polymost? It looks fine in Megaton.
#14 Posted 05 October 2015 - 11:22 AM
PsychoGoatee, on 05 October 2015 - 07:36 AM, said:
As an exercise, you should think about the assumptions you're making here.
#15 Posted 05 October 2015 - 11:34 AM
Hendricks266, on 05 October 2015 - 11:22 AM, said:
We're all friends here, could you explain what you mean? I'm just chiming in with a little tidbit of info from mild testing I did. I'm no expert on how these engines work. Keeping whatever info you have to yourself doesn't help anybody.
And for the record, odd to call something with a question mark an assumption isn't it?
I prefer eduke over Megaton for the record, if that keeps my feet out of the fire here. It just is notable that the glitch doesn't happen there, but does here. One of the very few things i can think of where it looks better there.I always play in Polymost because of the better mouselook.
This post has been edited by PsychoGoatee: 05 October 2015 - 11:48 AM
#16 Posted 05 October 2015 - 12:40 PM
EDIT: It seems I was wrong. Thats what I get for speaking without ever using Megaton.
This post has been edited by Mark.: 05 October 2015 - 02:48 PM
#17 Posted 05 October 2015 - 12:51 PM
I'll quote TX.
Quote
I need to fix it (and it will be fixed before HTTKC is released)
basically the previous method of making them not fight was a GL hack that didn't hold up under GL ES
where it just changed the depth offset when drawing sprites versus drawing walls
so even though they were in the same positions they didn't fight because the data got written into the depth buffer at different locations
but, like I said, that didn't work right on GL ES and also didn't work right on specific GL drivers it seemed
so I started implementing a new method where instead of writing into different depth buffer locations it just moves the sprite away from the wall slightly before even transforming it into GL coords
but my detection of the sprites that need to be moved isn't 100% yet
the reason it happens in the first place is because 2048 different angles isn't enough granularity to represent the possible angles between wall points
it's not an issue for walls that are straight up and down or left to right but for diagonal stuff 2048 isn't enough
so you get cases where one angle has half the sprite technically in null space but the same angle +1 has the other half technically in null space
Trivia: Duke 64 avoids this problem in a similar manner by defining an unused cstat bit to mean "render this sprite moved slightly in the direction it is facing".
This post has been edited by Hendricks266: 05 October 2015 - 01:09 PM
#18 Posted 05 October 2015 - 01:24 PM
PsychoGoatee, on 05 October 2015 - 07:36 AM, said:
I'm confused Hendricks, isn't the fact that both ports use the same polymost yet the switch looks fine in Megaton a potentially important piece of information?
#19 Posted 05 October 2015 - 01:37 PM
TTFN,
Jon
#20 Posted 05 October 2015 - 02:44 PM
#21 Posted 05 October 2015 - 08:07 PM
Micky C, on 05 October 2015 - 01:24 PM, said:
They aren't the same Polymost. I rewrote lots of Polymost in EDuke32 to be based on regular floats instead of double precision floats so that we could run it on Android devices that don't have hardware support for manipulating doubles. This resulted in a huge speedup on PC as well, but there are still some issues like this to iron out.
So, Polymost in other ports uses the same algorithm to turn sectors and walls into polygons but most everything else is different at this point.
#22 Posted 05 October 2015 - 10:05 PM
#23 Posted 06 October 2015 - 11:52 AM
TerminX, on 05 October 2015 - 08:07 PM, said:
#24 Posted 11 October 2015 - 08:44 AM
Hendricks266, on 05 October 2015 - 12:51 PM, said:
I can't agree 100% with everything TX said, though I'm happy it's on his list.
Quote
where it just changed the depth offset when drawing sprites versus drawing walls
so even though they were in the same positions they didn't fight because the data got written into the depth buffer at different locations
I don't think the previous method deserves to be called a hack. It did pretty much everything right: offsetting the per-fragment depth of a flat sprite by a "relative" amount, in the sense that it scales with its distance from the eye.
Quote
so I started implementing a new method where instead of writing into different depth buffer locations it just moves the sprite away from the wall slightly before even transforming it into GL coords
In other words, offsetting them by absolute amounts. Thus, at a certain distance, a sprite ornamented onto a wall begin to depth-fight with each other. Also, IIRC the offsets are scaled by some sprite id (either the real or drawn one) -- when you have a lot of sprites, you get huge offsets.
Quote
the reason it happens in the first place is because 2048 different angles isn't enough granularity to represent the possible angles between wall points
it's not an issue for walls that are straight up and down or left to right but for diagonal stuff 2048 isn't enough
so you get cases where one angle has half the sprite technically in null space but the same angle +1 has the other half technically in null space
This issue is independent from the method of offsetting, I'd think.
As I said in PM once, I'd strongly favor reinstantiating the old method on the desktop. The new one might still stay as an experimental mode until it can yield demonstrably better results.
#25 Posted 17 October 2015 - 09:11 PM
Would that explain the weird visual glitch I get (only in Polymost) when spawning a bunch of floor decals where they visibly shift around slightly if you spawn them rapidly?
#26 Posted 18 October 2015 - 07:16 PM
#27 Posted 18 October 2015 - 11:25 PM
Trooper Dan, on 18 October 2015 - 07:16 PM, said:
I understand. I'm working on it again now.
#28 Posted 19 October 2015 - 10:45 AM
Even if a lot of people, including 3D Realms in the vanilla maps, did broken stuff in their maps, and the vanilla Build engine let them get away with broken stuff in their maps, that does not make the maps "not broken". These errors are forgivable, but the maps are still broken. (Incidentally, I think the same way about how Mapster detects corruption in several vanilla maps (such as E2L6); I blame the vanilla Build editor for not at least letting people know about things that were broken.)