Tuesday, March 20, 2007

Baking is easy

原本我要將已經算出來的occlusion或shading color bake成2D的texture都需要自己兜一堆SLBOX跟RIBBOX,
It's a trouble for baking calculated occlusion color or some shading color as 2D texture.
I must write some SLBOX and RIBBOX for indicating what I want to baking.
Now, I fund Bakeable for dealing this routine.

然後將Bake Style換成texturemap,
要bake的東西會存在該ptc檔的_color channel中。
可以用ptrender -size w h foo.ptc _color foo.tif 產生圖片,
You can find Bakable shader in Slim Color/Utility menu.
Connect the color you want to bake to the "Color" property.
Set "Bake Style" as "texturemap".
Set "BakeManifold / space" as "ST".
After render, baked ptc file will store in remantex fold.
Baking color stores in "_color" channel.

If you want to see picture, render it by ptrender.
example: ptrender -size w h foo.ptc _color foo.tif
See!!! What a easy way.

Monday, March 19, 2007

Pointbased Occulsion

在Renderman的rsl function列表中,
但是他確是使用pointcloud based occlusion不可或缺的設定。
In Rendernman rsl function document,
you can't see nothing about pointbased description at occulsion part.
It's very important when using pointcloud based occlusion.

如果你已經將area資訊bake到ptc檔案中的__area channel,
可以使用occlusin(P, N, samples, "filename", "xx.ptc", "pointbased", 1, ....);
If you have calculate area value and using bake3d to store it in a ptc "__area" channel.
When having a ptc file which stored area() information in __area channel(using bake3d function),
you can get pointcloud occlusion value by occlusion(P, N, samples, "filename", "xx.ptc", "pointbased", 1, ....).
This way will reduce image sequence flick.