Browsing articles from "May, 2019"
May
26
2019

ffmpeg stream raw video into Unity Texture2D

Small proof-of-concept idea about streaming raw video from commandline ffmpeg into Unity, using UDP streaming. It works ok for small resolution and low fps rate, but breaks/goes out of sync if any udp data goes missing. Sources:https://github.com/unitycoder/ffmpegStreamToUnity Instructions:– Download ffmpeg https://ffmpeg.org/download.html– run from commandline: > […]

May
25
2019

Enable HDR Color picker for Shader or Script

I needed HDR color for some old Unlit/Color-shader, and for c# script also, found out that you can add this attribute for the shader: And for the script: More info:https://docs.unity3d.com/ScriptReference/ColorUsageAttribute.htmlhttps://docs.unity3d.com/Manual/SL-Properties.html Also make sure your Camera has [x] HDR enabled

May
23
2019

Scrolling Texture Plotter using CustomRenderTexture

Saw interesting question in the forums (link) about drawing plotter like data that would scroll up, got idea about custom rendertextures (since it was similar to this effect) Basic idea: – use CustomRenderTexture, double buffered so it can read from itself – draw color32 array […]

May
12
2019

Using SharpCompress in Unity

If you need to work with zip/rar/tar/gzip packages, can use SharpCompress to handle opening or creating those files. Compile SharpCompress DLL (unless you can find it online somewhere) Download project https://github.com/adamhathcock/sharpcompress Unzip and open in VisualStudio (i used 2017) Security warning, press ok Security warning, […]

May
9
2019

Creating Single .EXE from Unity Build Files

Using Enigma Virtual Box https://enigmaprotector.com/en/downloads.html – Select input file name: (This is .exe file from unity build)– Enter output file name: (this is the output single exe file) *This MUST be same as the original .exe file name, so that data folder gets found.– Click […]

May
9
2019

FAST-Algorithm for Corner Detection in Unity

Converted this (basic) algorithm into Unity c# https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_fast/py_fast.html FAST (Features from Accelerated Segment Test) is a way to detect corner features from an image. Source: *not optimizedhttps://gist.github.com/unitycoder/7649f62a6eceeb761db7f0092d9c3df1

May
6
2019

Ray Marching

Tested ray marching in Unity after watching this episode of The Coding Train. Source code:https://gist.github.com/unitycoder/7120e492deba748dba3d4e1e424d3c2a Usage:Set camera to 0,0,-10Projection: OrthographicThen Place spheres under empty gameobject, with sphere z values at 0

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.