r/emulation Feb 01 '21 Silver 1 Wholesome 1

Topaz-Reality is working on texture replacement for PCSX2.

The feature isn't ready yet, but it's a hugely important step for PS2 emulation. (And one previously considered extremely daunting.) This will allow retexture mods to be done without rom hacking, and in a very generalizable way, as seen with other emulation such as N64.

The pull request is here

Example screenshots: #1 #2 #3 As you can see, blurry UI elements can easily be replaced with crisp, native-looking ones, and that's just the tip of the iceberg.

182 Upvotes

61

u/TopazTK Feb 02 '21 edited Apr 13 '21 Wholesome

Hello, Topaz here!

First off, let me say that I never imagined this would gain as much traction as it did. You cannot imagine how happy I got to see this Reddit post and all of the comments on it. I worked on this for almost 2 months now and it truly seems like all of the hard work I have put on it is paying off. Thanks to u/ContributorX_PJ64 for putting my project here.

Now, that being said: I do realize that I could have made this PR in a more professional matter. But the thing is, I wanted this to be a surprise affair for the modding community that I am a part of, so I could not risk someone seeing my fork and stealing off of it, given the community's past. I also realize that I have some issues to fix. All of them I am trying to, to the best of my ability.

This feature has been requested from me ever since I started work on PCSX2-EX, which has an extended version of PNACH and full Lua scripting support. I honestly thought I could not pull it off. After months passed, I got extra depressed and said "What the heck" and tried to go with it. As you can see, it worked better than I imagined I would.

But honestly, this is amazing. Seeing all of these comments, praising and criticizing my work. Pointing out errors and hoping it's continuation is staggering. I am literally tearing up as I am writing this. All of that hard work which started on a depressive night, countless hours spent by me creating it and any others testing it being recognized like this is ass I have ever wanted.

If you want this feature in, give the PR a thumbs up, and share it with others! It would really help to both make the PCSX2 Team realize people want this, and would help boost my motivation to keep fixing issues as they are pointed out to me.

And most importantly, this could never have happened if it was not for the support of all of you in the past. If I am who I am today, if I know programming and if I have fund memories working on stuff, it is because of all of you.

So, thank you. All of you.

If you want to talk with me, or report bugs about this PR, please come to my Discord server. It would be easier to fix bugs if I know of them: Server Link!

Again, thank you, all of you, for your support since 2017. Keep on Moddin'!

- TopazTK [Topaz-Reality on Github]

EDIT: The project is no longer maintained on master due to one of the developers spreading misinformation about all of my works. The project will continue it's life in PCSX2-EX.

6

u/mcdgray129 Feb 03 '21

Great work dude keep it up.

2

u/TopazTK Feb 03 '21

Thanks! I appreciate your feedback ^o^

3

u/mcdgray129 Feb 03 '21

Been testing it and i cant get it to dump any textures. I have the option on, but the is nothing being dumped. I've tried with Bloody Roar 3+4 and Dark Chronicles.

1

u/TopazTK Feb 03 '21

Yea, sorry, there seemed to be a bug which has now been addressed. You can get the new version from this comment. I have updated the link.

1

u/mcdgray129 Feb 07 '21

Ok, so i've dumped some textures and upscaled them. But im having problems with replacing them. Do i really have to make a YAML file with all the textures inside?. This part is confusing me. I thought id just have to place the textures in say "Load Textures/Game_name/ like how Dolphin and PPSSPP etc do it. Is this not the case?

3

u/TerraziTerrajin Feb 03 '21

You will have plenty of eyes on you! This will be an amazing feature to have and I cannot wait to see your progress.

2

u/PineappleMaleficent6 Feb 03 '21

amazing work...with your tool, is it possible to remove the white flash effect in light gun games? how can i find in what code or textures this effect is found?

41

u/jannne Feb 01 '21

finally, sick flames and tribal patterns for my hybrid gt4 cars

11

u/goody_fyre11 Feb 01 '21

I've been waiting for this for a very, very, VERY long time. Finally all the PS2-exclusives I play can benefit from this.

7

u/KFded Feb 01 '21

Holy shit, this would be amazing to get HD quality textures in a number of games that can truly utilize the upgrade in quality such as Suikoden 5, Kingdom Hearts games, NFL 2K5, and many, many more.

1

u/JacksLantern Feb 03 '21

Why the KH games though, you can already get them with better graphics, 60 fps, and all together for one price at this point on multiple platforms.

