emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
230 stars 0 forks source link

[Feature Request] Adjustable bloom lighting and saturation? #42

Open ViperAcidZX opened 1 week ago

ViperAcidZX commented 1 week ago

I'm wondering could it be possible to implement to adjust the intensity of the bloom lighting with this plugin? I was re-watching Mr. Thunderwing's old comparison videos (this one for example) between the different versions of OutRun 2/C2C, one of the things he brought up in this comparison is the differences in bloom intensity between the Xbox, PC (vanilla), and the PS3's OutRun Online Arcade versions and the PS3 version notably has it much more vibrant than the prior ports (although YMMV in the intensity in some scenarios).

brad86m commented 1 week ago

Yeah, the PS3/360 version is a slightly trimmed port of the updated Lindbergh arcade game, but with the bloom cranked up further. Lindbergh still has a few graphical extras that are missing on PC. The big one would be the cool little sequences that happen at the end of a run. Like the space shuttle taking off, or the volcano erupting. Though, these did make it back into the PS2 Japanese Special Tours release, which was a couple of years after C2C.

I still think the fist OutRun 2 release on Chihiro and Xbox looks the best in terms of certain effects. They changed things for Coast 2 Coast, where even the Xbox release of that version was a slight downgrade. Graphically, PC could very well be the best overall version in the near future, with the way this Tweaks mod is working out so far.

Good times ahead.

s-ilent commented 1 week ago

As far as I can tell, the PC version doesn't have any bloom, only lens flare. The two effects are conflated together in most writeups about this on the net, but from poking around with RenderDoc there doesn't seem to be anything that looks like a bloom pass. If it's there, it probably needs to be turned on somehow.

From looking at it with Xemu, he bloom effect on Xbox is very visible on the horizon where the clouds touch the buildings and totally absent on PC. There also seems to be some soft particle effect going on and an ambient shadow under the car. xemu screenshot

emoose commented 1 week ago

Just noticed that there is a bunch of DispGlowFilter code still in C2C which I assume is the bloom effect, but it's behind a check for some byte near the Outrun2006.ini settings, nothing seems to set that byte, but if I patch it to 1 at startup... it gives a pretty ugly result:

OR2006C2C_tqzjumQjDU

Guess they probably intended to add some kind of "Enable Bloom" setting but couldn't get the bloom effect to render properly, so hid it behind that check & removed all the code that would set that byte.

At least the code is mostly still included, not really sure where to start with trying to fix it up though, will try poking around with PIX.

(in case anyone wants to try it, here's a build that'll set the byte: OutrunTweaks-DispGlowFilter.zip)

lance8765 commented 1 week ago

"What if it snowed in Sunny Beach?" xD

Jokes apart, that image looks so familiar to me...

s-ilent commented 1 week ago

Poking at it with Renderdoc, it seems like the bloom filtering is backwards. The scene being rendered gives the buildings/road/etc an alpha value of 1, and the sky an alpha of 0. It masks the bloom by the alpha channel, blacking out the sky, and then applies a few passes of blurring along with tweaking the colours before adding it back to the framebuffer and drawing the car and UI on top.

Going by how it looks on Xbox, it should probably be blacking out everything but the sky. (Though there might be more to the effect that's missing.) It might be possible to fix by replacing or patching the relevant shader.

One other issue is that the bloom buffer is rendered at the same resolution as the scene. Ideally, it should be shrunk to some 480p-ish resolution at the screen aspect ratio before it's calculated and then scaled back up so the size of the glare is the same between resolutions.

RIKLAVIEGASINTRODUCTION commented 1 week ago

The bloom color on the 'Legend' level seems to partially work. You can see the trees and road have a glow around htem. ot2 It's not white at least. You can see a huge circular shadow almost that follows the car as well.

https://github.com/emoose/OutRun2006Tweaks/assets/92535412/de4757eb-803f-4ba1-bc4f-d66f1033bb92

It looks very blocky might not look correct because of poor scaling. Not sure.

Ice Scape level crashed the game not sure if it's because of the bloom. Canyon also has partial bloom. zxzx Some levels that are supposed to have prominent bloom have barely any even in the broken state. Sometimes the sky has bloom sometimes it doesn't. No consistency at all.

The bloom in the PC version should be comapred to C2C Xbox rather than 2SP or 2 since they toned down the bloom and that version.

brad86m commented 1 week ago

It was a shame that they toned it down, especially on the Xbox, as I'm sure they could have kept those gfx for the newer tracks, instead of bringing those downgrades over to the original levels too. Tyre smoke is also cut back on C2C Xbox when drifting. Or, at least it looks more "clumpy", if that makes sense. Intro race start tyre spin smoke density seems the same.

I'm not sure about flag man's stencil shadow on PC. Every other port has a soft shadow. I'm going to boot up my old 98 PC (cheated with an early dx9 card) later today and check the vanilla disc out and see if it is still the same. Along with the under car shadow that should be there in-race and car selection screen.

emoose commented 1 week ago

Seems Online Arcade uses very similar DispGlowFilter code to the broken C2C stuff, a lot of it seems to match up but there were a couple changes made there, eg. I noticed it seems to setup 4 textures with the resolution halving for each one, which C2C seemed to be missing.

There's also some stuff about D3D tiling added to it which I think might be an X360 exclusive thing, so probably can't just lift the code directly from it...

Wonder if RenderDoc might show any difference with that running under Xenia, not sure how comparable Xenia's DX12 will be to C2C's DX9 though.

Did try messing with C2C's shaders for it too which had some effect on where it drew the glow, X360 shaders seem to be loaded from filesystem instead of baked into EXE though so haven't been able to look into them yet.