RTCompound: Architectural Framebuffers Compound

Plugins linking to this thread: (hide)

Architectural FramebuffersAuthor: Jason Wells
This is a rendertree compound that splits up the Architectural Shader over ALL the framebuffer channels. Something similar has been done but I thought I'd try it myself anyway.

What I've also done is created a couple of simple scripts that set up ALL the required channels so that all you need to do is plug in the RM_Architectural Splitter and hook it up like a normal mia_architecture node and your ready to render out a series on floating or non-floating point channels.


Look at the forum thread for more details and usage instructions.

local backup: RM_Architectural Splitter.xsirtcompound

Post Reply
User avatar
redmotion
Posts: 150
Joined: 09 Jun 2009, 18:38
Location: London
Contact:

RTCompound: Architectural Framebuffers Compound

Post by redmotion » 10 Oct 2009, 22:13

This is a rendertree compound that splits up the Architectural Shader over ALL the framebuffer channels. Something similar has been done but I thought I'd try it myself anyway.
RM_Architectural Splitter.zip
(4.34 KiB) Downloaded 509 times
What I've also done is created a couple of simple scripts that set up ALL the required channels so that all you need to do is plug in the RM_Architectural Splitter and hook it up like a normal mia_architecture node and your ready to render out a series on floating or non-floating point channels.

Lastly, I've left the names of the mia parameters as they are so its easier to cross reference with the param names in Mental Images Architectural Shaders manual. (See page 44 for comp setup)

1.Add all the channels to the scene with:

Code: Select all

CreateRenderChannel "Diffuse_Result", siRenderChannelColorType
CreateRenderChannel "Diffuse_Raw", siRenderChannelColorType
CreateRenderChannel "Diffuse_Level", siRenderChannelColorType

CreateRenderChannel "Spec_Result", siRenderChannelColorType
CreateRenderChannel "Spec_Raw", siRenderChannelColorType
CreateRenderChannel "Spec_Level", siRenderChannelColorType

CreateRenderChannel "Refl_Result", siRenderChannelColorType
CreateRenderChannel "Refl_Raw", siRenderChannelColorType
CreateRenderChannel "Refl_Level", siRenderChannelColorType

CreateRenderChannel "Refr_Result", siRenderChannelColorType
CreateRenderChannel "Refr_Raw", siRenderChannelColorType
CreateRenderChannel "Refr_Level", siRenderChannelColorType

CreateRenderChannel "Tran_Result", siRenderChannelColorType
CreateRenderChannel "Tran_Raw", siRenderChannelColorType
CreateRenderChannel "Tran_Level", siRenderChannelColorType

CreateRenderChannel "Indirect_Result", siRenderChannelColorType
CreateRenderChannel "Indirect_Raw", siRenderChannelColorType
CreateRenderChannel "Indirect_Post_AO", siRenderChannelColorType

CreateRenderChannel "AO_Raw", siRenderChannelColorType
CreateRenderChannel "Add_Result", siRenderChannelColorType
CreateRenderChannel "Opacity_Result", siRenderChannelColorType
CreateRenderChannel "Opacity_Raw", siRenderChannelColorType
CreateRenderChannel "Opacity", siRenderChannelScalarType
2a. Either add all the floating point channels using:
Beauty = diffuse_level * (diffuse_raw + (indirect_raw * ao_raw)) +
spec_level * spec_raw +
refl_level * refl_raw +
refr_level * refr_raw +
tran_level * tran_raw +
add_result
floating point channels.jpg
floating point channels.jpg (91.12 KiB) Viewed 9687 times

Code: Select all

