Virtualight & caustics


(Dittohead) #1

i can’t figure out how to add caustics to my images. i tried this in the shader file:


// Shader file converted from Blender by bruteforce

ReadArchive "statics.vib"

Declare floorX = Shader [ PlainSurface [
    Color '0.621052622795,0.639097750187,0.645112812519'
    Kd 0.800000011921
    Ks (0.0395683422685, '1.0,1.0,1.0')
    PhongSpecularBRDF 44
    Kt (0.0, 1.333, '1.0,1.0,1.0')
    ]
]

Declare jemX = Shader [ PlainSurface [
    Color '0.13533835113,0.481202989817,0.992481231689'
    Kd 1.0
    Ks (2.0, '1.0,1.0,1.0')
    PhongSpecularBRDF 22
    Kt (0.302158296108, 1.333, '1.0,1.0,1.0')
    Caustics 0.5  <---------------------------------added that there
    ]
]

what am i doing wrong here? am i not adding the right things? i am using vlight gui, is there something i have to set there to render caustics, seeing that i already added it to the shader file? my file is a simple scene with a plane, and three gems stting there.


(eeshlo) #2

One of the unfortunate things about the export script which would be really easy to change is that it assigns the materials to every polygon indvidually. You have to remove the shader names from the mesh data .vib files, and put the shader name in the ReadArchive block after the transform of the main scene .vib file. You also have to enable photons() of course.


(Dittohead) #3

i feel stupid, but where do i put photons()?

and do i need to add caustics X.X to the plzne also?


(Jamesk) #4

Photons is an autonomous directive, so you can place it somewhere in the beginning of your VIB-file. Not in any particular block. Recommended reading: Section 3 (3.5 specifically) of the VLightInterface1.3.pdf-file included with your download :slight_smile: