Closed kitchen-ace closed 7 months ago
At the moment, this is the only huge, and probably the one problem for implementing true color support for Crispy Strife. 🙂 I haven't investigated it yet, but it will needed to be done sooner or later. Using translucency table is not possible in true color, so approach should be different. Something like... Making a copy of current SDL texture and blitting it onto the screen while opacity value is reduced with game tics.
Something like this, but needs polishing.
@kitchen-ace, @Meerschweinmann, @NightFright2k19,
I'm thinking to add crossfade to Heretic and Hexen, it's pretty straightforward now.
But how do you think, does Heretic and Hexen needs original "melting" effect from Doom? IMO, it really looks out of place. Not a problem to add it too, but... See yourselves:
I like the crossfade-effect way more than the wipe effect. With Inter-ports ability to use truecolor a nice touch on top. And i am with you, the wipe-effect is a DOOM thing that was there since the 90s.
@Meerschweinmann
I like the crossfade-effect way more than the wipe effect. With Inter-ports ability to use truecolor a nice touch on top. And i am with you, the wipe-effect is a DOOM thing that was there since the 90s.
Agreed, crossfade looks really nice, melt looks unnecessarily Doom-like.
Thanks! I'll proceed with crossfade-only then.
Since this doesn't contribute anything to gameplay, it's most definitely a trivial feature. But yeah, if it is to be implemented anyway, at least not with Doom melting effect. If you really need it - there's always GZDoom. Where literally anything goes.
Agreed completlely, thanks again! In terms of features, starting from Inter-Everything 7.0 I'm trying to carefully go with "Just because you can, doesn't mean you should" way. 🙂
Have to complain a bit.
I'll merge it soon so you check it out, but there will be complains from your sides, better I'll just unroll it.
P.S. In theory, this opens small potential for "burn" and something similar effects, there are couple of other blending functions. Ah yes, about flats fading - this should be doable technically, but might be not very trivial. The real problem here - any kind of translucency effects, and crossfading is also using it, is always expensive in TrueColor render. Yep, even drawing spectres is expensive. 👻 Better be careful, at least until render becomes fully hardware accelerated.
Ah yes, about flats fading - this should be doable technically, but might be not very trivial. The real problem here - any kind of translucency effects, and crossfading is also using it, is always expensive in TrueColor render. Yep, even drawing spectres is expensive.
Fair enough! I wonder if it could be optimized though? Since the translations with textures/flats are always predictable, perhaps they could be precomputed/cached in some way? Just speculating.
It should be possible indeed, and this is like a Holy Grail. 🙂 The problem is - in current implementation every pixel of graphics on every screen pixel is computed dynamically on single core of CPU. And the more "translucent over translucent" pixels are appearing, CPU loading is increasing in geometrical progression, It's a "bottleneck" effect as it gets.
The are few possible ways to optimize.
1. Use look-up table for translucent colors, just like original paletted render does. Using original TRANMAP
/TINTMAP
or something doesn't seems to be possible as it contains differently aligned data. I was trying to generate such map via existing code by replacing byte
to pixel_t
types and allocating not 256*256
but higher value, but matters no how and what I have tried, it always ended up with SIGSEGV
fiasco.
If done correctly, the result should look like this, but this is HighColor LUT:
Fabian was also able to calculate how tough will be TrueColor LUT. I can't find his answer, but it something about 32 Gigabytes.
2. Compute translucency not via CPU, but via GPU. This will require some knowledge of Direct3D or OpenGL, I simply don't have it.
3. Fabian have a though, I'll gladly quote:
Using a lookup table even for truecolor translucency, but I'll have to invent a way to break down 24-bit RGB values into an 8-bit space as lossless as possible.
But it's only a though, and I was never willing to ask him "how / when / wanna-wanna".
There is something wrong in Hexen's vanilla code of transitions between levels - when entering portal to another map, even "Ethereal Travel" banner appears not before, but after new level is loaded. Thus, same applies to crossfading effect. Going to another hub after text screens and loading a save game seems to be fine. 🤔
Enforcing a wipe does not helps either, still not sure how to solve it.
Well, it's seems to be almost done. There is still small problem with traveling between levels in one hub (00:05 on video), and still no idea what to do. But looks pretty decent with loading/traveling banners disabled, luckily they are optional already.
Heyhey, a Hexen fading progress 😊 Looks really nice. When i have to choose between banners and fading, i choose fading.
I'll be honest. This implementation is flawed. 😐 There two notable problems:
Probably the last nail in this ~coffin~ implementation must be a small improvement in the of fade effect to make it slightly "smoother" by removing notable "from too dark to normal" effect.
In GlBoom+ there is a GL option called "fade animations" that fades animated textures and flats from one frame into another. AFAIK no other port supports this, and I really like the look of it.
With the inter-ports having truecolor support, it should be possible for this to happen and look nice, in theory.
I have no idea how hard this would be to actually do though, it might be way too much work to even consider since you can't use the GL implementation, and that's fine. Just thought I'd ask.
There's also the issue of swirling liquids; I guess swirling should take priority over fading.