Skip to content

Instantly share code, notes, and snippets.

View whaison's full-sized avatar

whaison whaison

View GitHub Profile
@whaison
whaison / FragmentWithSurface.shader
Last active March 25, 2019 21:06 — forked from shop-0761/FragmentWithSurface.shader
Fragment と surface を一緒に使うやつ
Shader "Custom/fragmentWithSurface" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader {
Tags { "RenderType"="Opaque" }
@whaison
whaison / Maya.env
Created November 2, 2016 08:21
Maya.env     Dドライブにパス追加する設定 デフォルトは全部コメントアウトされてる。
//PCの環境変数
//Path C:\Users\ゆーざ\AppDうata\Local\Programs\EmEditor;C:\Users\ゆーざ\AppData\Local\atom\bin
//TEMP %USERPROFILE%\AppData\Local\Temp
//TMP %USERPROFILE%\AppData\Local\Temp
//Mayaの環境変数 http://www.dfx.co.jp/dftalk/?p=72
// Share plugin
//MAYA_PLUG_IN_PATH=Z:\share\maya\version\plugins;Z:\usr\maya\version\plugins;
//知っていると便利かもしれない環境変数一覧
//書き方がわかったところで
//本題の知っていると便利かも知れない環境変数の一覧です。
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Reflection;
@whaison
whaison / ShowBoundingBox.ms
Created February 19, 2017 12:35 — forked from deathponta/ShowBoundingBox.ms
【MaxScript】BoundingBoxの取得し最小値と最大値の位置にポイント配置
bb = NodeLocalBoundingBox $
bmax = bb[2]
bmin = bb[1]
Point pos:bmax box:off cross:on
Point pos:bmin box:off cross:on
@whaison
whaison / MELFiletoPythonFile_UTF-8_v00135_regex.py
Created February 17, 2017 12:30
MELFiletoPythonFile_UTF-8_v00135_regex.py
# -*- coding: cp932 -*-
import pymel.core as pm
import pymel.tools.mel2py as mel2py
import re
import math
import random
melCmd = """
@whaison
whaison / ImportScene\DisplayGlobalSettings_True_2017_lTimeModes_Array.py
Created February 16, 2017 07:11
ImportScene\DisplayGlobalSettings_True_2017_lTimeModes_Array.py
"""
Copyright (C) 2001 - 2010 Autodesk, Inc. and/or its licensors.
All Rights Reserved.
The coded instructions, statements, computer programs, and/or related material
(collectively the "Data") in these files contain unpublished information
proprietary to Autodesk, Inc. and/or its licensors, which is protected by
Canada and United States of America federal copyright law and by international
treaties.
@whaison
whaison / ue4_fbx_extention.T3D
Created February 14, 2017 03:58
ue4_fbx_extention.T3D
Begin Object Class=AnimSequence Name="ue4_fbx_extention"
Begin Object Class=FbxAnimSequenceImportData Name="FbxAnimSequenceImportData_0"
End Object
Begin Object Class=AnimCompress_BitwiseCompressOnly Name="AnimCompress_BitwiseCompressOnly_0"
End Object
Begin Object Name="FbxAnimSequenceImportData_0"
SourceAnimationName="Take 001"
End Object
Begin Object Name="AnimCompress_BitwiseCompressOnly_0"
End Object
@whaison
whaison / ue4_fbx_extention.COPY
Created February 14, 2017 03:55
ue4_fbx_extention.COPY
Begin Object Class=AnimSequence Name="ue4_fbx_extention"
Begin Object Class=FbxAnimSequenceImportData Name="FbxAnimSequenceImportData_0"
End Object
Begin Object Class=AnimCompress_BitwiseCompressOnly Name="AnimCompress_BitwiseCompressOnly_0"
End Object
Begin Object Name="FbxAnimSequenceImportData_0"
SourceAnimationName="Take 001"
End Object
Begin Object Name="AnimCompress_BitwiseCompressOnly_0"
End Object
@whaison
whaison / emily_material.osl
Last active February 12, 2017 13:49
emily_material.osl  |||| Open Shading Langage
float phongExponent(float glossiness) {
return (1/pow(1-glossiness, 3.5)-1);
}
surface emily_material
(
string specularUnlitNormTexture="00_specular_unlit.exr",
string singleScatterTexture="00_single_scatter.exr",
string diffuseUnlitTexture="00_diffuse_unlit.exr",
float scatterRadius=0.5,
@whaison
whaison / Cornell.osl
Last active February 12, 2017 13:12
Cornell.osl || Open Shading Language || http://thhube.github.io/tutorials/osl/osl.html
// -- Cornell.osl - Generate the Cornell box material ---------------
#include "stdosl.h"
#define POS_Y normal(0.0, 1.0, 0.0)
#define NEG_Y normal(0.0, -1.0, 0.0)
#define EPSILON 1e-5
surface Cornell(output closure color bsdf = 0)
{
color result = color(0, 1, 0);