Shaders Final Assignment

sounce code

Concept / Reference

At first, I was inspired by massive public projection mapping projects we can see in a lot of places, where a 2D pattern would be projected onto a 3D surface, but with edges aligned with the vertices of the actual building.

I was looking for 3D models of real-world buildings, and first found the Oriental Pearl Tower and the Wukang Building. 

Enlarge

截屏2021-10-20-上午7.58.19
Oriental Pearl

Enlarge

截屏2021-10-20-上午7.58.34
Wukang Building

However, as I started implementing the B render pass, I added new contents such that a single building does not really fit my aesthetic choice, so I switched to a model of the entire Pudong skyline. Since it is a complex model, the file size is quite large.

Enlarge

截屏2021-10-20-上午8.05.32
Pudong Skyline

A Render Pass

The A render pass started with loading the model and placing it in a correct and visible position. This includes translating, rotating, and scaling. 

Enlarge

截屏2021-10-20-上午8.15.57
loading model

Second, I went to the fragment shader, added two colored lights.

Enlarge

截屏2021-10-20-上午8.18.59
colored lights

Thirdly, I simply added some oscillation to the y and z of the vertices, making it looks wavy. 

Enlarge

截屏2021-10-20-上午8.21.49
oscillating vertex

B Render Pass

At this point, this sketch reveals to be very similar to the synthwave aesthetics. Which are the 2010s retrospective appropriation towards the 1980s science-fiction, arcade, and pop culture named after the iconic warm and melodic synth sounds. Neon colors and grids, glowing trees and palm trees, futuristic city skylines, and sports cars are its common elements.

Enlarge

截屏2021-10-20-上午8.29.17
synthwave

Hence, I leaned toward that visual representation.

Firstly, I created a glowing red-orange-yellow circle.

Enlarge

截屏2021-10-20-上午8.31.59
glowing circle

Secondly, I added a layer of gradient noise and blended it with the glowing circle. This creates a glowing and wavy feel to the background shape. Also, a y-axis blue gradient is also added to the scene.

Enlarge

截屏2021-10-20-上午8.32.43
gradient noise

The last step is just to blend A pass and B pass together, which I again used the different mode.

gl_FragColor = abs(.95*back - 1.4*video);

Final Outcome

Together, the oscillating effects create an illusion as if the air is overheating and creates optical disorders. The whole scene is made panoramic, and it successfully captured the kind of macro narrative of both synthwave aesthetics and our current future vision of the society. The only regret of this production is that the model file is too big so that sometimes the IDE breaks down.