View Categories

UI ve VFB

8 dakika okuma

giriiş #


  • Görüntü önizleme :
    Açılır listeden render öğeleri kanallarını yükler;
    Görüntü düzeltmeleriyle çalışır;
    V-Ray devam ettirilebilir dosyalar dahil olmak üzere çeşitli 8 bit ve 32 bit dosya formatlarını yükler;
    2 veya 4 render arasında görüntü karşılaştırması yapar;

  • Görüntü yönetimi :
    Oluşturulan görüntüyü tam 32 bit kayan noktalı biçimde saklar;
    Oluşturulan görüntülerin geçmişini, oluşturma sonrası düzeltmeleriyle birlikte saklayabilir;
    Düzeltilmiş çıktıyı çeşitli görüntü formatlarına kaydedebilir;

  • Görüntü düzenleme ve son işlem :
    Oluşturulan görüntüye ve öğelerine renk düzeltmeleri uygulayın;
    Katman düzeltmeleri de dahil olmak üzere Back to Beauty iş akışı için Kompozit modu;
    Oluşturulan görüntüdeki ışık katkısı üzerinde LightMix kontrolü;

  • Sahne düzenleme :
    LightMix modundan güncellenmiş yoğunluk ve rengi aktararak gerçek ışık değerlerini değiştirebilirsiniz (uygulama gerektirir);
    VFB içinden IPR kamera navigasyon kontrolü;

  • Render yönetimi :
    Gürültü azaltıcı kontrolü;
    Bölge render kontrolü;
    Grupların hangi sırayla render edileceğini seçmenize olanak tanır;

Kullanıcı Arayüzü #


VFB Menüsü #


Menü

Menü Seçenekleri

Dosya

Geçerli kanalı kaydet – Şu anda yüklü olan kanalı bir resim dosyası formatına kaydeder.

Tüm görüntü kanallarını ayrı dosyalara kaydet – Tüm render öğelerini ayrı dosyalara kaydeder.

Tüm görüntü kanallarını tek bir dosyaya kaydet – Görüntüyü tek bir çok kanallı EXR veya .vrimg dosyasına kaydeder.

Görüntüyü yükle – V-Ray Kare Tamponunda önizlenecek bir görüntü dosyasını açar.

Toplu görüntü işleme – Aynı katman ağacı değişikliklerine sahip birden fazla .vrimg dosyasının aynı anda işlenmesine olanak tanır.

Toplu Görüntü İşleme

Giriş klasörü – Resimlerin başlatılacağı yolu belirtir.

Çıktı klasörü – Çıktı görüntülerinin kaydedileceği yolu belirtir.

Katman ön ayarı – Katman ağacı düzeltmeleri için bir ön ayar belirtir.

Çıktı dosyası adlarına eklenecek soneki belirtir.

Mevcut dosyaların üzerine yaz – Çıktı klasöründeki aynı ada sahip mevcut dosyaların üzerine yazılmasını sağlar.

Oluştur

Etkileşimli oluşturmayı başlat – VFBRenderInteractive geri çağırma işlevini çağırır. RendererOptions’ta showVfbButtonInteractiveStart’ın true olarak ayarlanması gerekir .

Oluşturmayı durdur – Mevcut oluşturma işlemini durdurur.

Render – İşleme başlar. Eğer VFBRenderLast geri çağırma fonksiyonu ayarlanmışsa, işleme başlamaz , yalnızca geri çağırma fonksiyonu çağrılır.

Görüntü

Fareyi takip et – Kova görüntü örnekleyicisi kullanılırken, fare işaretçisine en yakın bulunan kovayı işler. Aşamalı örnekleyici kullanılırsa, V-Ray fare işaretçisine en yakın pikselleri örnekler.

Fareyi takip et – Görüntü işleme sırasında fareyi VFB üzerinde sürükleyerek görüntünün hangi bölümünün önce örnekleneceğini değiştirebilirsiniz;
Fareyi takip et (kilitli) – Kova (veya örnekleme) başlangıç ​​noktasını kilitler.

Geçerli kanalı panoya kopyala – Geçerli kanalı panoya kopyalar.

Görüntüyü temizle – Çerçeve arabelleğinin içeriğini temizler. Bu, yeni bir render işlemine başlarken önceki görüntüyle karışıklığı önlemek için kullanışlıdır.

Görüş

Görüntü renk alanı – Görüntünün görüntüleneceği renk alanını belirtir.

Yok – Renk uzayı belirtmez;
sRGB – Görüntüyü sRGB renk uzayında görüntüler;
OCIO – Görüntüyü bir OCIO yapılandırma dosyasından yüklenen bir renk uzayında görüntüler;
ICC – Görüntüyü bir ICC yapılandırma dosyasından yüklenen bir renk uzayında görüntüler;
Gama 2.2 – Görüntüyü Gama 2.2 renk uzayında görüntüler.

Zoom VFB – VFB’deki işlenmiş görüntüyü yakınlaştırır/uzaklaştırır.

%50 Yakınlaştırma – Görüntüyü %50 oranında uzaklaştırır;
%100 Yakınlaştırma – Görüntüyü %100 oranında yakınlaştırır. Alternatif olarak, VFB’de sol fare düğmesiyle çift tıklayın;
%150 Yakınlaştırma – Görüntüyü %150 oranında yakınlaştırır.
Sığacak Şekilde Yakınlaştır – Geçerli görüntüyü VFB’ye sığacak şekilde yakınlaştırır. Render Bölgesi Etkinse – bölgeye yakınlaştırır.

Kanallar – Hangi kanalları izleyeceğinizi seçer.

Kırmızı kanalı görüntüle – Kırmızı kanalı görüntüler;
Yeşil kanalı görüntüle – Yeşil kanalı görüntüler;
Mavi kanalı görüntüle – Mavi kanalı görüntüler;
Alfa kanalına geç – Alfa kanalını görüntüler;
Tek renkli mod – Görüntüyü tek renkli modda görüntüler.

Renk sınırlama – Renk sınırlama alt menü seçeneklerini açar:

Renk sınırlamasını zorla – Renk sınırlamasını zorlar;
Sınırlandırılmış renkleri görüntüle – Sınırlandırılmış renkleri görüntüler.

Piksel en boy oranını kullanma – Piksel en boy oranının görselleştirilmesini sağlar.

Panorama Görünümü  – Görüntüyü  360° açıyla gösterir.

Geçmişi Göster  – Geçmiş panelini gösterir. 

Katmanları Göster  – Katmanlar panelini gösterir.

Seçenekler

VFB ayarları – Render Görünümü, Render Bölgesi, Geçmiş ve Katmanlar için ayarları yapabileceğiniz VFB Ayarları penceresini açar.

VFB Araç Çubuğu #


Bu açılır menü, sahne için oluşturulan render öğelerine erişim sağlar. Seçilen render öğesi VFB’de görüntülenir. Varsayılan olarak, RGB renk ve Alfa render öğeleri mevcuttur. Sahneye eklenen diğer render öğeleri de açılır menüde görünür.

Fare imlecinin koordinatlarını görüntüler.

Örneklenen alan boyutunu belirtir. Mevcut örneklenen alan boyutlarını (1×1, 3×3, 5×5 ve 7×7) içeren bir bağlam menüsü açmak için oka tıklayın.

Fare imlecinin bulunduğu konumdaki örneklenmiş piksel değerleri gösterilirken renk ve görüntü düzeltmelerinin uygulanıp uygulanmayacağını (RGB) veya uygulanmayacağını (RAW) belirtir.

Herhangi bir renk düzeltmesi uygulanmadan önce, fare imlecinin bulunduğu konumdaki RGB piksel değerlerini görüntüler.

RGB değerlerini belirtir. Mevcut seçeneği içeren bir bağlam menüsü açmak için oka tıklayın.

Yok – RGB değerini belirtmez.
HSV – Geçerli fare konumunun altındaki pikselin Tonunu, Doygunluğunu ve Değerini belirtir.
Web – Geçerli fare konumunun altındaki pikselin HEX değerini belirtir.
8bit – Geçerli fare konumunun altındaki pikselin 8 bitlik renk paletini belirtir.

HSV seçildiğinde, mevcut fare konumunun altındaki pikselin Tonunu, Doygunluğunu ve Değerini görüntüler.

“Web” seçeneği seçildiğinde, fare imlecinin mevcut konumunun altındaki pikselin HEX kodunu görüntüler.

8 bit seçildiğinde, farenin mevcut konumunun altındaki pikselin 8 bit renk paletini görüntüler.

Fare imlecinin koordinatlarını kilitler ve seçilen piksel için bilgileri görüntüler.

Renk düzeltmelerini gösterir.

V-Ray log kaydını gösterir.

Alfa kanalını görüntüler.

Kırmızı kanalı görüntüler.

Yeşil kanalı görüntüler.

Mavi kanalı görüntüler.

Görüntüyü diske kaydeder. Alt menüyü açmak için simgeye basılı tutun:

Geçerli kanalı kaydet – Geçerli kanalı bir resim dosyası formatına kaydeder;
Tüm resim kanallarını ayrı dosyalara kaydet – Tüm render öğelerini ayrı dosyalara kaydeder;
Tüm resim kanallarını tek bir dosyaya kaydet – Resmi tek bir çok kanallı EXR veya .vrimg dosyasına kaydeder.

Çerçeve arabelleğinin içeriğini temizler. Bu, yeni bir render işlemine başlarken önceki görüntüyle karışıklığı önlemek için kullanışlıdır.

Kova görüntü örnekleyicisi kullanılırken, fare işaretçisine en yakın bulunan kovayı oluşturur. Aşamalı örnekleyici kullanılırsa, V-Ray fare işaretçisine en yakın pikselleri örnekler. Bu seçenek etkinleştirildiğinde, görüntüye sağ tıklayıp “Kova başlangıç ​​noktasını kilitle” seçeneğini seçerek kova (veya örnekleme) başlangıç ​​noktasını kilitleyebilirsiniz.

VFB’de bölgeleri oluşturmanıza olanak tanır.  Daha fazla bilgi için Oluşturma Bölgesi bölümüne bakın.

Fikri mülkiyet haklarını başlatır.

Mevcut render işlemini durdurur.

Oluşturma işlemi başlıyor.

Oluşturma Geçmişi #


Görüntü A/B’nin dikey karşılaştırmasını etkinleştirir veya devre dışı bırakır. Oluşturma geçmişinden A ve B görüntülerini seçin.

Görüntü A/B’nin yatay karşılaştırmasını etkinleştirir veya devre dışı bırakır. Oluşturma geçmişinden A ve B görüntülerini seçin.

A/B/C/D görüntülerinin karşılaştırılmasını etkinleştirir veya devre dışı bırakır. Oluşturma geçmişinden A, B, C ve D görüntülerini seçin.

VFB dosyasındaki mevcut görüntüyü render geçmişine kaydeder. Görüntü, render geçmişi listesinin en üstüne yerleştirilir.

Seçilen görüntüyü render geçmişinden VFB’ye yükler.

Seçilen görüntüyü render geçmişinden kaldırır.

Sahne yollarına ve notlara göre görselleri filtreleyebileceğiniz bir arama alanı.

Klavyedeki 1’den 9’a kadar olan tuşlar, geçmişten ilk 9 görüntüyü VFB’ye hızlıca yüklemek için kullanılabilir.

Düzenleme notu  – Resme metin yorumu eklemenizi sağlar; yorum resmin altında görünür.

A Ayarı  – Oluşturulan görüntüyü A/B karşılaştırması için A görüntüsü olarak ayarlar.

B Ayarı  – A/B karşılaştırması için B görüntüsü olarak render edilecek görüntüyü ayarlar.

VFB’ye Yükle  – Seçilen görüntüyü VFB’ye yükler (görüntüye çift tıklamakla aynı işlevi görür).

Sil  – Seçilen görüntüyü geçmişten siler. Görüntü sistemin Geri Dönüşüm Kutusu’na taşınır ve gerekirse oradan geri yüklenebilir.

Katmanları yükle  – Seçilen görüntünün katman ağacı ön ayarını yükler.

Geçmişi yeniden yükle  – Geçmiş görüntü listesini yeniden okur. Bu, geçmiş klasörü Cinema 4D dışında (örneğin başka bir Cinema 4D oturumundan) güncellendiğinde gerekebilir.

Elle kaydedilen .vrimg dosyaları da Geçmiş klasörüne eklenebilir, ancak eksiksiz görüntü bilgilerini korumak için tüm görüntü kanallarının tek bir .vrimg dosyasında kaydedilmesi gerekir.

Katmanlar #


Bir katman oluşturur. Aynı türden birden fazla katman eklenebilir.

Klasör – Birden fazla katmanı gruplandırmaya olanak tanır;
Arka Plan – Bir arka plan renk düzeltme katmanı ekler;
İşleme Öğesi  – Kompozisyonda kullanabileceğiniz görüntünüzden bir işleme öğesi seçer. Bu yalnızca Kaynak katmanı Kompozisyon olarak ayarlandığında kullanılabilir;
Sabit  – Başka bir katmanda bir efekt elde etmek için kullanılabilecek düz bir renk ekler (örneğin, sabitle çarpmak için) ;
Pozlama  – Bir Pozlama renk düzeltme katmanı ekler;
Beyaz Dengesi  – Bir Beyaz Dengesi renk düzeltme katmanı ekler;
Ton/Doygunluk  – Bir Ton/Doygunluk renk düzeltme katmanı ekler;
Renk Dengesi  – Bir Renk Dengesi renk düzeltme katmanı ekler;
Eğriler – Bir Eğriler renk düzeltme katmanı ekler;
Arama Tablosu  – Bir Arama Tablosu katmanı, renk dönüşümleri için bir LUT dosyasını yüklemeye olanak tanır;
Filmik Ton Haritası  – Farklı türde haritalama eğrileri ve gama düzeltmeleri içerir. Ayrıca bir renk alanı seçimine de olanak tanır.

Daha fazla bilgi için Katmanlar sayfasına bakın.

Seçilen katmanları siler.

Katman ağacı ön ayarını kaydeder.

Katman ağacı ön ayarını yükler.

Özel katman ön ayarlarına hızlı erişim. Bunun için VFB Ayarlarında yolunu belirtmeniz gerekir.

Katman oluşturma işlemini geri al.

Katmanı yeniden oluştur.

Emretmek

Tanım

Sıfırla

Seçilen katmanda yapılan tüm değişiklikleri sıfırlar.

Kaydetmek

Katmanı ön ayar olarak kaydeder.

Yük

Seçilen katman için önceden ayarlanmış bir ayarı yükler.

Silmek

Seçilen katmanı siler.

Tüm CC’leri LUT olarak kaydedin.

Tüm renk düzeltmelerini bir LUT dosyasına işler.

Yeni Katman

Yeni bir katman oluşturur.

Kopyalamak

Seçilen katmanı çoğaltır.

Karıştırma Modları

Seçilen katmanın, altındaki tüm katmanların sonucuyla nasıl harmanlanacağını belirtir.

İstatistikler #


Sağ tıklayarak bir bağlam menüsü görüntüleyebilir ve istatistik değerlerini kopyalayabilirsiniz.

Oluşturma Bölgesi #


VFB Kısayolları #


Fare

Tanım

Fare tekerleği

Yakınlaştır/Uzaklaştır

Sol düğmeye çift tıklayın

%100’e yakınlaştır

Orta düğme sürükleme

Tava (el aleti)

Ctrl+Shift+Sol tıklama

Oluşturulan görüntüyü yakınlaştırın.

Ctrl+Shift+Sağ tıklama

Oluşturulan görüntüyü uzaklaştırın.

Klavye

Tanım

Ctrl+Shift+sol tıklama, + / =

Yakınlaştır

Ctrl+Shift+sağ tıklama, -/_

Uzaklaştır

Çift tıklayın, *

%100’e yakınlaştır

Ok tuşları

Sola, yukarı, sağa, aşağı kaydırın.

F

VFB’de bölgeyi veya tüm görüntüyü sığdırın.

Esc

İşlemeyi iptal et

Q

Geçmiş A/B dikey karşılaştırma modunu ayarla

W

Geçmiş A/B yatay karşılaştırma modunu ayarla

E

Geçmiş A/B/C/D karşılaştırma modunu etkinleştirin

1-9

İlgili görüntüyü VFB geçmişinden yükleyin.

H

Geçmişi göster/gizle

Ctrl+L

Sağ panelin tamamını göster/gizle

P

Yalnızca katman ağacını göster/gizle

L

Fare imlecinin koordinatlarını kilitler ve seçili piksel için bilgileri görüntüler, yani “Piksel bilgisi koordinatlarını kilitle” düğmesini etkinleştirir.

Etkileşimli (RT) görüntüleme için kamera kontrolü #


Shift ve fare tekerleği kaydırma

Kamerayı ileri veya geri hareket ettirin

Ctrl ve fare tekerleği kaydırma

Kamera görüş alanını değiştirmek, yani yakınlaştırmak/uzaklaştırmak.

Sol fare tuşuyla Shift ve sürükleme

Kamerayı sahnenin etrafında döndürün.

Ctrl tuşuna basılı tutarak sol fare tuşuyla sürükleyin.

Kamerayı döndürün

Kod üzerinden kontrol #

with vray.VRayRenderer(showFrameBuffer=False) as renderer:

RendererOptions options;
options.showFrameBuffer = false;
VRayRenderer renderer(options);

RendererOptions options = new RendererOptions();
options.ShowFrameBuffer = false;

using (VRayRenderer renderer = new VRayRenderer(options))
{
}

var renderer = vray.VRayRenderer({
showFrameBuffer: false
})

with vray.VRayRenderer(enableFrameBuffer=False) as renderer:

RendererOptions options;
options.enableFrameBuffer = false;
VRayRenderer renderer(options);

RendererOptions options = new RendererOptions();
options.EnableFrameBuffer = false;

using (VRayRenderer renderer = new VRayRenderer(options))
{
}

var renderer = vray.VRayRenderer({
enableFrameBuffer: false
})

VFB sınıfı #

with vray.VRayRenderer() as renderer:
vfb = renderer.vfb
vfb.shown = True # Can be used to hide and show the window
vfb.interactivity = True # Whether camera mouse control is enabled
vfb.position = (0,0) # Position of the window in screen-space coordinates
vfb.size = (800, 600) # Size of the window in pixels
vfb.alwaysOnTop = True # Toggles always-on-top window behavior
stateBuffer = vfb.getState() # Can be used to save serialized window state
vfb.setState(stateBuffer) # Can be used to restore serialized window state

VRayRenderer renderer;
VRayRenderer::VFB& vfb = renderer.vfb;
vfb.show(true /*show*/, true /*setFocus*/); // The window is visible and auto focused
vfb.enableInteractivity(true); // Whether camera mouse control is enabled
vfb.setPositionAndSize(0, 0, 800, 600); // Position in screen-space and size in pixels
vfb.setAlwaysOnTop(true); // Toggles always-on-top window behavior
size_t numBytes = 0;
VFBState *stateBuffer = vfb.getState(numBytes); // Can be used to save serialized window state
vfb.setState(stateBuffer, numBytes); // Can be used to restore serialized window state

using (VRayRenderer renderer = new VRayRenderer())
{
VFB vfb = renderer.Vfb;
vfb.Shown = true;                       // Can be used to hide and show the window
vfb.Interactivity = true;               // Whether camera mouse control is enabled
vfb.SetPositionAndSize(0, 0, 800, 600); // Position in screen-space and size in pixels
vfb.AlwaysOnTop = true;                 // Toggles always-on-top window behavior
byte[] stateBuffer = vfb.GetState();    // Can be used to save serialized window state
vfb.SetState(stateBuffer);              // Can be used to restore serialized window state
}

var renderer = vray.VRayRenderer();
var vfb = renderer.vfb;
vfb.shown = true; // Can be used to hide and show the window
vfb.interactivity = true; // Whether camera mouse control is enabled
vfb.position = { x: 0, y: 0 }; // Position of the window in screen-space coordinates
vfb.size = { width: 800, height: 600 }; // Size of the window in pixels
vfb.alwaysOnTop = true; // Toggles always-on-top window behavior
stateBuffer = vfb.getState(); // Can be used to save serialized window state
vfb.setState(stateBuffer); // Can be used to restore serialized window state

VFB İlerleme Çubuğu #

VFB Görünüm Alanı Bağlam Menüsü #

# VFB Context menu entries
contextMenuItems = [
    {'id': 0, 'type': 'normal',   'text': 'Custom option'},
    {'id': 1, 'type': 'normal',   'text': 'Custom disabled option', 'enabled': False},
    {'id': 2, 'type': 'checkbox', 'text': 'Custom checkbox'},
    {'id': 3, 'type': 'checkbox', 'text': 'Custom checkbox 2', 'defaultValue': 1}
]
 
 
# VFB Context menu callback
def onContextMenu(renderer, command, x, y):
    if command == 0:
        print("Custom option clicked")
    elif command == 1:
        print("This is disabled")
    elif command == 2:
        print("Value of Custom checkbox is", renderer.getVFBContextMenuItemValue(command))
        # Note that the value will not change automatically, you must change it yourself
    elif command == 3:
        value = renderer.getVFBContextMenuItemValue(command)
        renderer.setVFBContextMenuItemValue(command, 1 - value)
        print("Value of Custom checkbox 2 changed from", value, "to", 1 - value)
    else:
        print('Command %d not implemented' % command)
 
 
renderer.setVFBContextMenuItems(contextMenuItems)
renderer.setOnVFBContextMenuSelected(onContextMenu)
// Context menu callback
void onContextMenu(VRayRenderer& renderer, int command, int x, int y, void*) {
int value = 0;
switch (command) {
case 0:
printf("Custom option clicked\
");
break;
case 1:
printf("This is disabled\
");
break;
case 2:
renderer.getVFBContextMenuItemValue(command, value);
printf("Value of Custom checkbox is %d\
", value);
// Note that the value will not change automatically, you must change it yourself
break;
case 3:
renderer.getVFBContextMenuItemValue(command, value);
renderer.setVFBContextMenuItemValue(command, 1 - value);
printf("Value of Custom checkbox 2 changed from %d to %d\
", value, 1 - value);
break;
default:
printf("Command %d not implemented\
", command);
}
}
 
void setupContextMenu(VRayRenderer& renderer) {
vector<VFBContextMenuItem> contextMenuItems;
 
// Context menu items
contextMenuItems.push_back({ 0, VFBMenuItemType::normal,   0, true,  "Custom option" });
contextMenuItems.push_back({ 1, VFBMenuItemType::normal,   0, false, "Custom disabled option" });
contextMenuItems.push_back({ 2, VFBMenuItemType::checkbox, 0, true,  "Custom checkbox" });
contextMenuItems.push_back({ 3, VFBMenuItemType::checkbox, 1, true,  "Custom checkbox 2"});
 
renderer.setVFBContextMenuItems(contextMenuItems);
renderer.setVFBContextMenuSelectedCallback(onContextMenu);
}
using (VRayRenderer renderer = new VRayRenderer())
{
    // Context menu items
    List<VFBContextMenuItem> contextMenuItems = new List<VFBContextMenuItem>();
    contextMenuItems.Add(new VFBContextMenuItem(0, VFBMenuItemType.normal,  "Custom option"));
    contextMenuItems.Add(new VFBContextMenuItem(1, VFBMenuItemType.normal,  "Custom disabled option", false));
    contextMenuItems.Add(new VFBContextMenuItem(2, VFBMenuItemType.checkbox, "Custom checkbox"));
    contextMenuItems.Add(new VFBContextMenuItem(3, VFBMenuItemType.checkbox, "Custom checkbox 2", true, 1));
 
    renderer.SetVFBContextMenuItems(contextMenuItems);
 
    // Context menu callback
    renderer.VFBContextMenuSelected += new EventHandler<VFBContextMenuSelectedEventArgs>((source, e) =>
    {
        int value = 0;
        switch (e.CommandId)
        {
            case 0:
                Console.WriteLine("Custom option clicked");
                break;
            case 1:
                Console.WriteLine("This is disabled");
                break;
            case 2:
                renderer.GetVFBContextMenuItemValue(e.CommandId, out value);
                Console.WriteLine(String.Format("Value of Custom checkbox is {0}", value));
                // Note that the value will not change automatically, you must change it yourself
                break;
            case 3:
                renderer.GetVFBContextMenuItemValue(e.CommandId, out value);
                renderer.SetVFBContextMenuItemValue(e.CommandId, 1 - value);
                Console.WriteLine(String.Format("Value of Custom checkbox 2 changed from {0} to {1}", value, 1 - value));
                break;
            default:
                Console.WriteLine(String.Format("Command {0} note implemented", e.CommandId));
                break;
        }
    });
 
    renderer.Vfb.Shown = true;
    renderer.WaitForVFBClosed();
}
// VFB Context menu entries
contextMenuItems = [
    {'id': 0, 'type': 'normal',   'text': 'Custom option'},
    {'id': 1, 'type': 'normal',   'text': 'Custom disabled option', 'enabled': false},
    {'id': 2, 'type': 'checkbox', 'text': 'Custom checkbox'},
    {'id': 3, 'type': 'checkbox', 'text': 'Custom checkbox 2', 'defaultValue': 1}
]
 
renderer.setVFBContextMenuItems(contextMenuItems)
// VFB Context menu callback
renderer.on('vfbContextMenuSelected', function (command, x, y) {
    switch(command){
        case 0:
            console.log("Custom option clicked")
            break
        case 1:
            console.log("This is disabled")
            break
        case 2:
            console.log("Value of Custom checkbox is", renderer.getVFBContextMenuItemValue(command))
            // Note that the value will not change automatically, you must change it yourself
            break
        case 3:
            value = renderer.getVFBContextMenuItemValue(command)
            renderer.setVFBContextMenuItemValue(command, 1 - value)
            console.log("Value of Custom checkbox 2 changed from", value, "to", 1 - value)
            break
        default:
            console.log('Command', command, 'not implemented')
    }
})

Işık Karışımı ve Sahneye Aktarma #

# Compatibility with Python 2.7.
from __future__ import print_function
 
# The directory containing the vray shared object should be present in the PYTHONPATH environment variable.
# Try to import the vray module from VRAY_SDK/python, if it is not in PYTHONPATH
import sys, os
VRAY_SDK = os.environ.get('VRAY_SDK')
if VRAY_SDK:
    sys.path.append(os.path.join(VRAY_SDK, 'python'))
import vray
import threading
 
SCENE_PATH = os.path.join(os.environ.get('VRAY_SDK'), 'scenes')
# Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
os.chdir(SCENE_PATH)
# An event used for waiting on the callback
event = threading.Event()
 
# Create an instance of VRayRenderer.
# The renderer is automatically closed after the `with` block.
with vray.VRayRenderer() as renderer:
    # Usually it's a good idea to have a log callback handler, but we will not add one for this example.
    # Load scene from a file.
    renderer.load(os.path.join(SCENE_PATH, 'cornell_new.vrscene'))
    # Add the LightMix plugin. No need to keep the reference, because you can't do anything with this plugin.
    # It just has to exist in the scene.
    renderer.classes.RenderChannelLightMix()
    # Environment light select
    ls_env = renderer.classes.RenderChannelLightSelect('LSEnvironment')
    ls_env.light_select_mode = 10  # 10 is a special, undocumented value used for environment light
    ls_env.name = 'Environment'
    # Self illumination light select
    ls_self = renderer.classes.RenderChannelLightSelect('LSSelfIllumination')
    ls_self.light_select_mode = 11  # 11 is a special, undocumented value used for self illumination light
    ls_self.name = 'Self Illum.'
    # A full light light select
    ls_light = renderer.classes.RenderChannelLightSelect('LSCeilingLight')
    ls_light.light_select_mode = 4  # full light (direct + indirect)
    ls_light.name = 'Ceiling Light'
    # Adding a light to a light select
    light_rect = renderer.plugins['VRayLightRectShape1']
    light_rect.channels_full = [ ls_light ]
    def lightMixTransfer(r, changes, instant):
        # Each LightMixChange object contains:
        #    - the render element plugin
        #    - isApplied flag (bool) - This must be set by the user and it will reset the change in the VFB
        #    - enabled flag (bool) - Whether the light select is enabled or not in the VFB. This is *not* reset even when isApplied is true.
        #    - intensity multiplier (float)
        #    - color multiplier (VRay::Color)
        for change in changes:
            if change['plugin']:
                print('\ [{}]: mult: {:.2f}, \ {}'.format(change['plugin'].name, change['intensityMult'], change['colorMult']))
                if change['plugin'].getName() == 'LSCeilingLight':
                    # Apply the change to the actual light plugin and mark it as applied, so it will be reset in the VFB.
                    # Note: You will need to keep track of which lights are in which light select render elements.
                    light_rect = r.plugins['VRayLightRectShape1']
                    # Don't forget the changes are multipliers, not overrides.
                    light_rect.color *= change['colorMult']
                    light_rect.intensity *= change['intensityMult']
                    # Mark this change as applied.
                    change['isApplied'] = True
            else:
                # The plugin being empty, means that it's the special "Rest" channel.
                # It contains all the lights that were not added in other light selects.
                print('\ [Rest]: mult: {:.2f}, \ {}'.format(change['intensityMult'], change['colorMult']))
        # Save the image with the corrections applied.
        r.vfb.saveImage('lightmix_vfb.png', {'singleChannel':True, 'applyColorCorrections':True})
        # Notify the main thread that the callback is done.
        event.set()
    # Set the callback
    renderer.setOnLightMixTransferToScene(lightMixTransfer)
 
    # Avoid getting stuck if VFB is closed
    def vfbClosed(r, _):
        r.stop()
        event.set()
    renderer.setOnVFBClosed(vfbClosed)
 
    # Start rendering
    renderer.startSync()
    print('Choose Source: LightMix from the layers panel and change the color and intensity of the lights.\
')
    print('Please note, that those are multipliers, not overrides.\
')
    print('When you are done, stop the rendering (if it hasn\'t completed) from the VFB button')
    print('and press the "To Scene" button. This will call the callback function.\
')
    print('Note: The LC pass must end, before the Light Select render elements take effect.\
')
    # Wait for the callback to be executed
    event.wait()
    # Start rendering again, this time with some of the changes applied to the lights in the scene
    renderer.startSync()
    renderer.vfb.shown=1
    print("\
Now, some of the changes are applied to the scene and reset in the LightMix layer.")
    print("The rendered image should look the same.")
    # Wait for rendering to end.
    renderer.waitForRenderEnd()
    # Save the new image.
    renderer.vfb.saveImage('lightmix_scene.png', {'singleChannel':True, 'applyColorCorrections':True})
#define VRAY_RUNTIME_LOAD_PRIMARY
#include <condition_variable>
#include "vraysdk.hpp"
#include "vrayplugins.hpp"
#include "utils.h"
 
using namespace VRay;
using namespace VRay::Plugins;
using namespace std;
 
const char *BASE_PATH = getenv("VRAY_SDK");
string SCENE_PATH = (BASE_PATH ? string(BASE_PATH) : string(".")) + PATH_DELIMITER + "scenes";
mutex m;
condition_variable cv;
 
// The transfer to scene callback function.
int onTransferToScene(VRayRenderer& r, const vector<LightMixChange>& changes, double instant, void*) {
// Save the image with the corrections applied.
ImageWriterOptions iwo;
iwo.flags.singleChannel = true;
iwo.flags.applyColorCorrections = true;
r.vfb.saveImage("lightmix_vfb.png", iwo);
printf("Transfer to scene callback called:");
for (auto& change : changes) {
// The LightMixChange object contains:
//    - the render element plugin
//    - isApplied flag (bool) - This must be set by the user and it will reset the change in the VFB
//    - enabled flag (bool) - Whether the light select is enabled or not in the VFB. This is *not* reset even when isApplied is true.
//    - intensity multiplier (float)
//    - color multiplier (VRay::Color)
if (change.plugin.isNotEmpty()) {
printf("\[%s]: mult: %f.2,\%s\
", change.plugin.getName(), change.intensityMult, change.colorMult.toString().c_str());
if (!strcmp(change.plugin.getName(), "LSCeilingLight")) {
// Apply the change to the actual light plugin and mark it as applied, so it will be reset in the VFB.
// Note: You will need to keep track of which lights are in which light select render elements.
LightRectangle light_rect = r.getPlugin<LightRectangle>("VRayLightRectShape1");
// Don't forget the changes are multipliers, not overrides.
light_rect.set_color(light_rect.get_color() * AColor(change.colorMult));
light_rect.set_intensity(light_rect.get_intensity() * change.intensityMult);
// Mark this change as applied.
change.isApplied = true;
}
}
// The plugin being empty, means that it's the special "Rest" channel.
// It contains all the lights that were not added in other light selects.
else
printf("\[Rest]\
");
}
// Notify the main thread that the callback is complete.
cv.notify_all();
return 0;
}
 
// On VFB closed callback function.
void onVfbClosed(VRayRenderer& r, double instant, void*) {
r.stop();
cv.notify_all();
}
 
int main() {
// Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
changeCurrentDir(SCENE_PATH.c_str());
VRayInit init(NULL, true);
VRayRenderer renderer;
// It's recommended to always have a console log, but we will not set it for this example
// Set the transfer to scene callback. Called when the "To Scene" button is pressed in the VFB
renderer.setOnLightMixTransferToScene(onTransferToScene);
// Avoid getting stuck if VFB is closed
renderer.setOnVFBClosed(onVfbClosed);
// Load a scene from file.
renderer.load("cornell_new.vrscene");
// Add the LightMix plugin. No need to keep the reference, because you can't do anything with this plugin.
// It just has to exist in the scene.
renderer.newPlugin<RenderChannelLightMix>();
// Environment light select
RenderChannelLightSelect ls_env = renderer.newPlugin<RenderChannelLightSelect>("LSEnvironment");
ls_env.set_light_select_mode(10); // 10 is a special, undocumented value used for environment light
ls_env.set_name("Environment");
// Self illumination light select
RenderChannelLightSelect ls_self = renderer.newPlugin<RenderChannelLightSelect>("LSSelfIllumination");
ls_self.set_light_select_mode(11); // 11 is a special, undocumented value used for self illumination light
ls_self.set_name("Self Illum.");
// A full light light select
RenderChannelLightSelect ls_light = renderer.newPlugin<RenderChannelLightSelect>("LSCeilingLight");
ls_light.set_light_select_mode(4); // full light (direct + indirect)
ls_light.set_name("Celiling Light");
// Adding a light to a light select
LightRectangle light_rect = renderer.getPlugin<LightRectangle>("VRayLightRectShape1");
light_rect.set_channels_full({ Value(ls_light) });
// Start rendering
renderer.startSync();
printf("Choose Source: LightMix from the layers panel and change the color and intensity of the lights.\
\
");
printf("Please note, that those are multipliers, not overrides.\
\
");
printf("When you are done, stop the rendering (if it hasn't completed) from the VFB button\
");
printf("and press the \"To Scene\" button. This will call the callback function.\
\
");
printf("Note: The LC pass must end, before the Light Select render elements take effect.\
");
// Wait for the callback to complete.
// This can only happen after the rendering is stopped, because the button is disabled while rendering.
{
unique_lock<mutex> lk(m);
cv.wait(lk);
}
printf("\
Now, some of the changes are applied to the scene and reset in the LightMix layer.\
");
printf("The rendered image should look the same.\
");
// Render again, this time with the lights changed in the scene.
renderer.startSync();
renderer.vfb.show(true);
renderer.waitForRenderEnd();
// Save the image with the corrections applied.
ImageWriterOptions iwo;
iwo.flags.singleChannel = true;
iwo.flags.applyColorCorrections = true;
renderer.vfb.saveImage("lightmix_scene.png", iwo);
 
return 0;
}
using System;
using System.IO;
using System.Threading;
using System.Collections.Generic;
using VRay;
using VRay.Plugins;
 
namespace _09_lightmix
{
class Program
{
static void Main(string[] args)
{
AutoResetEvent autoResetEvent = new AutoResetEvent(false);
string SCENE_PATH = Path.Combine(Environment.GetEnvironmentVariable("VRAY_SDK"), "scenes");
// Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
Directory.SetCurrentDirectory(SCENE_PATH);
// Create an instance of VRayRenderer with default options. The renderer is automatically closed after the `using` block.
using (VRayRenderer renderer = new VRayRenderer())
{
// It's usually a good idea to have a listener for any type of log message, but we will not add one for this example.
ImageWriterOptions iwo = new ImageWriterOptions();
iwo.SingleChannel = true;
iwo.ApplyColorCorrections = true;
// Avoid getting stuck if VFB is closed
renderer.VFBClosed += new EventHandler<VRayEventArgs>((source, e) =>
{
renderer.Stop();
autoResetEvent.Set();
});
renderer.LightMixTransferToScene += new EventHandler<LightMixTransferToSceneEventArgs>((source, e) =>
{
// Save the image with the corrections applied.
renderer.Vfb.SaveImage("lightmix_vfb.png", iwo);
Console.WriteLine("Transfer to scene callback called:");
foreach (var change in e.Changes)
{
// The LightMixChange object contains:
//    - The render element plugin
//    - IsApplied flag (bool) - This must be set by the user and it will reset the change in the VFB
//    - Enabled flag (bool) - Whether the light select is enabled or not in the VFB. This is *not* reset even when isApplied is true.
//    - Intensity multiplier (float)
//    - Color multiplier (VRay::Color)
if (change.Plugin != null)
{
Console.WriteLine(String.Format("\[{0}]: mult: {1:F2},\{2}", change.Plugin.GetName(), change.IntensityMult, change.ColorMult.ToString()));
if (change.Plugin.GetName() == "LSCeilingLight")
{
// Apply the change to the actual light plugin and mark it as applied, so it will be reset in the VFB.
// Note: You will need to keep track of which lights are in which light select render elements.
LightRectangle lightRect = renderer.GetPlugin<LightRectangle>("VRayLightRectShape1");
// Don't forget the changes are multipliers, not overrides.
lightRect.Color = lightRect.Color * new AColor(change.ColorMult, 1);
lightRect.Intensity = lightRect.Intensity * change.IntensityMult;
// Mark this change as applied.
change.IsApplied = true;
}
}
// The plugin being empty, means that it's the special "Rest" channel.
// It contains all the lights that were not added in other light selects.
else
Console.WriteLine("\[Rest]\
");
}
// Notify the main thread that the callback is complete.
autoResetEvent.Set();
});
// Load scene from a file.
renderer.Load("cornell_new.vrscene");
// Add the LightMix plugin. No need to keep the reference, because you can't do anything with this plugin.
// It just has to exist in the scene.
renderer.NewPlugin<RenderChannelLightMix>();
// Environment light select
RenderChannelLightSelect ls_env = renderer.NewPlugin<RenderChannelLightSelect>("LSEnvironment");
ls_env.LightSelectMode = 10; // 10 is a special, undocumented value used for environment light
ls_env.SetName("Environment");
// Self illumination light select
RenderChannelLightSelect ls_self = renderer.NewPlugin<RenderChannelLightSelect>("LSSelfIllumination");
ls_self.LightSelectMode = 11; // 11 is a special, undocumented value used for self illumination light
ls_self.SetName("Self Illum.");
// A full light light select
RenderChannelLightSelect ls_light = renderer.NewPlugin<RenderChannelLightSelect>("LSCeilingLight");
ls_light.LightSelectMode = 4; // full light (direct + indirect)
ls_light.SetName("Celiling Light");
// Adding a light to a light select
LightRectangle light_rect = renderer.GetPlugin<LightRectangle>("VRayLightRectShape1");
light_rect.ChannelsFull = new List<object>() { ls_light };
// Start rendering.
renderer.StartSync();
Console.WriteLine("Choose Source: LightMix from the layers panel and change the color and intensity of the lights.\
");
Console.WriteLine("Please note, that those are multipliers, not overrides.\
");
Console.WriteLine("When you are done, stop the rendering (if it hasn't completed) from the VFB button");
Console.WriteLine("and press the \"To Scene\" button. This will call the callback function.\
");
Console.WriteLine("Note: The LC pass must end, before the Light Select render elements take effect.\
");
// Wait for the callback to complete.
// This can only happen after the rendering is stopped, because the button is disabled while rendering.
autoResetEvent.WaitOne();
Console.WriteLine("\
Now, some of the changes are applied to the scene and reset in the LightMix layer.");
Console.WriteLine("The rendered image should look the same.");
// Render again, this time with the lights changed in the scene.
renderer.StartSync();
renderer.Vfb.Shown = true;
renderer.WaitForRenderEnd();
renderer.Vfb.SaveImage("lightmix_scene.png", iwo);
}
}
}
}
var path = require('path');
var vray = require(path.join(process.env.VRAY_SDK, 'node', 'vray'));
 
