-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ratchet & Clank: Tools of Destruction/Resistance: Fall of Man instanced mesh system broken #10754
Comments
Well I might as well show an example of Resistance: Fall of Man: RSX Capture: |
Sorry if this is confusing, here is a video of it in action: RFOMFoliageProblem.mp4 |
Along with the previously stated sorting issue, it appears that some foliage is rendering only as an outline. This example is in Quest for Booty, but it has much the same rendering as ToD does, so it is applicable to both games: |
OK, so I have been playing around with renderdoc to see what the problem is and this is what I found. The missing foliage is well and truly not there, no draw calls except for one solitary plant in this foliage system, which leads me to believe this is a cpu problem. I would guess this is an spu problem as a task like this seems too minor for the ppu. What I think what is suppose to happen is this spu function is to go around and update the foliage to different levels of opacity as the camera gets closer, but in RPCS3 the function stays at the first foliage it can find until it has to make a unique mesh fully opaque wherein it goes to the new foliage and dumps the old one. As for the outline shader, I may not know much about these things, but I don't think a single minor mesh is suppose to draw over a thousand times in a single frame. A third of the frame render time is dedicated to that one plant, and to add to that the first several hundred draws just draw the same few pixels on the screen. Although that could be just how the game does it, but that seems like a horrible optimization. Anyway that is just some speculation on my part. |
Needs testing on AMD/INTEL. NVIDIA is notorious for having rounding issues that can cause strange visuals like this. |
I tested it on two different machines in Tools of Destruction and got the same result.
Nvidia.Capture.mp4
AMD.Capture.mp4Both using Vulkan but OpenGL doesn't seem to change anything (on Nvidia at least). |
I think there are two separate issues in this issue, the foliage sorting and the outline shader. I think what kd-11 is talking about is the shader issue. What you have tested is the sorting issue. If you want an example of the shader problem in action, go to hoolifar island in QFB. If you don't have QFB, Planet Mukow's foliage has the same problem, so you can check it there. |
Hey @Shadowsplace, can you check the foliage in the imperial fight festival with your AMD machine? It is different than the ones on cobalia and I was wondering if @kd-11 is right about this particular part of the issue is vendor related. And sorry I couldn't do it, I don't own any AMD gpus. Here is an example of the problem on Nvidia hardware: |
Thank you for testing this, Shadowsplace, with this we now know both issues are not vendor related. I still think that the sorting part is a spu(or ppu) problem, but I don't know what could cause this particular shader to render as an outline. |
I was looking at an old resistance video when I noticed that the amount of foliage missing is worse than Tools of Destruction's. Here is a screenshot of RPCS3 in roughly the same location as 0:28 in the Somerset(40p) map: |
It probably is that since I made a Renderdoc of this issue and didn't find any of the missing meshes anywhere in it. But it also seems to be different than the fade in/out as that works correctly with the one mesh that does render. Also certain multiplayer maps can run more than one at a time for some reason. |
I believe ratchet games culls lots of stuff in case of low fps before the rendering stage at all. I've checked a lot of ToD renderdocs and if it runs too slow a lot of stuff is not even in the renderdoc. But at the same time the foliage is never there no matter the fps so it might be some stage before the render stage that removes them, and not some rsx culling. |
I have thought a bit about the possibility of this being related to a performance cull, and now I think that this culling system might not be receiving a proper(or any) performance report. That would explain why there is generally only one mesh rendered at a time, because to the instanced mesh system the PS3 is getting absolutely slammed, so it renders the bare minimum amount of meshes it can(only one). That would also explain why Grimsby(40p) in CTF can render more meshes at once, because it is getting a lighter report. Now this is all guesswork, but it is the only thing that I can think of that would cause this. |
I have to host the video somewhere else because GitHub will say the video is corrupt or too big. OpenGL Comparison I know this is a different game. Spooky. But the issues look the same. I can test on my Intel uhd 620 igpu laptop later for a comparison there? Would that be helpful or because igpus are not officially supported would it be meaningless? |
This one never got triaged. I've added it to backlog. |
I'll admit, I don't see the similarity. In TOD & R:FOM they both can only show one or few pieces of foliage at a time with them popping around as you get closer or farther, this seems more gradual(except for the trees suddenly popping up in the background in the Vulkan example). I wouldn't even say it was the outlined plants part of this issue, as that remains consistent at any distance with any renderer. But maybe the underlining renderer could be used differently? |
You never see similarity to ANYTHING I say so IDK |
I'm sorry about that. But issues with Oblivion were fixed with the PC uptime problem I posted, so maybe it is similar and would be fixed with this. |
Test #15471. It's not directly aimed at this issue (I haven't deep-dived this one yet) but the cause could be related. |
I can still replicate the issue in Resistance: Fall of Man as of version 0.0.31-16351-ea891829.
Untitled.video.mp4 |
You know, with Resistance: Fall of Man showing multiple clusters rather than a single plant, could that in fact be a different issue? I mean this issue turned out to be different from the one that affected Resistance 2 and ACIT on NVIDIA, who's to say this isn't a different issue either? Still, this is only speculation, I won't make another issue until we know for sure. |
It might be the same issue, but it has improved. Here is a screenshot with version 0.0.30-15956: And version 0.0.30-16096 with the same behavior as the previous video I posted: #15471 doesn't seem to have made any difference in this case. I'll try to narrow down the commit that made the improvement. |
This one is weird. I'll have to investigate assuming it's multiple issues. Hopefully it's not related to depth precision since that can only be correctly resolved with software rendering. |
Ok, nothing too special here. It's what I expected. PS3 doesn't have dedicated instancing hardware, but it can do instancing through like a million different methods by maniupulating the FIFO puller. We just didn't have a pattern match for the registers this game is using to implement it. |
#15483 implements the feature, though in a very suboptimal way right now. A lot more work is needed to get this ready for merge. |
Quick summary
In some early Insomniac games, only one foliage instance can be visible at a time
Details
In Ratchet & Clank: Tools of Destruction, New minor foliage will replace rather than supplement other older foliage.


Foliage fades in as normal:
And then when a new foliage loads in it completely replaces the old one:

Now this would be a minor nitpick, if Resistance: Fall of Man (another insomniac game) didn't use the system more extensively and for a gameplay purpose like hiding mines.
Here is an RSX Capture:
BCUS98127_20210823151612_capture.zip
And here is the system:
The text was updated successfully, but these errors were encountered: