Re: Diffuse Color/Albedo Only Render Pass (Very limited...)

Date : Sat, 29 Mar 2008 18:39:42 -0400
To : XSI(at)Softimage.COM
From : todd akita <takita(at)earthlink.net>
Subject : Re: Diffuse Color/Albedo Only Render Pass (Very limited...)
You'll have to plug it in yourself but this'll insert an "Albedo" render channel on selected Materials.
It'll also check and see if you actually have an "Albedo" framebuffer and if not it'll make it (python)


### begin

RendOpts = xsi.Dictionary.GetObject ('Passes.RenderOptions')
myChannels = []
for N in RendOpts.RenderChannels:
myChannels.append(N.Name)
if "Albedo" not in myChannels:
RendOpts.CreateRenderChannel( 'Albedo', c.siRenderChannelColorType )


for Sel in xsi.Selection:
isMat = ( xsi.ClassName(Sel))
if( isMat != "Material" ):
xsi.logmessage (str(Sel) + " isn't a Material")
else:
myShader = Sel.Shaders
myMix = xsi.CreateObjectFromPreset('Shaders\\Texture\\Mixers\\Mix_2colors.Preset')
myMix.Name = 'Buffers'
Sel.Surface.Connect( myMix )
myMix.base_color.Connect( myShader(0) )
Sel.Shadow.Connect( myMix )
Sel.Photon.Connect( myMix )
myMix.inuse1.Value = 1 myColorChannel = xsi.CreateObjectFromPreset('Shaders\\Texture\\Render_Channels\\Color_StoreInChannel.Preset')
myColorChannel.channel.Value = 'Albedo'
myMix.color1.Connect( myColorChannel )
myMix.weight1.red.Value = 0
myMix.weight1.green.Value = 0
myMix.weight1.blue.Value = 0


### end

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.