var SCENE_PATH = path.join(process.env.VRAY_SDK, 'scenes');
// Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
process.chdir(SCENE_PATH);
 
// Create an instance of VRayRenderer.
var renderer = vray.VRayRenderer();
// It's recommended to always have a console log callback but we will not add one for this example.
 
// Close the renderer when VFB is closed.
renderer.on("vfbClosed", function(instant) {
// This call is mandatory in order to free up the event loop.
// The renderer object is unusable after closing since its resources
// are freed. It should be released for garbage collection.
renderer.close();
});
 
renderer.on("lightMixTransferToScene", function(changes, count) {
// Each LightMixChange object contains:
//    - the render element plugin
//    - isApplied flag (bool) - This must be set by the user and it will reset the change in the VFB
//    - enabled flag (bool) - Whether the light select is enabled or not in the VFB. This is *not* reset even when isApplied is true.
//    - intensity multiplier (float)
//    - color multiplier (VRay::Color)
changes.forEach(change => {
if (change.plugin != null) {
console.log(`\[${change.plugin.name}]: mult: ${change.intensityMult.toFixed(2)}, \${change.colorMult}`);
if (change.plugin.getName() == "LSCeilingLight") {
// Apply the change to the actual light plugin and mark it as applied, so it will be reset in the VFB.
// Note: You will need to keep track of which lights are in which light select render elements.
light_rect = renderer.plugins["VRayLightRectShape1"];
// Don't forget the changes are multipliers, not overrides.
light_rect.color = light_rect.color.mul(vray.AColor(change.colorMult));
light_rect.intensity *= change.intensityMult;
// Mark this change as applied.
change.isApplied = true;
}
}
else {
// The plugin being empty, means that it's the special "Rest" channel.
// It contains all the lights that were not added in other light selects.
console.log(`\[Rest]: mult: ${change.intensityMult.toFixed(2)}, \${change.colorMult}`);
}
});
// Save the image with the corrections applied.
renderer.vfb.saveImageSync("lightmix_vfb.png", {singleChannel: true, applyColorCorrections: true});
// Render again, this time with the lights changed in the scene.
setTimeout(afterCallback, 0);
});
 
// Load scene from a file asynchronously.
renderer.load("cornell_new.vrscene", function(err) {
if (err) { throw err; } // Scene was not loaded.
// Add the LightMix plugin. No need to keep the reference, because you can't do anything with this plugin.
// It just has to exist in the scene.
renderer.classes.RenderChannelLightMix();
// Environment light select
ls_env = renderer.classes.RenderChannelLightSelect("LSEnvironment");
ls_env.light_select_mode = 10; // 10 is a special, undocumented value used for environment light
ls_env.name = "Environment";
// Self illumination light select
ls_self = renderer.classes.RenderChannelLightSelect("LSSelfIllumination");
ls_self.light_select_mode = 11; // 11 is a special, undocumented value used for self illumination light
ls_self.name = "Self Illum.";
// A full light light select
ls_light = renderer.classes.RenderChannelLightSelect("LSCeilingLight");
ls_light.light_select_mode = 4; // full light (direct + indirect)
ls_light.name = "Ceiling Light";
// Adding a light to a light select
light_rect = renderer.plugins["VRayLightRectShape1"]
light_rect.channels_full = [ ls_light ];
// Start rendering.
renderer.start(function(err) {
if (err) { throw err; } // Couldn't start rendering.
console.log("Choose Source: LightMix from the layers panel and change the color and intensity of the lights.\
");
console.log("Please note, that those are multipliers, not overrides.\
");
console.log("When you are done, stop the rendering (if it hasn't completed) from the VFB button");
console.log("and press the \"To Scene\" button. This will call the callback function.\
");
console.log("Note: The LC pass must end, before the Light Select render elements take effect.\
");
});
});
 
function afterCallback() {
renderer.start(function(err) {
if (err) { throw err; } // Couldn't start rendering.
console.log("\
Now, some of the changes are applied to the scene and reset in the LightMix layer.");
console.log("The rendered image should look the same.");
renderer.waitForRenderEnd(function() {
// Save the new image.
renderer.vfb.saveImageSync("lightmix_scene.png", {singleChannel: true, applyColorCorrections: true});
// Close the renderer.
renderer.close();
});
});
}

Diğer geri aramalar #

def onRenderLast(renderer, isRendering, instant):
    print('Starting rendering at:', instant)
    renderer.startSync()
 
def onRenderInteractive(renderer, isRendering, instant):
    print('Starting Interactive rendering at:', instant)
    oldRenderMode = renderer.renderMode
    renderer.renderMode = 'interactive'
    renderer.startSync()
    renderer.renderMode = oldRenderMode # resetting the renderMode after the rendering has started will not affect the current rendering process
 
def onShowVFBLog(renderer, instant):
    renderer.vfb.logMessage(vray.LOGLEVEL_INFO, 'VFB Log opened')
 
def onVFBClosed(renderer, instant):
    renderer.stop()
 
# called when the Render button or menu action is pressed. If not set, pressing Render will start rendering (like calling renderer.start())
renderer.setOnVFBRenderLast(onRenderLast) 
# called when the Start Interactive Render button or menu action is pressed. Requires showVfbButtonInteractiveStart to be True
renderer.setOnVFBRenderInteractive(onRenderInteractive) 
# called when the VFB Log tab is opened
renderer.setOnVFBShowMessagesWindow(onShowVFBLog)
# called when the VFB window is closed
renderer.setOnVFBClosed(onVFBClosed)
#define VRAY_RUNTIME_LOAD_PRIMARY
#include "vraysdk.hpp"
#include "utils.h"
using namespace VRay;
using namespace std;
 
const char *BASE_PATH = getenv("VRAY_SDK");
string SCENE_PATH = (BASE_PATH ? string(BASE_PATH) : string(".")) + PATH_DELIMITER + "scenes";
 
void onRenderLast(VRayRenderer& renderer, bool isRendering, double instant, void* userData) {
printf("Starting rendering at: %f\
", instant);
renderer.startSync();
}
void onRenderInteractive(VRayRenderer& renderer, bool isRendering, double instant, void* userData) {
printf("Starting Interactive rendering at: %f\
", instant);
VRayRenderer::RenderMode oldRenderMode = renderer.getRenderMode();
renderer.setRenderMode(VRayRenderer::RENDER_MODE_INTERACTIVE);
renderer.startSync();
renderer.setRenderMode(oldRenderMode); // resetting the renderMode after the rendering has started will not affect the current rendering process
}
void onShowVFBLog(VRayRenderer& renderer, double instant, void* userData) {
renderer.vfb.logMessage(MessageInfo, "VFB Log opened");
}
void onVFBClosed(VRayRenderer& renderer, double instant, void* userData) {
renderer.stop();
}
 