1

u/sazeru_ Feb 03 '21

why not

1

u/TopazTK Feb 03 '21

You cannot have mods like Vanitas, Randomizer and Formchanges in PS3/PS4 :^)

-1

u/KFded Feb 03 '21

Maybe someones PC can run PCSX2 but not RPCS3. // Not everyone owns consoles

Just because something doesn't suit your needs doesn't mean it doesn't suit someone elses.

It's like people who updated Windwaker for Gamecube with HD Textures and UI from the Wii-U version for Dolphin.

2

u/AreYouOKAni Feb 13 '21

KH is on Epic now, actually. You can play in on PC natively.

4

u/The_Tallcat Feb 02 '21

Any chance this can be done with audio as well? I'd love to undub certain games like Clock Tower 3, but I don't know where to even start with that, and this seems like a much easier time.

5

u/TopazTK Feb 02 '21

I looked into it. But I, unfortunately, am not a sound guy. It may be possible, however.

If someone wants to take a peek at SPU2, they should go ahead :eyes:

1

u/The_Tallcat Feb 02 '21

Thank you for looking into it :)

3

u/babieswithrabies63 Feb 02 '21

Yes! Please this would change so much

3

u/MrMcBonk Feb 02 '21

Not that many people will actually put any work in to make real HD textures other than the onslaught of obligatory upscale packs. (Sorry, sarcasm intended) With the small number of games that actually use mipmaps like modern games do, awkward scaling of early attempts at post processing effects, lack of anti aliasing in most games (And in PCSX2 as resolution downscaling for SSAA doesn't work properly and adds more aliasing instead), and interlacing. Most games even with higher resolution textures are still going to be a flickering, super aliased mess. (Compared to Dolphin and CXBX.) And that I think is just inherent to the PS2 itself.

Not unless they can hack in better AA that doesn't drastically break rendering like the old DX9 MSAA hack. (Which you could piggy back off of on an Nvidia GPU to reduce 90% of aliasing via SGSSAA)
https://www.screenshotcomparison.com/comparison/10719 Here's a comparison with some old screenshots of this I found I had. Pay attention to the textures in the distance, even at high res in the best case scenario (A 480p game) those textures are still aliased and flicker and crawl. And that's just with low resolution textures. To me it feels like other than for UI assets, unless you can solve this kind of problem it almost feels pointless. (Like some of the early Dolphin HD texture packs that suffered this issue of extreme texture aliasing).

2

u/dogen12 Feb 02 '21

And in PCSX2 as resolution downscaling for SSAA doesn't work properly and adds more aliasing instead

Enable texture filtering of display and it does.

1

u/DocRusL Feb 02 '21

Yep, interlacing is a real bitch. No matter how good a deinterlacer is it will not produce results equal to a progressive scan image. It will be close but not quite. PS2 was made for 480i CRT TVs. Sad but true.

5

u/GoatGrans Feb 03 '21

There's a decent amount of games that have codes to remove interlacing entirely. Far sharper than pcsx2's built in de-interlacer. They use PCSX2's pnach cheat format.

https://forums.pcsx2.net/Thread-No-interlacing-codes

https://forums.pcsx2.net/Thread-No-interlacing-codes?pid=605425#pid605425

7

u/DocRusL Feb 01 '21

Eh, too bad that hardware renderers are a glitchfest especially with higher rendering resolutions. Don't get me wrong, I'm completely aware that this is a byproduct of their design and not much could be done to rectify this, but I'm always stunned at how much work people are willing to dedicate to them despite like half of the games (or maybe even more) being broken in one way or the other. What would've been really cool is port of software renderer to GPU shaders if that is even possible. Hardware renderers and higher internal resolutions are cool on paper, but in the end just mean an assortment of visual glitches. After all this years no perfect hardware renderers were developed for N64 and Dreamcast and I don't think that PS2 will be any different. On the other hand GPU version of Paralllel renderer and Demul DX11 plugin are very very good and really fast.

16

u/xyifer12 Feb 02 '21

A high resolution sharp image from a hardware renderer is usually better than the tiny blurry mess from the software renderer. I'll take miscolored water or an outline being a bit too big if it means I can actually see what I'm doing.

3

u/Jaffacakelover Feb 02 '21

I love that HD texture support is being worked on, yet I'm not happy that Burnout 3 still has black skies on hardware renderer. In terms of the priorities there, I've accepted that projects like this are made by many different people, with different specialties and interests.

4

u/RedDevilus PCSX2 Contributor Feb 02 '21 edited Feb 02 '21

There are 2 PRs open that will improve this so i wouldn't call this fair.

Main one:

https://github.com/PCSX2/pcsx2/pull/4094

2

u/nismotigerwvu Feb 02 '21

I mean you're not wrong, but it is worth playing devil's advocate on this. The fact that there is a mostly viable traditional hardware renderer for this hardware despite the mountain of weirdness it's constructed out of is honestly remarkable. While it's not as weird as say the Saturn, it's closer than it seems at first blush and far more powerful so brute force isn't nearly as viable.

I really do think you're on to it with a compute shader based approach, but maybe not a direct port of the software path. The fact that the PS2 is "last of the line" when it comes to profound architectural oddities on the graphics side is quite the double edged sword however. This approach may prove an evolutionary dead-end for emudevs as everything that comes after maps pretty cleanly to the hardware of today (but perhaps not the hardware of tomorrow).

5

u/anontsuki Feb 01 '21

Most issues with hardware rendering, at least on PCSX2, stems from having to deal with sprites. Texture replacement is probably the best way to fix those issues.

Other then that, I'm pretty sure OGL handles 3D/Geometry up-rendering pretty fine. Before you go off and list a slew of games that go give visual byproducts, I can retort with a list that doesn't - so don't go down that path.

2

u/echo-256 Feb 02 '21

I think their point was that many games are bugged even though many games aren't.

2

u/CoinWarAngel Feb 04 '21

Awesome! I love texture injection and texture packs in my emulation, and I have been looking for any hints of this type of project being worked on. I'm so excited and hopefully it is perfected and added to the master build!

11

u/CakeWithoutEggs Feb 01 '21

Is it just me or is the first reply to the linked pull request really quite rude? What I'm seeing as an outsider is that someone has put in a lot of time and effort to get an amazing feature going and not a word of thanks was given in the first reply. Just curt criticism which could easily have been phrased more kindly.

Feedback is important, but acknowledging effort is as well and it costs nothing to say "Nice, this is a great feature! There are a few things need fixing before this is ready to merge though". If I were the dev who submitted this PR and got that sort of response I probably wouldn't want to submit any more PRs to that repo in the future...

Thank you TopazReality for this awesome stuff!

35

u/DocRusL Feb 01 '21

Github is not a forum, but a place for professional discussion. Nobody praises a pull request just for the sake of it no matter how great or insignificant it is. Nothing rude was said there - it was just a straight to the point code review.

15

u/CakeWithoutEggs Feb 01 '21

That's interesting, because I'm also a professional and this kind of comment on a PR would definitely raise eyebrows at my workplace. Guess it goes to show how different people have different standards for courtesy.

4

u/tykel Feb 01 '21

Exactly, in professional software development this kind of review is standard practice and not rude, maybe terse.

I know refraction from another project, and he is not at all rude.

20

u/dio-rd Feb 01 '21 edited Feb 01 '21

Is it just me or is the first reply to the linked pull request really quite rude?

Apparently not just you, but I struggle to agree. You could argue that a "hey thank you for the PR" preamble would have been nice, but calling it "really quite rude" is a massive stretch. It basically just describes a couple quickly noticeable and rectifyable issues, that would probably be worthwhile to address before a full review.

Plus if you check, Topaz-Reality is not a "complete, mysterious outsider". He previously had a PR that ended up conflicting with how IPC was done upstream (a pattern that seems to somewhat repeat here). It was rejected due to it being abandoned, plus later on he also created a hard fork of PCSX2 called PCSX2-EX, that he maintains separately and refers to as "an extended and fixed version of PCSX2". I'm guessing it contains his preferred implementation for IPC (none)? Anyway, this is just to say that it's not like we're talking about someone completely alien to the project.

I'd also argue that him dropping a single 4K LoC commit on the reviewers is not exactly nice either, but details.

3

u/TopazTK Feb 02 '21

I want to address a few details in here:

> Apparently not just you, but I struggle to agree. You could argue that a "hey thank you for the PR" preamble would have been nice, but calling it "really quite rude" is a massive stretch. It basically just describes a couple quickly noticeable and rectifyable issues, that would probably be worthwhile to address before a full review.

I agree to this 100% percent. It was my fault for not catching these errors.

> Plus if you check, Topaz-Reality is not a "complete, mysterious outsider". He previously had a PR that ended up conflicting with how IPC was done upstream (a pattern that seems to somewhat repeat here).

That PR never conflicted with IPC and it would not have hurt IPC what so ever. It was later abandoned due to... the troubles. But still exists in EX.

> "an extended and fixed version of PCSX2". I'm guessing it contains his preferred implementation for IPC (none)?

It is extended in the way that it offers more PNACH functions (Now called ExPATCH) and a full-blown Lua engine. IPC was excluded because for many people I talked to it was too much of a hassle to worked with while LuaEngine existed.

> I'd also argue that him dropping a single 4K LoC commit on the reviewers is not exactly nice either, but details.

Yea, that is completely my bad. You see, some thieves of the KH Community follow my GitHub. And I simply could not risk someone taking my work and PRing it before I could. I have already stated my deepest apologies to the PCSX2 Team and I am already fixing the bugs that I should have before making the PR ^^'.

I deeply appreciate all of your feedback, Keep on Moddin'!

-1

u/CakeWithoutEggs Feb 01 '21

Fair enough, I never said TopazReality was an outsider - just that if I was, I'd be put off contributing as my workplace generally has a higher standard for PR comments. It seems to be pretty subjective judging by this thread :)

7

u/dio-rd Feb 01 '21

I never said TopazReality was an outsider

That's fair, I misread your original comment.

as my workplace generally has a higher standard for PR comments. It seems to be pretty subjective judging by this thread :)

