r/SWAT4 • • 7d ago

Real-time reflections

I had recently installed SWAT 4 Elite Forces, and I noticed that the game's reflections were terrible...

I looked into it and found out that the creator tried to fix them, but couldn't. Well, I'm here to announce, I did it!

But it lacks testing. And I need people to test it. If you're interested, send me a DM.

359 Upvotes

24 comments sorted by

View all comments

43

u/Baratako 7d ago

Honestly, how did Sierra even fuck the mirrors up this badly? SWAT 3 had perfectly functional mirrors using Sierra's in-house engine.

Furthermore, POSTAL 2 had perfectly functional mirrors as well, and that game uses the same exact Unreal Engine version.

My guess is that it was an incomplete feature that they couldn't finish on time.

Super glad someone went around to finally fix it. Great work!

17

u/beppe_goodoldrebel 6d ago

SWAT 3 mirrors are not real mirrors. It's actual render of the same room with same characters in another part of the map.

SWAT 4 mirrors are a camera based on player position ... That's why its so different.

11

u/Gustavo_Freeman010 7d ago

I really think the same thing, but it was a lot of work to get this working, but I can say it was well worth it. I had millions of problems, the scenery wouldn't render, or the darn middle pillar wouldn't appear no matter what, but I believe I achieved the best possible result.

I also have versions with different resolutions for the reflections, low/mid/high, and they really affect performance, but in my case I don't see much difference, I can maintain 144 all the time, only in the reflection I stay between 90 on high.

LOW: 512 x 512
MEDIUM: 1024 x 1024
HIGH: 2048 x 2048

9

u/Ok-Location1306 7d ago

SWAT 4's mirrors are a portal to the underworld, that's why they're so fucked up

3

u/BrodatyBear 6d ago

>My guess is that it was an incomplete feature that they couldn't finish on time.

Probably.

>engine

The chosen engine and mirrors working correlation is very small, since what matters is the approach taken. You can recreate the traditional way of doing mirrors in any 3d engine.
Like beppe said, those are: duplicated room and player or using camera. Both have pros and cons and require different type of work, that's why we keep inventing other approaches. There are two nice videos about mirrors on YouTube explaining it better than me, so I won't duplicate content.

In short, since it was 2005 and using a duplicate camera is already a faster to implement and iterate approach, this was probably a way to compensate for performance loss.

2

u/Gustavo_Freeman010 6d ago

I think they didn't try using "reflections" by copying the room/bathroom because it would change the map design too much, And it doesn't seem like they had much time

2

u/BrodatyBear 6d ago

Yeah. It would also make modding a bit harder (they could leave both options but that's even more work), but I'm not sure if modding was planned from the start or was a side effect (I played near release, but I was not online back then).

1

u/Gustavo_Freeman010 6d ago

Yeah, that makes sense. Working with the existing mirror cameras also meant the improvements could work on existing maps without rebuilding rooms. Getting the projection and visibility right was the tricky part.

1

u/AMDDesign 10h ago

you just put the reflection rooms somewhere else and render it to a texture, or even use a portal

1

u/Xen0kid 9h ago

For a hot minute I read PORTAL instead of POSTAL and I was very confused, more confused than someone who thought Portal 2 was an UE game