int main() {
// Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
changeCurrentDir(SCENE_PATH.c_str());
// Load V-Ray SDK library.
VRayInit init(NULL, true);
// The renderer is automatically closed at the end of the current scope.
VRayRenderer renderer;
// called when the Render button or menu action is pressed. If not set, pressing Render will start rendering (like calling renderer.start())
renderer.setOnVFBRenderLast(onRenderLast);
// called when the Start Interactive Render button or menu action is pressed. Requires showVfbButtonInteractiveStart to be true
renderer.setOnVFBInteractiveStart(onRenderInteractive);
// called when the VFB Log tab is opened
renderer.setOnVFBShowMessagesWindow(onShowVFBLog);
// called when the VFB window is closed
renderer.setOnVFBClosed(onVFBClosed);
// Load scene from a file.
renderer.load("cornell_new.vrscene");
// Start rendering.
renderer.startSync();
// Wait until rendering has finished.
renderer.waitForRenderEnd();
return 0;
}
using System;
using System.IO;
using VRay;
 
namespace _other_vfb_callbacks
{
class Program
{
static void Main(string[] args)
{
string SCENE_PATH = Path.Combine(Environment.GetEnvironmentVariable("VRAY_SDK"), "scenes");
// Change process working directory to SCENE_PATH in order to be able to load relative scene resources.
Directory.SetCurrentDirectory(SCENE_PATH);
// Create an instance of VRayRenderer with default options. The renderer is automatically closed after the `using` block.
using (VRayRenderer renderer = new VRayRenderer())
{
// called when the Render button or menu action is pressed. If not set, pressing Render will start rendering (like calling renderer.Start())
renderer.VFBRenderLast += new EventHandler<RenderLastEventArgs>((source, e) =>
{
Console.WriteLine("Starting rendering at: {0}", e.Instant);
renderer.StartSync();
});
// called when the Start Interactive Render button or menu action is pressed. Requires ShowVfbButtonInteractiveStart to be true
renderer.VFBRenderInteractive += new EventHandler<RenderInteractiveEventArgs>((source, e) =>
{
Console.WriteLine("Starting Interactive rendering at: {0}", e.Instant);
RenderMode oldRenderMode = renderer.RenderMode;
renderer.RenderMode = RenderMode.INTERACTIVE;
renderer.StartSync();
renderer.RenderMode = oldRenderMode; // resetting the RenderMode after the rendering has started will not affect the current rendering process
});
// called when the VFB Log tab is opened
renderer.VFBShowMessagesWindow += new EventHandler<VRayEventArgs>((source, e) =>
{
renderer.Vfb.LogMessage(LogLevelType.Info, "VFB Log opened");
});
// called when the VFB window is closed
renderer.VFBClosed += new EventHandler<VRayEventArgs>((source, e) =>
{
renderer.Stop();
});
// Load scene from a file.
renderer.Load("cornell_new.vrscene");
// Start rendering.
renderer.StartSync();
// Wait until rendering has finished.
renderer.WaitForRenderEnd();
}
}
}
}
 // called when the Render button or menu action is pressed. If not set, pressing Render will start rendering (like calling renderer.start())
renderer.on("vfbRenderLast", function(isRendering, instant) {
console.log("Starting rendering at: ", instant);
renderer.startSync();
});
// called when the Start Interactive Render button or menu action is pressed. Requires showVfbButtonInteractiveStart to be true
renderer.on("vfbRenderInteractive", function(isRendering, instant) {
console.log("Starting Interactive rendering at:", instant);
var oldRenderMode = renderer.renderMode;
renderer.renderMode = "interactive";
renderer.startSync();
renderer.renderMode = oldRenderMode; // resetting the renderMode after the rendering has started will not affect the current rendering process
});
// called when the VFB Log tab is opened
renderer.on("vfbShowMessagesWindow", function(instant) {
renderer.vfb.logMessage(vray.LOGLEVEL_INFO, "VFB Log opened");
});
// called when the VFB window is closed
renderer.on("vfbClosed", function(instant) {
renderer.stop();
// Closes the renderer. This call is mandatory in order to free up the event loop.
// The renderer object is unusable after closing since its resources are freed. 
// It should be released for garbage collection.
renderer.close();
});

Oluşturucu Seçenekleri #


  • enableFrameBuffer – (varsayılan: true) Bu render motoru tarafından VFB’nin kullanılıp kullanılmayacağını kontrol eder. Bunun, tüm işlem boyunca V-Ray GUI’sini devre dışı bırakan global enableFrameBuffer fonksiyonundan farklı olduğuna dikkat edin.

  • showFrameBuffer – (varsayılan: true) İşleme başladığında VFB’nin gösterilip gösterilmeyeceğini kontrol eder. Daha sonra VFB API’si aracılığıyla da gösterilebilir.

  • noRenderLicensePreCheck  – (varsayılan: false) – Varsayılan olarak, bir V-Ray render motoru oluşturmak bir AppSDK lisansını devreye sokar ve ayrıca çok kısa bir süreliğine bir render lisansını devreye sokar ve lisans hatasını erken döndürebilmek için serbest bırakır. Bu ön kontrolü, örneğin ağ iletişimini azaltmak için bu bayrakla devre dışı bırakabilirsiniz.

  • useDefaultVfbTheme  – (varsayılan: true) False olarak ayarlanırsa VFB teması yok sayılır ve üst uygulamanın teması devralınır.

  • showVfbButtonInteractiveStart – (varsayılan: false) – Ek bir Etkileşimli İşlemeyi Başlat düğmesi ve menü eylemi gösterir. Basıldığında, kullanıcı geri çağırma işlevini çağırır (varsayılan olarak işleme başlamaz).

  • previewRenderer – (varsayılan: false) Küçük önizleme amaçları için oluşturucuyu optimize eder. Üretim ortamında kullanılmamalıdır.

  • allowInvalidCharactersInPluginNames – (varsayılan: false) – Eklenti adlarında geçersiz karakterlerin kullanılmasına izin verin.

  • dockFrameBuffer – (varsayılan: false) – VFB penceresini yerleştir

  • hideToSceneButton – (varsayılan: false) – VFB’de Işık Karışımı aktarımı <Sahneye> düğmesini gizler. Bu işlevi uygulamayı planlamıyorsanız, düğmeyi gizlemek iyi bir fikirdir (aksi takdirde her zaman devre dışı kalacaktır).

  • useVfbLog – (varsayılan: true) – Dahili VFB günlüğünü kullanın

  • pluginLibraryPath – Bu, V-Ray eklentilerini yüklemek için varsayılan olmayan bir yol tanımlamak için isteğe bağlı olarak kullanılabilir  . Çoğu kullanıcının bunu ayarlamasına gerek yoktur. Birden fazla dosyanın belirtilmesine olanak tanır.

  • vfbDrawStyle  – Bu enum, VFB GUI’sinin stilini ve renklerini kontrol eder. Kullanılabilir stiller, V-Ray Standalone ürününün yanı sıra V-Ray for 3dsMax ve V-Ray for Maya’nın stilleridir.

Tarafından desteklenmektedir BetterDocs

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir