- 2022.03.28 Monday
- スポンサーサイト
-
一定期間更新がないため広告を表示しています
- | スポンサードリンク | - | | - | - | pookmark |
- 2016.07.27 Wednesday
- mel 重複 配列 Overlaped Array Toユニーク配列 unique Arrayへ
-
mel 重複 配列 Overlaped Array Toユニーク配列 unique Arrayへ
http://me.autodesk.jp/wam/maya/docs/Maya2010/Commands/stringArrayRemoveDuplicates.html - | whaison | MEL(Maya Embedded Language) | 18:10 | comments(0) | - | pookmark |
- 2016.07.27 Wednesday
- Maya 2016 に起動時に呼ばれるuserSetup.melからpython sys.path へディレクトリを追加する
-
Maya 2016 に起動時に呼ばれるuserSetup.melからpython sys.path へディレクトリを追加する
scripts¥ userSetup.mel
scripts¥ userSetup_for_python_proc.mel
scripts¥userSetup.py python <<Maya起動時 import
scripts¥userSetupStart.py <<Maya起動時 python実行用
scripts¥python¥BootStartPython.py <<Maya起動時 python今回作ったpythonディレクトリ実行用
。。。。。。。。。。。。。。。いろいろできるが
もともと使っているディレクトリが こんなにある...
C:/Users/ユーザー名/Documents/maya/2016/ja_JP/scripts/python/が今回追加したやつ
参考サイト
MelからPythonを扱う
・MelからPythonを呼ぶには?
python("");
・変数を渡すには?
int $A = 100;
python("AA = " + $A);
python("print AA");
↓Pythonが受け取る文
AA = 100
print AAhttp://soyamasso.blog133.fc2.com/blog-entry-11.html
MayaのPython環境構築に関して簡単に
userSetup.melからPythonを呼び、sys.path.append(path)を実行してパスを通す
Maya の起動時に常に MEL コマンドを実行する//May 11 2016In-Product
Maya2016 ヘルプ 高度なカスタマイズ
http://help.autodesk.com/view/MAYAUL/2016/JPN/?guid=GUID-37E02448-88B4-4722-8B8A-1BA607E5D1CC
このセクションの内容親トピック: カスタマイズ(Customization) - | whaison | MEL(Maya Embedded Language) | 13:03 | comments(0) | - | pookmark |
- 2016.07.25 Monday
- Unity Loading Circle Bar Progress Bar のぐるぐるローダー UnityEngine.UI.Image.FillMethod.Radial360;
-
Unity Loading Circle Bar Progress Bar のぐるぐるローダー UnityEngine.UI.Image.FillMethod.Radial360;
UnityEngine.UI.Image.FillMethod.Radial360;
image.fillMethod = Image.FillMethod.Radial360;
//https://docs.unity3d.com/ScriptReference/UI.Image.FillMethod.Radial360.html
Image
Canvas_circle_fillAmount
Panel_mask_circle
Image_black_bg
Image_orange_fillAmount
EventSystem
image
FIllAmountScript.cs //Unity Loading Circle Bar Progress Bar のぐるぐるローダー UnityEngine.UI.Image.FillMethod.Radial360;
RectTransformGettter.cs
------チャプター3をやってみた自分のサンプル
http://www.mediafire.com/download/lwtt437u8pi2jbi/ugui_uiunitycom_chapter3_script.zip
管理者リポジトリhttps://bitbucket.org/whaison0422/ugui_uiunitycom
以下参考にした本
評価:
池和田有輔,時村良平
エムディエヌコーポレーション
¥ 2,808
(2015-03-06)
コメント:Unity uGui RectTransform に迷ったら この本を買うべき。
- | whaison | Unity3d | 16:51 | comments(0) | - | pookmark |
- 2016.07.22 Friday
- Component Editor for MayaLT 2016 MayaLT 2016にはないコンポーネントエディタをmelで作ってる人がいた!
-
Component Editor for MayaLT 2016 MayaLT 2016にはないコンポーネントエディタをmelで作ってる人がいた!
[MEL]頂点ウェイトの軽量化ツール
使い方
http://ost-memo.blogspot.jp/2013/09/mel.html
ソース
https://github.com/takarabako18/VertexComponentTable/blob/master/VertexComponentTable.mel
//2016/07/20 ・タブの変更の際テーブルをクリアするように変更
っておととい変更してたりするし。
使い方
http://bochituku.jugem.jp/?eid=1
ソース
座標、頂点カラー、法線用
https://github.com/miragekunieda/maya_mel/blob/master/VertexListEditor.mel
スキンウェイト用
https://github.com/miragekunieda/maya_mel/blob/master/SkinListEditor.mel
- | whaison | - | 15:48 | comments(0) | - | pookmark |
- 2016.07.22 Friday
- maya mel 最初と最後のキーフレームをとる3つの方法getKeyFrame_Tester.mel get fastframe and endframe (playbackOption or findKeyframe or keyframe -query -timeChange `ls -type animCurve`
-
maya mel 最初と最後のキーフレームをとる3つの方法
$playbackOptions_query_minTime= 13
$playbackOptions_query_maxTime= 21
$findKeyframe_which_first= 21//全選択すれば0
$findKeyframe_which_last= 21// 全選択すれば40
keyframe -query -timeChange `ls -type animCurve` 全チェックfor 終了$AllCurveStart=0
keyframe -query -timeChange `ls -type animCurve` 全チェックfor 終了$AllCurveEnd =40 - | whaison | MEL(Maya Embedded Language) | 12:42 | comments(0) | - | pookmark |
- 2016.07.20 Wednesday
- bakeResults -simulation // エラー: line 98: このコマンドでは、少なくとも 1 個の引数を指定または選択する必要があります。0 個見つかりました。 //
-
なんか前もつっかかった気がするのでメモ
bakeResults -simulation // エラー: line 98: このコマンドでは、少なくとも 1 個の引数を指定または選択する必要があります。0 個見つかりました。 //
string $min = `playbackOptions -query -min`;
string $max = `playbackOptions -query -max`;
string $timeTotime=$min+":"+$max;
print("$timeTotime="+$timeTotime+"¥n");
// 結果: 0:30 //
bakeResults -simulation true -t ($min+":"+$max) -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz";//こんななってて// bakeResults -simulation // エラー: line 98: このコマンドでは、少なくとも 1 個の引数を指定または選択する必要があります。0 個見つかりました。 //
解決策0
bakeResults -simulation true -t $timeTotime -attribute "tx" -attribute "ty" -attribute "tz" -attribute "rx" -attribute "ry" -attribute "rz" -sampleBy 1 `ls -type joint`;
解決策1
string $bakeJoints[] = `ls -sl`;
for($bakeJoint in $bakeJoints)
{
if(`file -q -writable`=="1")
{
setTimeLine();//タイムスライダながく
print("bake:"+$bakeJoint+"¥n");
bakeResults -simulation true -t $timeTotime -attribute "tx" -attribute "ty" -attribute "tz" -attribute "rx" -attribute "ry" -attribute "rz" -attribute "sx" -attribute "sy" -attribute "sz" $bakeJoint;
}//if(`file -q -writable`=="1"){
}//for($bakeJoint in $bakeJoints)とか
解決策2
string $bakeJoints[] = `ls -sl`;
bakeResults -simulation true -t $timeTotime -attribute "tx" -attribute "ty" -attribute "tz" -attribute "rx" -attribute "ry" -attribute "rz" -attribute "sx" -attribute "sy" -attribute "sz" $bakeJoints;
とか
でもいいんだけど
ベイク元がきえちゃう???
解決策3
ベイク先が選択されてればもとコードで通るみたい。
select -r `ls -type joint`; //joint全て選択
string $Joints[] = `ls -selection`;//選択されてるものを配列に格納
print(" selected $Joints =start "+"¥n");
print($Joints);//配列を出力
print(" selected $Joints= end "+" ¥n");
string $min = `playbackOptions -query -min`;
string $max = `playbackOptions -query -max`;
string $timeTotime=$min+":"+$max;
// 結果: 0:30 //
bakeResults -simulation true -t ($min+":"+$max) -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz";bakeResults -simulation true -t $timeTotime -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz";
どっちでもよし
- | whaison | MEL(Maya Embedded Language) | 17:33 | comments(0) | - | pookmark |
- 2016.07.14 Thursday
- Pythonのリスト の ネガティブインデックス(負のインデックス)の不思議
-
Pythonのリスト の ネガティブインデックス(負のインデックス)の不思議
>>> x = [1, 2, 3.0, "a", "b", "c"]
ネガティブインデックス(負のインデックス)
>>> x[-1]
'c' // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-2]
'b' // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-3]
'a' // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-4]
3.0 // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-5]
2 // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-6]
1 // x = [1, 2, 3.0, "a", "b", "c"]
>>> x[-7]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
http://tsugu76.hatenablog.com/entry/2014/04/25/075538
より
- | whaison | Python | 16:29 | comments(0) | - | pookmark |
- 2016.07.13 Wednesday
- スカラ (scalar) とは? 集成体型 アグリゲート (aggregate)とは? 反対語?
-
スカラ (scalar) とは? スカラー (数学 mathematics) スカラー (物理学 physics)
ひとつの値で表現できるもの。大きさのみを持つ量のこと
B言語 や K&R(Kernighan& Ritchie) C ANCI-Cなど歴史があるが最初 C は スカラしか扱えない言語だった。
char 0~255
int -2,147,483,648 〜 2,147,483,647。 9桁〜 10 桁 符号付き 32 ビット整数 (Cの場合)
double ±1.5 × 10−324 〜 ±1.7 × 10308 15 〜 16 桁 (Cの場合)
などの算術型、
ポインタ型のアドレス 0xbfa5719c なども含む
集成体型 アグリゲート (aggregate)
スカラーの集まりのことを表す。
スカラーとの反対語になるのかな aggregate
配列、int[] myNumbers = new int[10];
構造体、 struct myStruct{int:id=10,string name="aaaa"} アドレス複数
共用体、union myUnion{int:id=10,double d1=1000} アドレスは1つ
リスト List<int> intList = new List<int>();
文字列 char[]
スカラーの説明にもどる
大きさと向きと2つの量のことをベクトルとした場合、大きさしかない 数値の事をどう呼ぶのだろうかという疑問が出るかもしれない。大きさしかない数値のことは、スカラー(scalar)
と呼ぶ
発音はスケールににている
スケーラーだ
https://translate.google.co.jp/m/translate#ja/en/%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%AB%0Ascale%0Ascalar%0A%E3%82%B9%E3%82%AB%E3%83%A9%E3%83%BC
位置ベクトルの要素の1つ1つは、スカラーだった。長さや、質量、また時間は時間は、当然向きを持たないので、いずれもスカラー量だ。
いったんベクトル計算機に
はなしを持っていく
ちなみにベクトル計算を行うスーパーコンピュータが採用してきたベクトル型CPUは
SIMD命令(single instruction multiple data)
は、配列内のデータ群を一挙に並列して処理する
行列があるとする
x0 y0 z0 w0
x1 y1 z1 w1
x2 y2 z2 w2
x3 y3 z3 w3
AoS つまり Array Of Structure はx0 y0 z0 w0を処理する配列内の型が違う場合があり、メモリーへランダムアクセスとなり応答遅延時間レイテンシーが大きく、パフォーマンスが低下する
SIMD演算命令都合でメモリーパディングや、
アライメントの調整が必要になる
SoA つまり Structure Of Array は x0 x1 x2 x3 を処理する 同じ種類のデータ型を処理するため
素直にSIMD命令が実行される
例えば
32ビットのデータを4つ、128ビット分まとめて処理できる
AoSからSoAへの変換という命令もあるが
unityはSIMD命令を使うためのAPIは公開していないandroid ios ARM NEON
https://moonshine-project.github.io/ja/2010/07/02/iphone-pixel-processing-optimization-with-neon/
のようなSIMDセットによる演算はネイティブプラグインでintrinsic関数軍をつかうか、インラインアセンブリ書くか、コンパイラの自動ベクトル化を利用するかしなければならない
スカラーの話に戻る
ベクトル計算機という配列並列処理によるベクトル型CPUに対して
1命令で1つまたは2つのデータを処理する一般的なCPUは、スカラー型CPUと呼ばれる。
また、複数の実行ユニットとしてのパイプラインステージ群をCPUを内部に設ける事で、
スカラー型CPUで複数命令の並列実行を可能としたアーキテクチャ(構造、architecture)を、スーパースカラー(super scalar)という。
コンピュータのCPUとしては、大きさと向きを持った量としての幾何学の幾何ベクトルそのものを直接処理するようにはできておらず、
あくまでスカラー量またはスカラーの配列としての数ベクトルを処理する
- | whaison | Unity3d | 11:05 | comments(0) | - | pookmark |
- 2016.07.11 Monday
- MacbookProのBootcamp windowsで、CommandボタンをCtrlキーにする方法 「英数」で半角英数入力
-
まず一回復元ポイントを作りましょう!
コンパネ>回復>システム復元から>(システムのプロパティ)システム復元ポイントの構成>作成>システム復元ポイントの作成
MacbookProのBootcampで、CommandボタンをCtrlキーにする方法 より
以下のテキストをテキストファイルにコピペして、ファイル名をcmd2ctrl.regにしてセーブします。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE¥SYSTEM¥CurrentControlSet¥Control¥Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,5b,e0,00,00,00,00ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
意味はこんな感じ
他のキーコード(106キーボードの場合)は以下のとおりです。http://uguisu.skr.jp/Windows/winCaps.html
キー キーコード 左Ctrl 00 1D 右Ctrl E0 1D で ひどい変換 Aかあ の変換すね 英数キーさわっちゃうと半角カナとかつかわないやつでてくるのできらいです。
次に、IMEのオン・オフをCommand+Spaceでできるように変更します。
IMEのプロパティから詳細設定>全般タブを開きます。
編集操作のキー設定にある「変更」ボタンをクリックします。
以下の部分をクリックし、IME-オン/オフを選択します。
windowsの「スクリーンキーボード」
macキーの「英数」がつねに半角英数にしたかったので
mac[かな]にあたるwin「変換」が全角かなにしたかったので。。あこのまままで大丈夫だ。
Google 日本語入力は英数ボタンを無変換/ MuHenkanだと認識しているので
MuHenkan は全部 半角英数に切り替えました。
bootcamp control click
あと右クリックにあたる操作がひどいので
http://pc-karuma.net/bootcamp-windows-trackpad-right-click/
タスクバーの右のほうに「△」をクリックします。
クリックするとシステムアイコンが表示されるので「◆」をクリックします。
クリックするとBoot Campメニューが表示されるので、その中から「Boot Camp コントロールパネル」をクリックします。
「1本指の操作」の「副ボタンをクリック」にチェックを入れ、「左下端」「右下端」を選択します。これでOKです。
かんせいしたら一回復元ポイントを作りましょう!
コンパネ>回復>システム復元から>(システムのプロパティ)システム復元ポイントの構成>作成>システム復元ポイントの作成
あとは冒険でしかない あぶないからやらないほうがいい
もっとマックにしちゃう記事とかもある。リンク先が正直マルウェアまみれになるからあぶない。
WindowsのUIを限りなくMac風のデザインにするスキンパック : Mountain Lion Skin Pack
http://freesoftdownload.1-yo.com/desktop/mountain-lion-skin-pack.html
結局これっぽい SkinPack EI Capitan 危険
>http://downloadpack.net/skin/ElCapitan/mac/Password.txt まじ危険
http://downloadpack.net/skin/ElCapitan/mac/SkinPack%20El%20Capitan%202.0.sfx.exe まじ危険
まるうぇあ
hao123 を完全削除する方法! - パソコン生活サポートPasonal
コンパネ>回復>システム復元から>いろいろ回復から復旧ポイントへもどりまして
いろいれけしましたがブラウザの起動時設定にhao123 という起動ページが設定されてたのでけしました。
crome>三>設定 >起動時>起動ページ
- | whaison | - | 17:59 | comments(0) | - | pookmark |
- 2016.07.09 Saturday
- アルファブレンディング ONE_MINUS_SRC_ALPHA の計算内容と意味 GLSL WEBGL
-
アルファブレンディングするには
アルファブレンディングを実装するには、ブレンドファクターに以下のように指定します。
自然にに見えるように半透明のセロファンのように見せたい
gl.blendFuncSeparate(
gl.SRC_ALPHA, // SRC_RGB
gl.ONE_MINUS_SRC_ALPHA, // DST_RGB
gl.ONE, // SRC_A
gl.ONE // DST_A
);
———
———
アルファブレンディングするには
SRCは今描画しようとしてる情報
DSTはすでに描画された情報SRC = (1.0, 0.0, 0.0, 0.7), DST = (0.0, 0.0, 1.0, 1.0)
SRC_RGB = [1.0, 0.0, 0.0] * 0.7 // ( SRC_ALPHA);そのままやで;
DST_RGB = [0.0, 0.0, 1.0] * (1.0 - 0.7)//(ONE_MINUS_SRC_ALPHA)そのままやで;
COLOR = SRC_RGB[0.7, 0.0, 0.0] + DST_RGB[0.0, 0.0, 0.3];
ALPHA=0.7+1.0 //=1.7;
FINAL_COLOR = (0.7, 0.0, 0.3, 1.7);
アルファは 1.0 に丸められます。
アルファブレンド 計算 順 レンダリング パイプライン
アルファブレンドとポストエフェクト GPU
http://resumbrae.com/ub/dms423/01/
モバイル向けディファード遅延レンダリング
http://esprog.hatenablog.com/entry/2016/03/16/155844
unity rendrer texture
http://elringus.me/blend-modes-in-unity/
open gl
http://slideplayer.com/slide/9416887/
http://www.yidongtime.com/Html/blog/24713.html
https://www.google.co.jp/search?q=rendrer+pipeline+alpha+blend+posteffect - | whaison | Unity3d | 11:49 | comments(0) | - | pookmark |