SPDL Version = "2.0.0.0"; Reference = "{19672007-1116-6660-3300-A71CE0040425}"; PropertySet "sj_sss_fast_simple_lightmap_v2_params" { Parameter "out" output { GUID = "{19672007-1116-6660-3301-A71CE0040425}"; Type = struct { Parameter "point" output { GUID = "{19672007-1116-6660-3302-A71CE0040425}"; Type = vector; } Parameter "normal" output { GUID = "{19672007-1116-6660-3303-A71CE0040425}"; Type = vector; } }; } Parameter "lightmap" input { GUID = "{19672007-1116-6660-3304-A71CE0040425}"; Type = texture; Inspectable = on; Texturable = on; UI "writable texture" = "color:512"; } Parameter "ambient" input { GUID = "{19672007-1116-6660-3305-A71CE0040425}"; Type = color; Texturable = on; Value = 0.0 0.0 0.0; } Parameter "ambience" input { title = "Scene Ambience"; guid = "{3515CC74-082C-11D0-91DE-00A024C78EE3}"; type = color; value = 0.1 0.1 0.1; flags = 1; inspectable = off; texturable = off; } Parameter "lightmap_gamma" input { GUID = "{19672007-1116-6660-3306-A71CE0040425}"; Type = scalar; Value = 0.75; Value Minimum = 0.0; } Parameter "scatter_bias" input { GUID = "{19672007-1116-6660-3307-A71CE0040425}"; Type = scalar; Value = 0.1; Value Minimum = -1; Value Maximum = 1.0; } Parameter "lights" input { GUID = "{19672007-1116-6660-3308-A71CE0040425}"; UI "mapping" = "{38D56C23-8C0D-11D0-857D-00A02417D029}"; Inspectable = off; Type = array { Parameter "lights" input { GUID = "{19672007-1116-6660-3309-A71CE0040425}"; Type = light; } }; } //declared but unused Parameter "radiance" input { guid = "{19672007-1116-6660-3310-A71CE0040425}"; type = color; value = 0.0 0.0 0.0 0.0; // texturable = on; texturable = off; } Parameter "useLightsList" input { guid = "{19672007-1116-6660-3311-A71CE0040425}"; type = boolean; flags = 1; value = false; texturable = on; } Parameter "lightsList" input #LIGHT LIST { title = "Lights List"; guid = "{19672007-1116-6660-3312-A71CE0040425}"; Inspectable = on; Texturable = off; Persistable = on; ui "control" = "LightListParamItem.LightListParamItem.1"; type = array { Parameter "lightsList" input { title = "Lights List"; guid = "{19672007-1116-6660-3313-A71CE0040425}"; type = light; Inspectable = on; Texturable = off; Persistable = on; ui "control" = "LightListParamItem.LightListParamItem.1"; } }; } } MetaShader "sj_sss_fast_simple_lightmap_v2" { Name = "sj_sss_fast_simple_lightmap_v2"; Type = lightmap; Renderer "mental ray" { Name = "sj_sss_fast_simple_lightmap_v2"; BeginText # Phenomenon wiring diagram Node "lm_sample_switch" = guid "{85C16046-BCFA-11D1-90E9-0000F804EB21}"; # indirect Node "irradiance" = guid "{25C69C36-E7E3-11D2-8AF6-00A0C9892542}"; # sib_photon_matte Connection "irradiance::input" = interface "radiance"; Node "lm_sample" = guid "{FAE49B0B-412E-4667-AFB8-B004155ED2C9}"; # misss_lambert_gamma Node "lllm_sample" = guid "{FAE49B0B-412E-4667-AFB8-B004155ED2C9}"; # misss_lambert_gamma Connection "lm_sample::ambient" = interface "ambient"; #shared Connection "lm_sample::ambience" = interface "ambience"; #shared Connection "lm_sample::diffuse" = value 1.0 1.0 1.0 1.0; #unique Connection "lm_sample::indirect" = value off; #unique Connection "lm_sample::diffuse_curve" = interface "lightmap_gamma"; #unique Connection "lm_sample::mode" = value 0; #unique Connection "lm_sample::lights" = interface "lights"; #shared Connection "lllm_sample::ambient" = interface "ambient"; #shared Connection "lllm_sample::ambience" = interface "ambience"; #shared Connection "lllm_sample::diffuse" = value 1.0 1.0 1.0 1.0; #unique Connection "lllm_sample::indirect" = value off; #unique Connection "lllm_sample::diffuse_curve" = interface "lightmap_gamma"; #unique Connection "lllm_sample::mode" = value 0; #unique Connection "lllm_sample::lights" = interface "lightsList"; #shared Connection "lm_sample_switch::input1" = "lm_sample"; Connection "lm_sample_switch::input2" = "lllm_sample"; Connection "lm_sample_switch::switch" = interface "useLightsList"; # - lm_sample/irradiance mix Node "lm_sample_mix" = guid "{6EE27300-A1E2-11D3-AE51-00A0C96E63E1}"; # sib_color_math_basic Connection "lm_sample_mix::input1" = "lm_sample_switch"; Connection "lm_sample_mix::input2" = "irradiance"; Connection "lm_sample_mix::op" = value 0; Connection "lm_sample_mix::alpha" = value off; Node "lm_write" = guid "{BA555E5E-ED81-42CF-99BD-C3067DA138FF}"; # misss_lightmap_write Connection "lm_write::lightmap" = interface "lightmap"; #shared Connection "lm_write::scatter_bias" = interface "scatter_bias"; #unique Connection "lm_write::input" = value "lm_sample_mix"; #unique Connection root = "lm_write"; EndText } } Defaults { ambient { Name = "Ambient Colour"; UIType = "rgb"; Commands = "{F5C75F11-2F05-11D3-AA95-00AA0068D2C0}"; } lightmap_gamma { Name = "Sampling Gamma"; UIRange = 0.0 To 2.0; } scatter_bias { Name = "Bias"; UIRange = -0.2 To 0.2; } radiance { Name = "Radiance"; UIType = "rgb"; Commands = "{F5C75F11-2F05-11D3-AA95-00AA0068D2C0}"; } useLightsList { Name = "Use Lights List"; } lightsList { Name = "Lights List"; UIType = "LightListParamItem.LightListParamItem.1"; } } Logic { Sub useLightsList_OnChanged() lightsList.enable(useLightsList.value) End Sub Sub Info_OnClicked() dim s s = "sj_sss_fast_simple_lightmap_v2 ------------ by Stefano Jannuzzo" & vbCrlf s = s & "---------------------------------------------------------------" & vbCrlf s = s & "Should be used coupled with sj_sss_fast_simple_material_v2" & vbCrlf s = s & "Changes from v1:" & vbCrlf s = s & "- Added local lights list (optional)" & vbCrlf s = s & " If enabled, the lights in the list only are used." & vbCrlf s = s & " The list should match the one in sj_sss_fast_simple_material_v2" XSIUIToolkit.MsgBox(s) End Sub Sub OnInit useLightsList_OnChanged End Sub } HelpFile = "Help/shaderpresets.hlp"; HelpID = 4003; Layout "Default" { Tab "Surface" { ambient; } Tab "Scattering" { Group "Scatter Controls" { scatter_bias; } } Tab "Advanced Settings" { /* Group "Indirect Illumination" { radiance; } */ Group "Lightmap" { lightmap_gamma; } } Tab "Extra" { Group "Lights" { useLightsList; lightsList; } Group "Info" { Button Info = "Info", 200; } } lightmap; } Layout "RenderTree" { ambient; scatter_bias; lightmap_gamma; useLightsList; lightsList; lightmap; }