Major Granite for Unity Release

We’ve released a major update of our Granite for Unity plugin. The update is released for 2018.2.

If you already use our plugin, you can download it here. If you're new with the benefits of the Granite SDK, discover the most advanced texture streaming system for Unity 3D.

This post goes into the details of what’s new and how you can benefit from it.

Improved In-Game Performance

To know which parts of the visible textures to load, Granite uses an analysis step (our Resolver). The default setting for this resolver was using a second rendering pass. With Unity 5.6 we introduced an experimental update that enabled this analysis to happen during the main rendering passes. This feature is now no longer experimental and we’ve enabled it by default. You may see a significant reduction of your frame time by up to 40%. The exact improvement depends on the complexity of the scene, where scenes with lots of draw calls will reap the biggest reward.

Faster build times

We’ve optimized the internal asset database of our tools so it more efficiently scans files for changes. This may lead to significant build improvements. The biggest improvement happens when only a few textures were newly added or changed in a large project. This allows you to update your Granite files faster when iteratively updating your Granite materials. While before it could take several minutes to build your Granite files this now takes only seconds if little content has actually changed. Obviously the total time still depends on how many textures actually changed.

We’ve also been rolling out features of Granite SDK 5 in our Unity plugin silently over the last couple of versions. Granite 5 stores compressed texture data of each material instance separately in a .GTEX file. During production, Granite can stream directly from these files so you don’t need to build the final paged streaming files. If you are building a project with many materials that use “conventional” texture sizes like 4K, iteratively building Granite files should be much faster now. You can commit these .GTEX files to your version system and distribute these internally during production.

Improved wildcard pattern matching and external redirects

Granite supports importing large textures which are split over several smaller image files on-disc. In addition to this, it also supports importing only a small placeholder texture in your project and redirecting our tools to use a large version of the texture stored somewhere outside the project (or on a network share even). This way you don’t need to import these large texture files into Unity. You can find the “Redirect” feature on the material inspector.

Our existing support for tiled images used project-wide settings that enabled automatic detection of file names matching the pattern. However, this sometimes lead to missed pattern matching or detecting a file pattern when there was none. Our new implementation allows you to configure patterns and redirects straight from the Unity material inspector. Furthermore, the settings are now no longer project wide but can be tweaked per texture individually. The new interface now also allows you to manually override the matched pattern and configure some extra settings of the pattern (like leading zeros, the index of the first tile being zero or one based, …).

Displacement mapping

Granite's support for displacement mapping is now exposed to the Unity renderer. This allows users authoring their own displacement shaders to not only use Granite in the pixel shaders of displaced materials, but also in the other shading stages. Most importantly, this enables the streaming of displacement maps using Granite.

Upgrading your project

The update was released for 2018.2. This version of the plug in is not fully backwards compatible with previous (2018.2) versions. If you are not using wildcard textures (UDIM, tiled images) or external redirects, simply rebuilding the tilesets (Plugins > Granite > Build Editor Tilesets > Build) should be enough. If you were previously using wildcard textures (UDIM, tiled images) or external redirects, you will have to set these up again. To set-up redirects/udims in the new version, go to the Pattern Matching section in the material inspector of the material you need to reconfigure.

What’s next?

We’ve already tested Granite with the Unity 2018.3 beta and have it up and running. We’ve also integrated Granite with the Scriptable Render Pipeline. We are thinking about the best way to make this available for all Granite for Unity users. Also, we’ll be rolling out some of the more advanced Granite features like configuring paging modes (for game patching) and different compression settings.

Let us know if there’s anything you would like us to add.

Leave your information