原创 將shader渲染後的效果渲染到紋理中

直接貼代碼:   using UnityEngine; using System.Collections; using System.IO; public class BakeMaterial : MonoBehaviour {

原创 Unity Shader 常用 Drawer

//表示分類,不可以有中文。 [Header(***)]   //去掉貼圖的tiling和offset參數。 [NoScaleOffset] _MainTex("Main Texture", 2D)= "white"{}   //枚舉 [

原创 關於Maya userSetup.py的用法.

使用Maya的userSetup文件可以在Maya啓動時初始化自定義的函數. 創建一個userSetup.py文件放在"F:\document\<username>\maya<Version>\scripts"下就可以. 以下爲測試代碼:

原创 Houdini Point偏移問問題。。。。

float _size = ch("Size"); int _faces[] = {0, 1}; vector _ppos[]; for(int i=0; i<npoints(0); i++) { vector pos =

原创 將OBJ文件材質上的文理索引後綴從dds,tif改爲tga

  using System; using System.Collections.Generic; using System.IO; using System.Windows.Forms; namespace Dds2Tga {

原创 Procedural Modeling of Cities

Procedural Modeling of Cities Yoav I H Parish Pascal Müller [email protected] [email protected] ETH Zür

原创 Shader -- Cg Documentation

[ Cg 3.1 Toolkit Documentation ] Cg / Profiles / fp20 : http://http.developer.nvidia.com/Cg/fp20.html Cg / Language /

原创 Unity -- Bezier曲線(創建/編輯工具)

利用unity自帶的LineRenderer組件創建/編輯曲線. [Editor – BezierEditor.cs] 文件放在”Assets/Editor”目錄下. using System.Collections; using Sy

原创 Unity -- 正交/透視相機切換(2D/3D相機切換)

[根據類型切換相機類型] //相機類型 public enum CameraType{ Orthographic, Perspective } //相機切換 public void ChangeCameraType(Camera

原创 [Head(***)]

//表示分類,不可以有中文。[Header(***)]//去掉貼圖的tiling和offset參數。[NoScaleOffset]_MainTex ("Name(RGB)", 2D) = "white" {}//下拉列表[KeywordE

原创 Unity -- Event範例

[代碼] using System.Collections; using System.Collections.Generic; using UnityEngine; using System; /// <summary> /// 調用

原创 Unity -- Json文件讀取

JSON官網 下載”c#/LitJSON. “, 將LitJson.dll拖到unity中”Assets/Plugins”文件夾. JSON在線編輯器 編輯/校對json文件. 感覺比較好用的一個編輯器. [測試用Json文件 – I

原创 Unity -- 設置物體SelectIcon

[設置GameObject Icon – ISelectIcon.cs] using System; using System.Reflection; using UnityEditor; using UnityEngine; ///