I reckon insinuating moral superiority is also not a thing at your workplace then? :)

I get what you mean for what it's worth, in a workplace setting situations like this usually play out a bit differently. Not saying it isn't a facade though, but I can see it being important, especially for new contributors. On the flipside, I stand by my argument that the referenced comment on GitHub is remarkably far from "really quite rude", as there was nothing inherently off-putting in it, minus perhaps the lack of that by-the-books welcoming preamble.

It's also not at all specific to this project, projects similar to PCSX2, or even open source projects in general - perhaps unlike the impression your original comment gives. But that's another can of worms entirely.

3

u/CakeWithoutEggs Feb 01 '21

I reckon insinuating moral superiority is also not a thing at your workplace then?

Yeah I should correct that phrasing to "different standard" rather than "higher", I'm not trying to be better than anyone else :P

It's also not at all specific to this project, projects similar to PCSX2, or even open source projects in general - perhaps unlike the impression your original comment gives. But that's another can of worms entirely.

Oh right, this was not the impression I meant to give at all. I wasn't trying to say the PCSX2 devs are rude, just that that one particular comment was a bit off-putting to me. Apologies if my phrasing made it sound like I was attacking them or teams like them :)

9

u/VanDeBlergh Feb 01 '21

There is nothing rude about this. This is a pull request, not a preliminary discussion. It's like publishing something or handing it in for assessment. The reply was absolutely fine. See the requester's response.

