Skip to content

Instantly share code, notes, and snippets.

View keijiro's full-sized avatar

Keijiro Takahashi keijiro

View GitHub Profile
@keijiro
keijiro / mesh_to_pointcloud.md
Last active October 9, 2023 12:34
How to convert a mesh into a point cloud with Houdini.

screenshot

  1. Import the source geometry.
  2. Append a Point Wrangle SOP and set the following snippet.
int vlist[] = pointvertices(0, @ptnum);
vector uv = vertex(0, "uv", vlist[0]);
@Cd = colormap("$HIP/TEXTURE_FILENAME.jpg", uv);
  1. Insert a Delete SOP. Change the pattern to "*". Enable "Keep Points".
@keijiro
keijiro / CFD.hlsl
Last active August 12, 2023 04:04
CFD.hlsl
#version 150
// Pseudo fluids, heavily inspired by flockaroo's single-pass CFD
// https://www.shadertoy.com/view/MdKXRy
in VertexData {
vec4 v_position;
vec3 v_normal;
vec2 v_texcoord;
} inData;
@keijiro
keijiro / disco.hlsl
Last active May 18, 2023 10:46
Disco mode shader for Windows Terminal
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings
{
float Time;
float Scale;
float2 Resolution;
float4 Background;
};
@keijiro
keijiro / ShaderGraphExamples.md
Last active May 7, 2023 05:40
Shader Graph Examples インストラクション

※画像内の文字が見にくい場合はクリックして拡大してください。

必要なもの

Shader Graph を編集するには

既存のファイル(拡張子.ShaderGraph)をダブルクリックするとエディタが開きます。

@keijiro
keijiro / KlakNDI.md
Last active April 27, 2023 09:55
KlakNDI README

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 / 00_blot9.md
Last active March 29, 2023 02:16
KodeLife fragment shader sketch

gif

@keijiro
keijiro / ToggleTest.shader
Last active March 24, 2023 00:43
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
import sys
pcount = int(sys.stdin.readline().rstrip())
for i in range(0, pcount):
sys.stdin.readline()
for j in range(0, 16):
coord = sys.stdin.readline().rstrip().split()
coord = list(map(lambda x: float(x) * 0.2, coord))
coord[2] = max(0, coord[2] - 0.075 * 0.2)
@keijiro
keijiro / c3d-unity.md
Created November 13, 2016 15:04
Mocap data processing workflow (c3d -> Unity)
  • Import the .c3d file into MotionBuilder.
  • Create an actor and align it to the markers. Then assign the markers to the actor. See the tutorial for the detailed steps.
  • Merge the .fbx file of the target model. See the tutorial for the detailed steps.
  • Characterize the target model. See the tutorial for the detailed steps.
  • Set the actor as an input source in the character settings. Then plot the animation to the skeleton. See the tutorial for the detailed steps.
  • Save the project at this point.
  • Select the joint hierarchy and the character, and then export it with "File" -> "Save Selection". Note that "Select Branches" in the right click menu should be used to select the whole hierarchy (left click only select a top node).
@keijiro
keijiro / windows-installation-steps.md
Last active December 5, 2022 07:03
This is how I set up a Windows system.