Sprite Dicing

Just finished working on an editor extension for Unity which allows to split up a set of large sprite textures into small chunks, discard identical ones, bake them into atlas textures and then seamlessly reconstruct the original sprites at runtime for render.

This technique allows to significantly reduce build size, in cases when multiple textures with identical areas are used.

Continue reading Sprite Dicing

Using Raw Input API in Unity

While working on a broadcast solution that used Unity to render and control a virtual character, I’ve faced a problem of capturing keyboard input events while the application is not in focus. It turned out that it’s not something doable using Unity’s input system, so I’ve assembled a C# wrapper over the Windows RawInput API to hook directly to the native input events.

Project on GitHub (MIT license): github.com/Elringus/UnityRawInput

Dark Matter VFX

A while ago, working on Breached, I’ve been figuring out how to visualize a weird in-game creature called “Keeper”. It was something like an electromagnetic anomaly, stalking around and hunting for player.

The project is now using another engine and concept of those creatures completely changed, but I kinda liked the effect and decided to share it.

Here is a Git-repo with Unity project: http://git.io/vmNpz
And an assembled unitypackage: http://git.io/vmNpW

Blend Modes in Unity

You’ve probably heard about blend modes available in image and video editing tools like Photoshop or After Effects. It is an important technique for content creation and has long since become an integral part of them.

But what about video games?

Say you need to use Color Dodge blending for a particle system. Or your UI-artist made a beautiful assets in Photoshop, but some of them are using Soft Light blend mode? Or maybe you’ve wanted to create some weird Lynch-esque effect with Divide blending and apply it to a 3D mesh?

Blend Modes in Unity game engine

In this article I will describe the mechanics behind popular blend modes and try to simulate their effect inside Unity game engine.

In case you are looking for a complete solution to use the blend mode effect in Unity, try this package on the Asset Store: http://u3d.as/b9w

Continue reading Blend Modes in Unity