A Fight in the Skies

final image

This Scene depicts a fight in an alternate timeline where Grogu fights against Darth Vader with the support of Mando to save the earth. We stole the script of the new movie 'The Mandalorian and Grogu', which will be released in may, in which Grogu and Mando travel in time to face off against the Imperium. We wanted to give a small sneak peak into the movie's resolution.

Interestingly, the fight takes place in the skies of earth. This is possible because earth does in fact exist in the Star Wars universe under a different name!

Render time and hardware details:

This scene contains over 3 million triangles, split across 440 individual meshes. It was rendered in 8K using 1024 samples.

Rendering the base scene took around 8080 seconds.

For post-processing, the normal and albedo passes took 1206 and 1311 seconds respectively.

The blooming and denoising postprocesses each took just over a second.

The PC used to render this has 16GB of RAM and uses a AMD Ryzen 7 5800X3D 8-Core Processor.

Scene evolution:

At the start of the scene building progress was a lot of experimentation using the lighting. This image shows an early concept.

lighting image

At first, we wanted to have the scene play out inside a spaceship, as can be seen below. We later scrapped that concept and moved the scene outside, to better portait the space fight in the background.

inside image

This also allowed us to use many more assets, such as the razer.

razer image

Putting everything together, we arrived at the first scene which took place in space, using the razer in the background:

razer background image

Vader and Grogu were then quickly moved to stand atop the Razer.

razer standing image

Afterwards, our attention was more on the background fight. Adding a few TIE-Fighers in the background already improved the scene's overall feel.

background ties image

The fight between X-Wings and TIE-Fighters also came together nicely for the background.

background fight image

Finally, putting everything together resulted in the first version of our final rendering.

first final image

Since then, we have improved the image and lighting quality of the image overall, and had to fix some issues with the roughness and metallic map of the razorcrest, as is clearly visible above.

After adding the planet, we finally arrived at the final image. This was an alternate version, with a slightly lower exposure on the environment map:

alternate final image

Third-party assets:

"Realistic 3D Earth Model With 4K Textures" (https://skfb.ly/6RHTZ) by Omer Bhatti is licensed under Creative Commons Attribution-NonCommercial (http://creativecommons.org/licenses/by-nc/4.0/).

"Sky" NASA/Goddard Space Flight Center Scientific Visualization Studio. Gaia DR2: ESA/Gaia/DPAC. Constellation figures based on those developed for the IAU by Alan MacRobert of Sky and Telescope magazine (Roger Sinnott and Rick Fienberg).

"Mandalorian - Grogu ( The force )" (https://skfb.ly/onVoy) by Nestaeric is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Darth Vader" (https://skfb.ly/onpSP) by HarrisonHag1 is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Star Wars: TIE/ln Fighter" (https://skfb.ly/oF7Cp) by Daniel is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"T-65 X-wing Starfighter - Star Wars" (https://skfb.ly/6RUXI) by Quiznos323 is licensed under CC Attribution-NonCommercial-ShareAlike (http://creativecommons.org/licenses/by-nc-sa/4.0/).

"Razor Crest model" (https://skfb.ly/oWoHp) by Doom is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Death Star - Star Wars" (https://skfb.ly/ouQDM) by SebastianSosnowski is licensed under CC Attribution-NonCommercial-NoDerivs (http://creativecommons.org/licenses/by-nc-nd/4.0/).

"Darth Vader's Lightsaber (Star Wars)" (https://skfb.ly/6FQDo) by Yanez Designs is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"HW13 R2D2 HP" (https://skfb.ly/6WU78) by Dmitriy_Remezyuk is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Brick Wall Test" (https://skfb.ly/EzMp) by adamdart7 is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

Features

Alpha Masking

Alpha Masking allows us to simulate complex structures by using an alpha channel to control the transparency of textures. This allows us to use a simple mesh to achieve a complex visual effect, that would otherwise require very detailed meshes.

We extended the instance implementation to include support for alpha masking by adding a randomness factor which decides if we dismiss an intersection based on the value of the alpha-masking-texture at that coordinate.

We had no major problems, except for the fact that the blender exporter put the alpha values in the fourth dimnension in the original texture, making the usage somewhat tricky.

Clearcoat Material

A clearcoat material simulates an additional, transparent layer around the already existing base material. This helps us achieve a realistic representation of glossy surfaces.

The clearcoat is implemented as a new bsdf, which calls the bsdf of either the glossy layer or the base, depending on the transmittance.

Same as before, the blender exporter posed the most problems, as it did not extract materials in the desired way, making testing this feature difficult.

Post Processing: Bloom

Blooming is a post-processing procedure that enhances and intensifies bright lights in the scene.

The blooming post-process calculates if a pixel of the given images exceeds a brightness threshold, and then brightens the surrounding pixels accordingly.

The biggest problem was figuring out the correct brightness threshold and illumination radius for the desired effect.

Normal Mapping

Normal Mapping can improve the detail and realism of textures. It works by reading a normal map for a given mesh and can simulate complex surface structures without requiring an excessive amount of triangles in the mesh.

We extended the instance implementation, more precisely the transformFrame function, to apply the normal mapping if such a texture file exists in for the instance.

Our main problem and biggest bug was thaty the tangent calculation for the mesh intersection was missing, leading to incorrect or nonexisting applications of the normal mapping algorithm.

Image Denoising

Image Denoising improves the quality of images generated with a relatively low sample count.

We integrated the suggested denoising library as a post-process.

We experienced some huge issues with the setup of the denoising library, which resulted in one of us installing a linux system on their laptop, as it would not work otherwise. This fixed most of the issues.

Improved Environment Sampling

Implementing this feature consists of modifying the existing envmap implementation to add logic for the correct sampling distribution. In the envmap's constructor, an array with the weights for each (u, v) coordinate pair is constructed, which is then later searched using binary search to find the correct pixel to be sampled.

The biggest issue was that the first, naive implementation of the search algorithm was extremely slow, making testing hard. After everything worked, we switched to binary search and are now able to render images reasonably fast.

Area Lights

Area Lights are a new light source which behave similar to emissive shapes. They can also illuminate a specific area, but they cannot be intersected with themselves.

As suggested, we implemented a new light which holds a child shape. Implementing this feature also included updating the sampleArea method for the sphere.

After finding the correct formulas for sampling the area light, we had no other issues with this feature.

About

Lorem ipsum dolor sit amet, consectetur et adipiscing elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. Aliquam libero et malesuada fames ac ante ipsum primis in faucibus. Cras viverra ligula sit amet ex mollis mattis lorem ipsum dolor sit amet.