Skip to content

Instantly share code, notes, and snippets.

Avatar

Keijiro Takahashi keijiro

View GitHub Profile
View RawToTexture3D.cs
using UnityEngine;
using UnityEditor;
static class RawToTexture3D
{
static Color IntToColor(uint b1, uint b2)
=> new Color((b2 + (b1 << 8)) / 65536.0f, 0, 0);
[MenuItem("Tool/Raw to Texture3D")]
static void ConvertRawToTexture3D()
@keijiro
keijiro / KlakNDI.md
Last active Sep 22, 2021
KlakNDI README
View KlakNDI.md

KlakNDI

gif

KlakNDI is a Unity plugin that allows sending/receiving video streams between several devices using [NDI]®.

[NDI]® (Network Device Interface) is a standard developed by [NewTek], Inc that enables applications to deliver video streams via a local area network. Please

@keijiro
keijiro / archive.sh
Created Sep 13, 2021
Archive an FCP project with tar/pigz
View archive.sh
tar --use-compress-program=pigz -c -v -f foo.fcpbundle.tar.gz foo.fcpbundle
@keijiro
keijiro / unity-axidraw.md
Last active Aug 29, 2021
My Unity-Axidraw workflow
View unity-axidraw.md

The following is my plotter art workflow with Unity.

  1. On Unity, render a monochrome line-art image using the Recolor (contour line) effect. The resolution of the image should be high enough. I usually use 2400x3840.

  2. Rotate it if needed. convert temp.png -rotate 90 render.png

  3. Convert it into SVG using autotrace. autotrace --centerline --output-format=svg render.png > plot.svg

View KlakSpout.md

KlakSpout

gif screenshot

KlakSpout is a Unity plugin that allows Unity to send/receive video streams using the Spout system.

@keijiro
keijiro / EdgeDetection.hlsl
Created Feb 18, 2021
Edge detection with shader graph custom function
View EdgeDetection.hlsl
void UVEdge_float(float2 uv, float width, out float edge)
{
uv = min(uv, 1 - uv);
float2 bd = saturate(1 - uv / (fwidth(uv) * width));
edge = max(bd.x, bd.y);
}
View TinyYolov2.md

TinyYOLOv2Barracuda

gif gif

TinyYOLOv2Barracuda is a Unity sample project that shows how to run the [YOLO] object detection system on the Unity [Barracuda] neural network inference library.

View AprilTag.md

jp.keijiro.apriltag - AprilTag package for Unity

gif

jp.keijiro.apriltag is a Unity package that provides an implementation of the AprilTag tracker.

AprilTag is a marker based tracking system developed by the APRIL Robotics Laboratory at the University of Michigan. Please see [the AprilTag web page]

@keijiro
keijiro / UnityStation_BoltMinis.md
Last active Jan 14, 2021
BoltとMIDIでグリグリコントロール!UnityでMIDI デバイスを使ってみよう! - Unityステーション
@keijiro
keijiro / HowToBackUpPlasticSCM.md
Last active Jan 6, 2021
How to make a backup of a Plastic SCM repository
View HowToBackUpPlasticSCM.md

Taking a snapshot of a Plastic SCM workspace with tar

On WSL:

cat ignore.conf | sed -e s/^/./ | tar -I pigz -c -v --exclude=.plastic -X - -f ../snapshot.tar.gz .

Making a backup of a Plastic SCM repository using the fast-export format