Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Freedoom > the imp sprite
 
Author
All times are GMT. The time now is 01:41. Post New Thread    Post A Reply
hex11
Senior Member


Posts: 2237
Registered: 09-09


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/freedoo...w-imp-sketches/
http://www.doomworld.com/vb/freedoo...-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...)

Old Post 06-12-11 03:58 #
hex11 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


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 ??

Old Post 06-14-11 02:24 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
hex11
Senior Member


Posts: 2237
Registered: 09-09


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.

Old Post 06-14-11 03:05 #
hex11 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
andrewj
Senior Member


Posts: 1641
Registered: 04-02


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.

Old Post 06-14-11 04:09 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
fraggle
Filled with the code of Doom


Posts: 7830
Registered: 07-00


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.

Old Post 06-14-11 08:39 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


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%).

Last edited by wesleyjohnson on 06-14-11 at 20:50

Old Post 06-14-11 20:42 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Catoptromancy
Senior Member


Posts: 1028
Registered: 08-06


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.

Old Post 06-14-11 22:57 #
Catoptromancy is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
fraggle
Filled with the code of Doom


Posts: 7830
Registered: 07-00



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.

Old Post 06-15-11 12:33 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


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.

Last edited by wesleyjohnson on 06-25-11 at 20:02

Old Post 06-15-11 22:38 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
fraggle
Filled with the code of Doom


Posts: 7830
Registered: 07-00


So, sounds like a clipping issue rather than a mirroring one then. My bad.

Old Post 06-16-11 00:05 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


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.

Old Post 06-17-11 22:55 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


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-...ipping-failure/

Old Post 08-27-11 01:13 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 01:41. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Freedoom > the imp sprite

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.