ラベル Blender の投稿を表示しています。 すべての投稿を表示
ラベル Blender の投稿を表示しています。 すべての投稿を表示

2014年11月10日月曜日

Blender : Add-on : Mouse Navigation Ext.

3DViewからユーザー設定オプション[Zoom To Mouse Pointer's position in 3D View]と[Rotate Around Active]を切り替えるアドオン

Add-on that switch UserPref Options [Zoom To Mouse Pointer's position in 3D View] and [Rotate Around Active] From 3D View.

http://www.pasteall.org/55032/python

2013年9月2日月曜日

モデリング:人物:全身:001


今更ながら、番号を振ってみる・・・1からだけど。
100万(四角)ポリゴンでも全身だとこんな感じで、4Kテクスチャで全身描く程度には粗いので、細かい部分の形は出し難い。
予めベースメッシュの密度に差をつけてればいいんだが、どうせグリグリ削れば位置なんて動いちゃうし、と関節以外メッシュを詰めなかったのはいいのか悪いのか・・・耳は中途半端に形を作っていてかなり強引に弄ってるんで微妙なところだったりする。
ある程度作り込んでしまえば、特に手足をいくつも削るのは手間なので、流用素体の出来あがりと言ったところではあるが、ブラシの反応が操作不能レベルにならなければもう1~2段階分割したいと言う点では、現環境下での練習用の域を出ないのも、また事実ではある。

ベースメッシュは、マルチレゾをapply、もしくはApply BaseしたローポリにテクスチャをBakeするだけで、リトポ無しでもそこそこはポージングに堪えるようにはしてある。

2013年8月25日日曜日

Sculptの続き

あまり進展無し。
腹から下を削っているところ。
下のベースメッシュをレベル4まで分割したが、指の間、腋の下、大胸筋の腕への接続部分、股間、おっぱいの下等等、関節内側のRが(逆向きに)尖る場所はどうしてもポリゴンが荒れるのと、それ故にどうしてもしっくりと来ない。
しかし、レベル5まで分割すると440万□ポリ。
どうせ、10万ポリ以下のモデルにノーマルを焼き付けるだけなのに、そこまで分割して何ピクセルのイメージを使う積りだ?って話で、それなら荒れている部分だけイメージをレタッチしてもいい訳で、どうしたもんかな。

2013年8月10日土曜日

Blender久方

スカルプトとGPU性能の兼ね合いをどうするか考えながら放置していたのを“超”久々に再開。


rigifyに合わせて作ったものをベースリグのボーンの変形で体型変更。

rigifyをGenerateして関連付け。

そして、multiresモデファイアを使ってスカルプトで削る。

ダイナミックトポロジーはまだ、multi-resolution、UVが維持出来ないのと、全体を無造作に削りまくると異常に頂点が増えるので、取りあえずは自動分割で頂点数を管理しつつ。

分割レベル3まで。


精度的にはもう2段階分割レベルを上げたいが、そうすると400万□になって、GPUがGTS450だとかなり重い。

レベル4で妥協するか、ここからダイナミックトポロジーで細かい部分を削っていくかと言うのが悩みどころ。


UVを1枚ものにしようと思っていたけど、それはあきらめた。

全体的に歪み具合がバラバラになるのと、腕や脚が明後日の方向向いて反って塗り難い。


現状、まだ分割が粗いので顔は殆ど削ってないけど、完成イメージを掴むために、簡単な服とヘアスタイル案のメッシュ、そしてリップと目許に若干色を追加。

下絵も無ければ意図した訳でも無いが、どこかで見たような感じの顔。


ボーンへの関連付けは胸と首から上腕にかけて補助ボーンを追加して、自動ウェイトを掛けただけ。

Armature > MultiRes だと肘を90度以上曲げると、内側が崩壊する。

MultiRes > Armature だとポリゴンの崩壊はなくなるが、変形がやや尖った感じになる。

まぁ、リトポせずに破綻させずに動かせるほどベースを詰めてないしポリゴン数も無いので、まぁ、モブ用でだったら、レンダリングの重さはともかくとして、物量を抑えると言う点では、リトポやウェイトの修正を殆ど行わずに、ApplyBaseすればそのままでもそこそこ使えそうと言うぐらい。



そして、ずっと放置していたこれも2.6対応しようかと。
2.52で作ったときは、ClothのSelf-Collisionの精度が悪かったので、かなり複雑な階層構造でスカートとベストの衝突を回避したが、単純にベストとスカートを結合して、Quality、Collision、Self-Collisionのパラメータを上げるだけでこれぐらいで動くので、メッシュ構造、各部分の強度を調整すれば、Clothだけで十分いけそう。
他の物理シムにRigidBodyを使えないか検討中だけど、結構むずい。


2013年4月19日金曜日

Blender Net Render

Blender Net Renderの現状の問題と対策
→いつものひどい英語判/Terrible English version as always
→コード修正箇所

BlenderのNetRender add-onはユーザー設定画面で見て判る通り、ベータ版となっているが、現時点では以下の問題があると思われる
(1)大きなファイル、もしくは大量の外部ファイルを含むデータのレンダリングではクライアントがエラーを起こしやすい
(2)フレーム当たりのレンダリングが長時間かかる場合はエラーになる
(3)Force upload all filesを指定してもリンクデータの参照に失敗する

(3)の対策は、将来対応されることを期待しつつ、全てのスレイブサーバーにクライアントと同じパスで各データを参照出来るように設定しておくことで対処するとして、(1)(2)は実はタイムアウトの判定の方法に問題がある。

(2)に関しては、実際には通信用モジュールがタイムアウトを起こしているのではなく、応答間隔が長かった場合、つまり前回の通信から今回の通信までの間隔が一定以上であればエラーを発生させている、もしくは該当スレイブをジョブの対象リストから除外すると言う作業を行っている。
つまり、通信が出来ないためにタイムアウトを起こしている訳ではなく、処理の遅いサーバーをメンバーから外すと言う処理を行っている。
但し、このタイムアウトにする閾値が固定で与えられているため、例えば、閾値が30分であれば、1フレームの処理に最速のサーバーで1時間掛かる場合には100%失敗となる。

現時点、この閾値は5分になっている。
CGWORLD誌でトランスフォーマーのレンダリング時間が(最長?)1フレーム70時間と紹介されていたようだが、勿論、お話にならない。

そして、この対策だが、マスターのソースコードのタイムアウト時間を与えている箇所を修正する。
実際のソースコード上でもコメントで、UIで変更出来るようにしなければならないと言う旨が書かれている。
但し、この対策法、問題が無い訳ではない。
ジョブをキャンセルした場合も、次のジョブを受け入れるまでこの時間待つようになる。
つまり、レンダリング、1フレーム当たり1時間のジョブを実行出来るようにすると、ジョブをキャンセルした場合に次のジョブを受け入れるまでに1時間掛かる。

生存通知の有無によるタイムアウトと、処理が遅いことによるタイムアウトを区別していないために起こる仕様上の問題だが、ここを変更して対応時間を伸ばすと、ジョブをキャンセルして新しいジョブを投入する場合には手動でスレイブを再起動する必要がある。

クライアントのタイムアウトも固定で5秒タイムアウトするようになっている。
現状パイソンはマルチコアに対応していないし、コード自体も並行処理で生存通知を行うようになっていないので、データサイズが大きかったり回線が遅くて転送時間が長くなると、タイムアウトする。
クライアントがタイムアウトすると、
(1)データの転送が正常に終了したか判らない
(2)マスターからレンダリング済データをダウンロード出来ない
の2点が問題となるが、LAN内やFTTH環境下ではほぼ起こらない上、(2)はウェブUIかクライアントのボタンからダウンロード出来るので、問題としてはさほど大きく無い。



The problem of Blender NetRender and the countermeasure against it
→Python Code

Blender NetRender is Beta version as you can know from user preference, then I think that it has these problem following here.
(1)The error often happen on client when sending the large sized file or the data having many linked files.
(2)It can't render the data that its render need many time for 1 frame rendering.
(3)It failure to refer linked files even if ordering the option "Force upload all files".

About (3), we expect to be resolved in future, and then we make slave servers to be able to refer data directories with same path as client's.
About (1)(2), it has the problem in the way to decide timeout.

In (2)'s problem, it is not that the communication module is not in timeout, but it occur when current response arrive after spending many time from last response, so it is not that there is not response. So if the time spans were long, the master would cut off those slaves as low performance machine.
However, this thresholds are fixed in current code. For example, if you rendered such data as to spend 1 hour also with the most performance machine and if the threshold were 30 minutes, that job should lose certainly.

In current code, it was set to 5 minutes.
Before there was the article about Transformer TV animation in CGWORLD( a magazine in Japan ), it said that its rendering needed 7 hours / frame (it is the longest time of them?), so such is nothing but joke in current Blender NetRender.

The way against that problem, you must change python code ( the comment to need to make it adjustable by UI is written in the code, but yet ).

But this countermeasure has also problem.
If you enlarge the length until timeout, also the wait time for next job is enlarged.
So if you set 1 hour for timeout, the NetRender could process the task that needed 1 hour, but if you cancelled that job, the slaves would not receive next job for 1 hour.

It is because of bug in the specification, the timeout against impossible to communicate and the timeout against low speed machine are not distinguished. But that is why we must restart slaves with handle when when we cancel job ( or wait for that time ).

In client, there is the problem that the timeout length is given as fixed parameter, and it is 5 seconds.
That is why it finish with error if it need many time for sending by its data size or the network through put, becaise current python don't support multi-core and this program can't send survival signal while sending.
If client goes to timeout,the problems are these.
(1)We can't know whether the sending have finished or not.
(2)Client can't download the rendered results from master automatically.
The problem of (1) rarely happen in LAN or FTTH, and (2) is not so serious because we can download the result from master with web UI or client's get button.



マスターの待機時間を1時間、クライアントの待機時間を2分に延長する
Extend master wait time to 1 hour, client's to 2 minutes

Directory./2.66/scripts/add-ons/netrender
Filemaster.pyutils.py
Befoer984 lineself.slave_timeout = 5 # 5 mins: need a parameter for that 162 linedef clientConnection(netsettings, report = None, scan = True, timeout = 5):
Afterself.slave_timeout = 60 # 5 mins: need a parameter for that def clientConnection(netsettings, report = None, scan = True, timeout = 120):
※1フレームに30分を要する場合、chunk=5だとマスターの待機時間は150分以上必要になる
If it need 30 minutes per frame and chunk is 5, then the master wait time need more than 150 minutes.
※クライアントの待機時間は一見初期値が5秒だが、これを変更するUIは存在しないので実質固定値
The wait time of client looks just initial value in shortsighted, but there is not UI for changing that, so it is fixed parameter substantially.


コードを見た感じ、複数ソースに跨っているためざっくりと見ただけだが、スレイブのタイムアウトはWebUIの当該項目が更新されるタイミング=スレイブの場合はJobIDが変更されるタイミングで行っているっぽい。このため一覧からステータスの変わらないスレイブが外れやすく、ジョブが実行中にも関わらずエラーになるっぽい。
と言うことはウェブ画面を出さなければ、マスターがスレイブを除外する処理が走らない?

Though I saw just rough , the reason of slave timeout seems that it is checked at when the part of slave status is changed in webUI. That is why the slaves that its status is not changed are cut off, and the job become error even though it is running.
So the task that master reject slaves will not run if I don't use web UI?


ウェブ画面無しでもタイムアウトするタイミングは同じでした。残念。
The term to timeout was same even if without web UI.

2012年5月7日月曜日

Blender-Sculpt

あまり使っていなかったスカルプトに挑戦中。
Blenderのスカルプトモードにハイド機能が追加されたため、廉価GPUでも全身いけるかな?と思ったからなんだけど、Multiresolution Lv3で大まかな形にする(下絵なしで作りながら考えていた。この無計画さが駄目すぎる・・・) ⇒ Lv4で全体の流れを削る ⇒ Lv5で均してディテールを詰める(いまここ)と言う流れ。全身のプロポーションを作る段階から分割数を多くしていると重すぎるからだが、これだと殊の外、時間が掛りすぎている。
と言うのは、ポリゴンが細かい方がブラシの効きがよく、粗いとかなり強引に引っ張ったりすることになる。
普通はこういうの一体何時間ぐらいで作るもんなんだろうか?

I'm trying SCULPT now, I have rarely used it before.
This is why I thought it possible with even low-rank GPU because Blender sculpt mode got HIDE function. But in a real, I make rough shape in Multiresolution modifire's Lv3( I made it without the design, and that haphazard is bad... ), decide shape in Lv4, make the detail and the surface smooth in Lv5 (Now, on here), because it is too heavy to display many polygons for making full body style, so it is hard to subdivide to high level from the first. But that task makes me to spend much time.
The blush is more useful with more dens polygons, and need to drive forcibly with rough polygon.
In general, how time do they spent to make such full body sculpt model.

2012年3月9日金曜日

Blender Add-on : Lipsync Tool #2


⇒ 詳細 / Details 作成中

構成 : Blender python-script + 改造版julius
入力 : 既定の録音デバイス(手動でjuliusを起動する場合は環境変数PORTAUDIO_DEV_NUMで変更可能)
必須 : julius用の音響モデル、辞書、及び設定ファイル
(基本juliusウェブサイトで公開されているものが利用できるが、設定ファイルにinputがmic以外で設定されているとエラーになる)
動作確認済:Ubuntu11.10_amd64、Windows32bit/64bit(Visual C++ 2008 SP1再頒布パッケージ要)
(ソースコードを公開しているので、上記以外の環境についてはご自分でビルドして下さい)
モジュールの配置:任意。但し、パスに空白を含まないこと。(Windowsの場合はportaudio_x86.dllを同一フォルダに置いておくこと)
設定ファイルの配置:任意。但し、パスに空白を含まないこと。


SET : Blender python-script + modified julius
INPUT : Default recording device(microphone) (If starting julius with handle,it can be changed with the environment value as PORTAUDIO_DEV_NUM)
MUST : The acoustic model , the dictionaries and configuration file for julius
(The configures published on julius web site is available, but if it has the line as input without mic, it can't)
TESTED : Ubuntu11.10_amd64、Windows32bit/64bit(Need Visual C++2008 SP1 republish package)
PLACE OF EXECUTABLE MODULE : Any, but the path must not include SPACE (If on Windows,portaudio_x86.dll must be put at where is same as the julius executable module)
PLACE OF CONFIGURE : Any, but the path must not include SPACE.

2012年2月29日水曜日

Blender Add-on : Lipsync Tool

Blenderのためのリアルタイム・リップシンク

概要
オープンソースの音声認識ソフト(STT)juliusを利用したリップシンクツールで、改造したjuliusを用いる。Linux、Windowsでのビルド、動作は確認済。小改造なのでおそらくMacでもビルド可能な筈。

機能
リアルタイムでマイク入力によるリップシンク(シェイプキーアニメーション)を行う。通常のレコードアニメーションではシェイプキーは登録されないため、ビューポートアニメーションでシェイプキーアニメーションを登録する機能を備える。
コアモジュール(julius)については、追加した引数によってリアルタイムで音素候補をウェイト付きで出力する機能を追加している。その他の機能は従来のjuliusと変わらず、辞書の設定、調整やサポートツールの利用も変わらない。

問題点
音響モデルと辞書。日本語についてはjuliusディクテーションKITのものがそのまま利用可能。
日本語以外については、現在のところ商用利用可能な日本語辞書はVoxforge.orgのGPLv2辞書ぐらいしか見当たらないが、単語辞書、文法辞書はデモ用の最低限のものしか登録されておらず、辞書にない音素記号は抽出出来ないので追加する必要がある。
juliusのフォーラムで紹介されているgoogleの辞書(有償)と言うのも加工が必要。
サイズが大きすぎてgoogleサイトに置けないので、公開時にはリンク先のみ記す。


The real-time lipsync for Blender

Overview
The lipsync tool with julius as an opensource voice recognize software(STT),it uses the modified julius. I built and tested on Windows and Linux. Its modify is a little,so perhaps it can on Mac,too.

Function
It animate shapekeys with mic in a real time. The standard recording animation function can't entry shapekeys, so it have also the function for recording action.
The core module as julius was added the function to output phonemes symbols with those wrights in a real time. There is nothing as different from the original julius without that. So the way to set or adjust the dictionary,and to use support tools is as same as for the original.

The Problem
It needs the acoustic model and the dictionaries. In Japanese,the dictionary in julius dictation Kit(Japanese only) is available,but in Other languages,I found only the GPLv2 dictionaries on voxforge.org. But its words and grammar dictionary is just for demo,it has the least. julius can't output phoneme symbols out of dictionary. So it must be added words dictionary.
Anyway,those dictionary files are too large to put on the google-site, because those include acoustic models.
So when I'll publish this tool,I'll note only the links for the dictionaries.


2011年5月2日月曜日

cycles First View

Blenderの開発中の新レンダラーcyclesをお試し。
ネットでOpenCLがどうとかNVIDIAでないとどうとかと言う話もあったようだが、Intelオンボードでも問題なく動作。多分、CUDA対応の話と混じってたんでは無いかと予想。
プレビューの動作はうちのノートパソコンでも速く、全然実用レベル。
実際のレンダリングは初期値のpass=10でも内臓レンダラーの2~3倍の時間がかかるが、LuxRender等は一見シームレスでもエクスポーターを介して動いているからか更にHDDをガリガリ回すので、それらに比べればかなり軽いと言える。

アナウンスでUV未対応とあったが、ヘアー/パーティクルも未対応で、マテリアルじゃなくてパーティクルの設定でエミッターを非表示にしても消えない。
ヘアーやプロシジャーテクスチャの外部レンダラーの対応状況はあまりよろしくないので、Blender用に開発されているのであれば、それらにしっかり対応してくれれば非常に有難い。
試していないが、ノードを見る限りはプロシジャーテクスチャには対応、もしくは対応予定(UVもノードはあるが正常に動かない)。
カラーマップは動作確認。但し、PNG画像は正しく読み込めないため、マッピングできないように見えた。JPGは正常動作。
レンダーシーン内にカーブがあると、メッシュへのコンバートに失敗したエラーメッセージを吐いた後、セグメンテーション違反(Windowsのアクセス違反だと思う)で落ちる。

レンダービューのまま作業しているとCPU使用率が高いが、コンポジットを含まないとは言え、実際のレンダリング結果に近い状態をリアルタイムに見れるため、かなりいい感じではある。
Blender用として作っているのであれば、是非とも内部レンダラーがサポートするパーティクルやヘアーを含む全ての機能をサポートして貰いたいものだ。