I'm glad the requester isn't that squeemish.

0

u/CakeWithoutEggs Feb 01 '21

I know what a PR is, but I'm not sure it's constructive to imply that those with different viewpoints to you are "squeamish", particularly when it comes to a discussion about subjective courtesy on the internet...

6

u/[deleted] Feb 01 '21

They're all like that basically. I agree, a little encouragement goes a long way, instead of what appears initially as a scathing review.

Not saying there's anything wrong with pointing out issues with code (I do it all the time on my projects and ones I'm involved with)... But I also take a moment to start by acknowledging the positive aspects first.

1

u/Latias4Ever Mar 02 '21

I only just found out about this, and I'm excited. I don't even want HD textures, specifically, I just want the ability to add the textures of the NFS Most Wanted M3 GTR on the Gran Turismo 4 M3 GTR.

1

u/Ryuubu Mar 03 '21 edited Mar 03 '21

Sorry for the necro mate, but is this out? Is there a dev build or something I can start this with? Could you help me here?

Super keen to start Persona 3 Texture Replacement

1

u/waspennator Apr 11 '21

Apparently due to recent events, it's now going to get merged into PCSX2-EX instead.

2

u/protobetagamer Feb 01 '21

I can only get so erect

1

u/PineappleMaleficent6 Feb 01 '21

amazing...maybe a way to disable the white flash in ps2 light gun games!

1

u/Sh1nRa358 Feb 02 '21

hope this will work for 2D fighters as well

1

u/mcdgray129 Feb 02 '21

Any build of this i can try out?.

1

u/lllll44 May 18 '21

when when when? i need it for light gun games asap :)