Entries from 2021-01-01 to 1 year
Default cloth simulation in Unity 【Unity】Cloth コンポーネントを使って布の動きを表現する方法 | STYLY Cloth - Unity マニュアル マニアックな問題
関連:https://kitasenjudesign.hatenablog.com/entry/2021/11/13/133126 using System.Collections; using System.Collections.Generic; using UnityEngine; public class LineMesh : MonoBehaviour { [SerializeField] private MeshFilter _meshFilter; [S…
option(alt) + クリック shortcut ショートカット
以下の四つ projectSettingのqualityがlowとかになっていないかチェック Sceneのウィンドウの上部で、ライトがオンになっているのをチェック DirectionalLightとかで、shadow castがオンになっているのをチェック 対象物のshadow caster recieverをチェック
フォトショがよくわからない。パスでマスクを作るときはこんな感じで良いのだろうか。 全然直感的でない。 マスクされたいレイヤーを選ぶ 右クリックからクリッピングマスクを作成 その下のレイヤーにマスクしたいパス?をかいておく
count frame every second. using System.Collections; using System.Collections.Generic; using UnityEngine; public class FPSCounter : MonoBehaviour { private int _counter=0; private float _time = 0; public int fps =0; public static int Fps=0;…
render outside safe areaにチェックを入れる
150Gくらい軽くなった qiita.com
$ arcoreimg eval-img --input_image_path=hoge.png というのでチェックして0以上の数値が出ないと、apkコンパイル時にエラー 画像サイズや余白の調整でなんとかなることがあった
現状の問題点 具体例 仮説 仮説をもとにした作品
feedbackするためには、現在のフレームframe(t)に過去フレームframe(t-1)を描画する必要がある。 frame(t) = effect( frame(t), frame(t-1) ); ① メインcameraのonRenderImageでrenderTextureAに描画(ノイズ等でずらしたり、位置を動かしたり)。これは描画…
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Rakka : MonoBehaviour { [SerializeField] private Ball[] _prefabs; private int _count=0; void Start() { _loop(); } private void _loop(){ int index =…
align buttons horizonally on Inspector 8個x3行、かいた for(int j=0;j<3;j++){ EditorGUILayout.BeginHorizontal(); for(int i=j*8;i<8*(j+1);i++){ if (GUILayout.Button(""+i,GUILayout.Width(30))){ exampleScript.SendMessage ("SetEffect", i, SendM…
string[] youbiAry = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}; string[] monthAry = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; var time = DateTime.Now; var hh = time.Hour.ToString("00"); va…
FRAMED MONO X7のwifi設定をリセットする方法 前提 まずスマホアプリがうまくいかなかった うまくいった方法 PCで https://frm.fm/settings/devices にアクセス NEW SETUPからwifi設定等を入力、Download Settingsからxmlをダウンロード。 そのファイルをUSB…
https://glslsandbox.com/e#77263.0 #extension GL_OES_standard_derivatives : enable precision highp float; uniform float time; uniform vec2 mouse; uniform vec2 resolution; void main( void ) { vec2 position = ( gl_FragCoord.xy / resolution.xy…
//return x * x * (3.0 - 2.0 * x); return 6.0*x*x*x*x*x - 15.0*x*x*x*x + 10.0*x*x*x;
icon ikonate.com https://remixicon.com/ https://ionic.io/ionicons
ランダムに線を描く using System.Collections; using System.Collections.Generic; using UnityEngine; public class Lines : MonoBehaviour { [SerializeField] private MeshFilter _meshFilter; private Vector3[] _positions; private Mesh _mesh; // St…
微分=傾き 位置が時間とともに変化していく 位置の変化量=速度 速度の変化量=加速度(→速度一定なら加速度0) 積分=面積 速度の積分=距離(=位置) 加速度の積分=速度(加速度が一定の値なら、その面積(速度)は一定で増えていく)
glslのコード float circleWave(float t) { float d=1.0; float st = sin(d * 3.1415 / 2.0); float p = (mod(t * 4.0, 2.0) - 1.0) * st; float a = sqrt(1.0 - pow(p, 2.0)); float amax = sqrt(1.0 - pow(st, 2.0)); float b = sign(mod(t, 1.0) - 0.5); …
using System.Collections; using System.Collections.Generic; using UnityEngine; using ZXing; using ZXing.QrCode; using System.IO; public class BarcodeMaker : MonoBehaviour { private Texture2D _tex; void Start() { var text = "http://hogehoge…
子供のパーティクルサイズを親のスケールにあわせてリスケール public class ChildParticleScaler : MonoBehaviour { float scale; List<ParticleSystem> particles = new List<ParticleSystem>(); void Start() { scale = transform.localScale.x; particles.AddRange(GameObject.FindObject</particlesystem></particlesystem>…
js function map (value, fromMin, fromMax, toMin, toMax){ return (value - fromMin) / (fromMax - fromMin) * (toMax - toMin) + toMin; } glsl float map (float value, float fromMin, float fromMax, float toMin, float toMax){ if(value<fromMin)value=fromMin; if(value>fromMax)valu</frommin)value=frommin;>…
陰影の、陰(shader)をつける Shader "RDSystem/Surface2" { Properties { _MainTex("RD Texture", 2D) = "white" {} [Space] _Color0("Color 0", Color) = (1,1,1,1) _Color1("Color 1", Color) = (1,1,1,1) [Space] _Smoothness0("Smoothness 0", Range(0, …
gameObject.GetComponent<ParticleSystemRenderer>();</particlesystemrenderer>
おかしいので trail rendererだけgameObjectを単独にし、使う時だけInstansiateする。
using UnityEngine.VFX; VisualEffect _effect; _effect.Play(); _effect.Stop();
var info = new RenderTextureDescriptor(); info.dimension=UnityEngine.Rendering.TextureDimension.Tex3D; info.colorFormat = RenderTextureFormat.ARGB32; info.width = 512; info.height=256; info.volumeDepth=90; info.depthBufferBits = 0; info.ms…