KITASENJU DESIGN BLOG

memo, html, javascript, unity

Entries from 2021-10-01 to 1 month

絵のタイトル

マグリット100 Famous Paintings by Rene Magritte ダリList of works by Salvador Dalí - Wikipedia ベーコン List of paintings by Francis Bacon - Wikipedia ジェフクーンズ

ffmpegで倍速再生

3.0倍するには以下 ffmpeg -i src.mov -vf setpts=PTS/3.0 -af atempo=3.0 dist.mov

alpha test (cut off) on VFX Graph

Select "output particle quad". Check "use alpha clipping" on inspector.

sound sine generator

You can made sine wave sound like this in Unity using UnityEngine; public class SineGanerator : MonoBehaviour { private AudioSource AudioSource; [SerializeField, Range(0, 1)] private float Volume = 1; [SerializeField, Range(100, 1000)] pri…

yubi

set webcams to dropdown

WebcamをDropdownから選べるようにする using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; public class WebCamSelector : MonoBehaviour { [SerializeField] private TMP_Dropdown _dro…

あたらしいblink

blur blink https://codepen.io/kitasenjudesign/pen/BadpmMJ underline blink https://codepen.io/kitasenjudesign/pen/LYjxedj bg blink https://codepen.io/kitasenjudesign/pen/MWvJQeJ bg blink https://codepen.io/kitasenjudesign/pen/mdMRXBY

cinema4dでpivot変えたい

「shift + c」で「Axis center」を検索

dotween Sequence

複数のdotweenを一つにする 関数名 Append Sequenceの最後にTween/Sequenceを追加する Insert 指定した秒数後に再生開始するTween/Sequenceを追加する Join 直前に追加されたTween/Sequenceと同時再生する Prepend Sequenceの最初にTween/Sequenceを追加する…

3d texture + slit-scan

slitscan with 3d texture using System.Collections; using System.Collections.Generic; using UnityEngine; public class slitscan3d : MonoBehaviour { public RenderTexture _rt3d; public Material _mat; private WebCamTexture _tex; private int _in…

zoom uv on shader

原点に移動してスケールして、また戻す float s = 1 - 0.95 * (0.5 + 0.5 * sin( _Time.y*0.5 )); float2 center = float2(0.5,0.5); i.uv = (i.uv - center) * s + center; fixed4 col = tex2D(_MainTex, i.uv );

スクリプト上でマテリアルのプロパティをコピー

_distMat.CopyPropertiesFromMaterial(_srcMat)

ChromaKey PostEffect

Unity でクロマキーシェーダを作ってみた - 凹みTips をpost effectで使えるようにしてみました。 Shader "ChromaKey/ChromaKey_PostEffect" { Properties { [Header(Material)] _Color ("Color", Color) = (1, 1, 1, 1) _MainTex("Texture", 2D) = "white" …

Resize renderTex that already exists in assets

renderTex.Release(); renderTex.width = _stageWidth; renderTex.height = _stageHeight; renderTex.Create();

screen pos and unlit

Shader "Unlit/ScreenPos" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag // make fog work #pragma multi_compile_fog #inclu…

RenderTexture + GetPixels

using UnityEngine; public class RenderTextureColorPicker : MonoBehaviour { [SerializeField] private RenderTexture _target; private Texture2D _texture; private void Awake(){ _texture = new Texture2D(_target.width, _target.height); } private…

blink loading with css

#loading{ animation: blink 0.5s infinite alternate; } @keyframes blink{ 0% { color: #000000 } 50% { color: #aaaaaa } 100% { color: #000000 } }

Event Hundler in ARTrackedImageManager

//ARTrackedImageManager _trackedImageManager; void Awake() { _trackedImageManager.trackedImagesChanged += _onChange; } private void _onChange(ARTrackedImagesChangedEventArgs args){ List<ARTrackedImage> added = args.added; List<ARTrackedImage> updated = args.updated; List<ARTrackedImage></artrackedimage></artrackedimage></artrackedimage>…

"FOOTER"