T2S File Format

In order to feed xsi shaders with physical material information, Tek2Shoot uses t2s file format to store different model parameters.

T2S files can store data for Lafortune model, IOR, etc. The goal is to be able to use real measurment data like Cornell university for BRDF to build preset files for our illumination shader.

Download the first pack T2S FilePack 01 - 11.15 KB. New packs coming soon…

T2S File Format Pspad

Lafortune T2S files

The T2S file format is formated like an ini file, it has some sections that contain parameters that are used by the different shaders.

As a text file, t2s are made to be modified/created by hand or by tools that aim at helping build models.

For example here is an extract of such a file for a Lafortune model:

; Tek2Shoot physical parameters file format
;
; Lafortune model : Cornell's Dupont Cayman lacquer,
; as used by the Ford Motor Company
;

[Model]
Type=Lafortune

[LafortuneParameters]
DiffuseR=1.6975113561687E-09
DiffuseG=0.00528865064056913
DiffuseB=0.0282197430365825
NbLobes=3

[Lobe0]
R_Cx=-0.173325012813183
R_Cy=-0.173325012813183
R_Cz=-0.781461130884269
R_Power=3.49807873729296

G_Cx=0.454890871106113
G_Cy=0.454890871106113
G_Cz=-0.634748129093241
G_Power=99.2031830199456

B_Cx=-0.843858153317284
B_Cy=-0.843858153317284
B_Cz=0.855093112043271
B_Power=4.48149667757088

Everything can easily modified based on characteristics of the models.

The main goal is to provide such files based on real measurment data. In order to achieve this, Tek2Shoot has developped a BRDF to Lafortune model fitter. This is a solver that takes as input Cornell, Columbia Utrecht or any other  BRDF measurment data and tries to fit the measurement to a Lafortune model. The solver has different algorithms and error functions to find different fits.

T2S Solver

T2S Solver

The extraction of Lafortune models has been performed  for Cornell and other sources. Some  associated models are included in the T2S FilePack 01 - 11.15 KB.

For details on the Lafortune Model, please refer to the original article.

A simple description of this model would be to consider a BRDF as a sum of L lobes, where the radiance caused by each of these lobes is, for each color channel :

Red_Radiance (L) = Cx(R,L) (Ux.Vx) + Cy(R,L) (Uy.Vy) + Cz(R,L) (Uz.Vz)
Blue_Radiance (L) = Cx(G,L) (Ux.Vx) + Cy(G,L) (Uy.Vy) + Cz(G,L) (Uz.Vz)
Green_Radiance (L) = Cx(B,L) (Ux.Vx) + Cy(B,L) (Uy.Vy) + Cz(B,L) (Uz.Vz)

where U and V are the incoming and viewing vectors, and xyz a basis with z corresponding to the surface normal.

The highlights may thus have slight colorations depending on the viewing / lighting angles.

Fresnel T2S files

The Fresnel T2S files are used to get colored Fresnel Masks. It allows to set an independent refractive index (ior) and absorbtion coefficient (k) for R,G and B, and creates fluctuations on the reflection colors (current version of T2S_Illumination only uses colored IOR for reflections).
Thus, the Fresnel Mask can be white for grazing angles, and become colored depending on the incidence.
Here is an example of a Fresnel T2S file

;   Gold Fresnel Preset
;
;
; IOR values adapted from SOPRA NK-Database measures
;

[Model]
Type=Fresnel

[FresnelParameters]

R_ior = 0.16
R_k   = 4.0

G_ior = 0.4
G_k   = 2.65

B_ior = 1.61
B_k   = 1.94

The values obtained for IOR presets have already been included in the Fresnel Presets of T2S_Illumination. Some of them are included in the T2S FilePack 01 - 11.15 KB in order to bring examples for those wanting to create their own Fresnel t2s files.

Thursday, June 29th, 2006 Softimage XSI

1 Comment to T2S File Format

  • Archer} says:

    Any chance for a new presets ?

  • Leave a Reply

    Tek2Shoot Tek2Shoot

    89 rue Gabriel Péri
    92120 MONTROUGE
    FRANCE

    Phone: (33)1.55.58.23.50
    Fax: (33)1.55.58.22.23

    Contact us