LyCheSis:ShowCase

LyCheSis:ShowCase

Who am I?

Unity / Unreal Developer and 3D Artist


What I write about


Recent Posts

Development

Unity's Timeline component is a powerful NLE animation system with a highly modular internal structure.

As such it can be interesting to access parts of it via the API:

// PlayableDirector references to the timeline asset called PlayableAsset
PlayableAsset playableAsset = director.playableAsset;

// Cast it to a proper timeline asset
TimelineAsset timeline = (TimelineAsset)playableAsset;

// Get all the timeline tracks as TrackAsset
IEnumerable<TrackAsset> trackAssets = timeline.GetOutputTracks();

// Iterate through all the tracks
foreach (TrackAsset trackAsset in trackAssets)
{
    Debug.Log...

WebGL.jpg

Initial download size on the web is very important and Unity is, at least in its basic form, by nature not the perfect choice for building small, efficient WebGL applications.

But there are a lot of dials and buttons to press, allowing us to tune the size even without having to resort to Project Tiny.

I set out to see how small I could get a WebGL build. As reference I took the default Unity Universal Render Pipeline template and went through all the optimization options.

Results

Render Pipeline Publish Compression Texture Compression Shader Stripping Code Stripping Size on Disk
Univer...

Here's a collection of shader algorithms in node form for the Amplify Shader Editor. Useful, should you ever want to build a shader with custom lighting and are too lazy to do it in code.

Diffuse

Diffuse

Simply the dot product between the surface normal and light direction in world space.

Specular

Specular

The dot product between the surface normal and the normal half way between view direction and light direction. The hardness can be adjusted by power with the hardness as exponent.

Fresnel

Fresnel

The dot product between the surface normal and the view direction. This is basically the incidence angle and can be us...

Optimisation tips for various platforms taken from various Unity/Unite talks:

Mobile VR:

Youtube: Unity LA 2018: Going for Speed Maximizing Performance on Oculus Go

CPU

  • Enable Single-Pass Stereo
  • Static Batching - One material per Mesh and mark meshes as static.
  • Bake Lighting - Per-pixel lights break batches.
  • Occlusion Culling - Don't draw stuff you can't see.
  • If Umbra fails build custom occlusion engine - Interiors work better with a custom portal engine.
  • Oculus Go can handle large textures - 4096x4096
  • Oculus Go can do small head translations in addition to head rotation.

GPU

  • Faster Fragmen...

Here is a quick cheat sheet on how to add a proper ssh key for Sourcetree / Bitbucket from a Windows system with the PuTTY Key Generator.

Screenshot of PuTTY Key Generator

The process is not complicated by any means, but getting things mixed up simply results in Bitbucket or Sourcetree rejecting the key, making tracking down the problem more difficult than it should be.

Steps are:

  1. Press Generate to create the key.
  2. Press Save private key to save the private key to disk.
  3. Copy the public key from the text area box above into the clipboard.
  4. Paste the public key into the Bitbucket > Settings > SSH Keys section on the website.

If...