hex11 Posted June 12, 2011 His tail sticks out a lot and can ruin ambush effects. It's very noticeable in this E1M4 (The Far Side of Phobos): http://www.doomworld.com/idgames/index.php?id=9580 When facing the blue key, you'll see the imps lurking above you. And sure enough, as soon as you grab the key those sectors drop and they attack. Similar ambushes in that map also suffer from the same behavior. It looks like some people have mentioned changing it for cosmetic reasons: http://www.doomworld.com/vb/freedoom/41362-new-imp-sketches/ http://www.doomworld.com/vb/freedoom/10989-doom-guy-face/ I actually like the snake-man's appearance, but his tail could be considered a bug. Is it possible to edit only a couple of his frames, so that the tail doesn't stick out so much? Like maybe those where he's just standing still, or dead (yeah, those often stick out, and it's weird...) 0 Share this post Link to post
wesleyjohnson Posted June 14, 2011 Imp sprite. I have been chasing a render problem in DoomLegacy, and it seems to concern only the Imp sprite. That tail sometimes gets rendered in strange places where it should not show. Is the Imp sprite exceeding some sprite frame expectations with that tail ? Is this happening in other ports ?? 0 Share this post Link to post
hex11 Posted June 14, 2011 I was using Chocolate Doom to run phobos.wad, so it probably happens with vanilla doom.exe as well. I've seen the tail stick out before though, in various PWADs. I think njdoom2 was one of them (but I can't remember the exact MAPxx). But there too it was with Chocolate Doom. Okay, now this is interesting: I just tried phobos.wad again with PrBoom and Odamex. On E1M4, Odamex has the same issue as Chocolate Doom, but PrBoom however doesn't show any imp parts sticking out. 0 Share this post Link to post
andrewj Posted June 14, 2011 Some ports have improved the sprite clipping code. I think the current Imp and Revenant would be better swapped, though the revenant is probably too tall, and the show-stopper would be mismatching animations. 0 Share this post Link to post
fraggle Posted June 14, 2011 Note that there is a known bug with horizontal offsets when doing a mirrored sprite. The sprite gets mirrored but the offset doesn't get mirrored to match. The result is that the sprite can "jump" when viewed at certain angles. I noticed this happening with the Freedoom imp sprite a while ago but I don't remember if it got fixed at all. Maybe this is related? The solution is to make the sprite wider (with empty transparent space) so that the monster is horizontally centered within the image. As long as the offset = width / 2, the problem can't occur. I actually considered trying to patch deutex to do it automatically. 0 Share this post Link to post
wesleyjohnson Posted June 14, 2011 MAP13, the pit behind the crusher. I (purposely) get a number of imps in there (survivors of crushing), and frequently see the tail through the ground. (Aside: Tried to make a test wad, so that I could fix this in DoomLegacy, but using pink-worms (they don't shoot at you while you are trying to examine the rendering), but it would not mis-clip. It required a FreeDoom Imp. Any wad with an Imp in a pit, will render this tail through the ground at the corner. PrBoom doesn't have this mis-clip. ) I have not been able to find anything in the sprite clipping to explain this. I am not sure how mirroring the texture affects clipping. To mis-clip like this, some part of the sprite must be outside of the range that the engine is checking for clipping, and then also have the render routine draw it in spite of clipping supplying x1..x2 range parameters. (Maybe, clipping only checks expected x range, render draws flipped texture with offset from separate x calc, and then some floors get drawn over it. Will investigate. ) So apparently it is in DoomLegacy, vanilla, chocolate, Odamex, ... ?? Need to look at PrBoom to see what they do different ! I can remember it having mis-clip with the tail to the left. Does it only do it on that side, or with tail to right also ?? Is this a fix-the-sprite problem, or a fix-the-engines problem ?? The revenant is too tall for the stated size (engine), gets head in ceiling in MAP09. Swapping anything is going to really screw people who has been playing this already :^. The revenant could be saved by squashing the frames (in GIMP or such) until they fit the required size. It is so tall that it would not be hurt much. On the other hand, the pink-worm could stand to be stretched horz. a little (20%..40%). 0 Share this post Link to post
Catoptromancy Posted June 14, 2011 I have tried to fix this in the wad. I think the engine just swaps angles and the tail sticks out. No idea how to fix. 0 Share this post Link to post
fraggle Posted June 15, 2011 Catoptromancy said:I have tried to fix this in the wad. I think the engine just swaps angles and the tail sticks out. No idea how to fix. fraggle said:The solution is to make the sprite wider (with empty transparent space) so that the monster is horizontally centered within the image. As long as the offset = width / 2, the problem can't occur. I actually considered trying to patch deutex to do it automatically. 0 Share this post Link to post
wesleyjohnson Posted June 15, 2011 Examined code. Found patch in PrBoom that fixes offset when flip, with reference to Fraggle, dated 2003. Applied similar flip offset patch to DoomLegacy. It reduced the maxiumum exposure on the right side by about half, but did not remove problem. Testing PrBoom on my test wad (many monsters in pits), reveals that it too still has this problem, but it shows much less, many times only a few pixels wide. Test results on DoomLegacy: It appears that every sprite can display this, especially if anything sticks out, but the narrow ones appear mostly immune (considering the limited test time). Imp: severe, with up to 5/8 of imp showing through on right side a few times. Tail sticks out to left side often. Cacodemon, and Pain Elemental: Tentacles will show through floor on left side when it attacks. Dead sarge: gun can stick out. Revenant: traces, slivers, infrequent Dead Imp: will trigger major clipping failure on 3dfloor (it mostly disappears with only a little bit showing), where a dead cacodemon substituted for it does not. CyberDemon: slivers showing through to left and right SpiderDemon: Immune, has large transparent areas on both sides that must be protecting it. I think this is a general problem with the way sprites are clipped against floors (basically they are not clipped, just sorted into a semi-sorted draw list). The attempt to sort sprites by distance among the drawsegs fails where the scene gets complicated because the bsp does not issue draws purely in distance order. OpenGL does not show this problem because it has true z-buffering. Mostly the engines are going to have to fix this. For me, the main question is why the Imp it so much worse than any other sprite. If anyone wants my test wad, I will send you a copy. It is mostly monsters in 64 deep pits, with an adjacent raised strip of floor. 0 Share this post Link to post
fraggle Posted June 15, 2011 So, sounds like a clipping issue rather than a mirroring one then. My bad. 0 Share this post Link to post
wesleyjohnson Posted June 17, 2011 Not bad. The Fraggle flip offset patch will get committed to DoomLegacy and should be in every port. Should end up in DoomWiki known bugs too. Thought I had found a second place to fix flip, in v_video, R_DrawScaled, but that is not for sprites, and would probably move patches drawn to the status bar (it did not seem to fix anything). The sprites that do not seem to have problems are, symmetrical with the insertion point in the center (thus are immune to flip), have extra transparent to the sides (thus check clipping wider than they are and thus little bits cannot stick out). To protect FreeDoom sprites against the bugs in the vanilla derived ports, I would suggest: - insertion point centered in frame (or at least in center 1/3 of frame) - 8 pixels of transparent on left and right of frame as protection (it makes clipping check wider) Aside: The 3dfloor issue is not dead imp specific, it is just extremely sensitive to the width of the displayed sprite. Multiple sprites will trigger it more reliably. 0 Share this post Link to post
wesleyjohnson Posted August 27, 2011 I have found the cause of the imp tail showing. When there is a vertex in the line that makes up the clipping wall, and if the sprite is just closer than the farther line segment, then R_DrawSprite will reject the farther segment (scale test) and not consider it for clipping. See discussion in source ports: http://www.doomworld.com/vb/source-ports/56888-sprite-clipping-failure/ 0 Share this post Link to post