Set oPass = GetCurrentPass 
CreateFramebuffer "Passes." & oPass.Name, "Diffuse_Level"
SetValue "Passes." & oPass.Name & ".Diffuse_Level.Format", "exr"
SetValue "Passes." & oPass.Name & ".Diffuse_Level.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Diffuse_Raw"
SetValue "Passes." & oPass.Name & ".Diffuse_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Diffuse_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Indirect_Raw"
SetValue "Passes." & oPass.Name & ".Indirect_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Indirect_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "AO_Raw"
SetValue "Passes." & oPass.Name & ".AO_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".AO_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Spec_Level"
SetValue "Passes." & oPass.Name & ".Spec_Level.Format", "exr"
SetValue "Passes." & oPass.Name & ".Spec_Level.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Spec_Raw"
SetValue "Passes." & oPass.Name & ".Spec_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Spec_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Refl_Level"
SetValue "Passes." & oPass.Name & ".Refl_Level.Format", "exr"
SetValue "Passes." & oPass.Name & ".Refl_Level.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Refl_Raw"
SetValue "Passes." & oPass.Name & ".Refl_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Refl_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Refr_Level"
SetValue "Passes." & oPass.Name & ".Refl_Level.Format", "exr"
SetValue "Passes." & oPass.Name & ".Refl_Level.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Refr_Raw"
SetValue "Passes." & oPass.Name & ".Refl_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Refl_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Tran_Level"
SetValue "Passes." & oPass.Name & ".Tran_Level.Format", "exr"
SetValue "Passes." & oPass.Name & ".Tran_Level.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Tran_Raw"
SetValue "Passes." & oPass.Name & ".Tran_Raw.Format", "exr"
SetValue "Passes." & oPass.Name & ".Tran_Raw.BitDepth", 21

CreateFramebuffer "Passes." & oPass.Name, "Add_Result"
SetValue "Passes." & oPass.Name & ".Add_Result.Format", "exr"
SetValue "Passes." & oPass.Name & ".Add_Result.BitDepth", 21
2b. Or the simpler non-floating point setup:
Beauty = diffuse_result + indirect_result + spec_result +
refl_result + refr_result + tran_result +
add_result
nonfloating point channels.jpg
nonfloating point channels.jpg (55.7 KiB) Viewed 9687 times

Code: Select all

Set oPass = GetCurrentPass 
CreateFramebuffer "Passes." & oPass.Name, "Diffuse_Result"
CreateFramebuffer "Passes." & oPass.Name, "Indirect_Result"
CreateFramebuffer "Passes." & oPass.Name, "Spec_Result"
CreateFramebuffer "Passes." & oPass.Name, "Refl_Result"
CreateFramebuffer "Passes." & oPass.Name, "Refr_Result"
CreateFramebuffer "Passes." & oPass.Name, "Tran_Result"
CreateFramebuffer "Passes." & oPass.Name, "Add_Result"

User avatar
redmotion
Posts: 150
Joined: 09 Jun 2009, 18:38
Location: London
Contact:

Re: RTCompound: Architectural Framebuffers Compound

Post by redmotion » 10 Oct 2009, 22:19

This is the Toolbar for containing the scripts above.
Architectural Channels Scripts.zip
(1.17 KiB) Downloaded 467 times

User avatar
maxmancl
Posts: 5
Joined: 10 Jun 2009, 10:02
Contact:

Re: RTCompound: Architectural Framebuffers Compound

Post by maxmancl » 11 Oct 2009, 12:59

Very good, thanks.

User avatar
redmotion
Posts: 150
Joined: 09 Jun 2009, 18:38
Location: London
Contact:

Re: RTCompound: Architectural Framebuffers Compound

Post by redmotion » 11 Apr 2010, 22:37

Updated for 2011 using the new (faster) mia_x material (quite roughly implimented as some parameters don't seem to have any use. All new parameters have been added to a PPG group called "Other" in Additional Options tab.)

Due to a RT limitation, the light list cannot be exposed in a compound, so you'll have to go into the compound and add them manually. I've therefore set the default option to "ignore the list".

Very little testing has been done but the scripts here seem to work fine with it. AO seems to render fine too, but I've noticed some errors regarding AO appearing in the script editor.

Please test and report any issues! Thanks.
RM_Architectural Splitter_2011.zip
(4.47 KiB) Downloaded 408 times

luceric
Posts: 1251
Joined: 22 Jun 2009, 00:08

Re: RTCompound: Architectural Framebuffers Compound

Post by luceric » 12 Apr 2010, 20:25

mia_material_x is in Softimage 2011,
it's called "Architectural (multi-out)"

irakli_san
Posts: 29
Joined: 03 Jul 2009, 14:18

Re: RTCompound: Architectural Framebuffers Compound

Post by irakli_san » 06 Jul 2010, 18:49

Thanks for shearing

found a mistake in script. after createframebuffer for refraction pass in setvalue line. its refl_raw and must be refr_raw

oh! and adding "apply RM_ArchMaterial to selection" button to your toolbar would be great idea

p.s.

any idea how to easily toggle between "Render Channels" in render region?

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests