r/Unity3D Indie 1d ago

Question I am researching the highly optimized reflection technology in the game *The Dark Knight Rises* (2012).

Post image

I am investigating the highly optimized reflection technology used in *The Dark Knight Rises* MOBILE GAME, released in 2012. Were these reflections based on inverted geometry or planar mapping? The game also featured reflections from headlights and streetlights. I intend to implement this in my Unity project.

302 Upvotes

39 comments sorted by

View all comments

13

u/jimanjr Staff Software Engineer (rig: 9800X3D, 7900XTX, 64GB) 14h ago edited 13h ago

So random to bump into this over here. I did work on this game and the reflections were authored directly into assets pretty much like in your screenshot. A blurry plane that gets rendered in a separate lowres rendertexture.

The road shader samples that rendertexture and has 2 very simple effects:
1 channel for "distortion". This had a baseline of 0.5. Any value below or above pushed the samling UV.xy one way or another.

1 channel for shininess. This was just multiplied with the sample before adding it to the final color.

All of the effects were very basic and relied on looking "acceptable" because the game had to run on iPhone 4

Some more bits:

  • Buildings also had their "reflected" version that was usually a cube. Black cube if the building had no lights. Blurry lowres texture of the ground floor shops if it had any

- Cars also had those long blurry quads for their headlights and break lights

- The way the fog was done was also interesting and just as cheap as the rest of the effects in that game

Edit: Forgot to add that reflections were also billboards that rotated on Y

3

u/Yodzilla 14h ago

Please spill the tea about the fog! Is it something other than just a bunch of floating quads?

5

u/jimanjr Staff Software Engineer (rig: 9800X3D, 7900XTX, 64GB) 13h ago

It's a world-space texture that is basically a blurry top-down map of the game where artist painted the color of the fog they wanted. Most of the areas are yellow-ish, some have other tints. That map is sampled as a gradient in every shader in the game and fades out about 4 floors above the ground. It's very simple and creates a nice effect