Jump to content

render pass script


itriix

Recommended Posts

has anyone given a "render pass" script a try? or know of one already? i went through the houdini render passes pdf and it took FOREVER setting up all those passes. i should have been doing my particle work instead! haha... so anyways, what it did seem like however was that most all of it was very repetitive so what better for repetitive work than a script? hmmm... so are there any? of course everybodys pipeline handles passes differently, but, overall, still seems like something that could be nice to have... especially for complicated scenes, therefore, with a "pickable" or pattern "recognized" way of shooting out passes would be nice. the more i keep thinking about it, the more i think something like this has to be out there already.

example: of pseudo code idea:

simple case: 3 objects - cube, triangle, and grid. 3 lights - key, fill, rim... camera.

select everything:

create MAIN take...

then add take: call it "diffuse_passes" take, *which will act as a simple folder for the individual objects diffuse takes*

then select the diffuse_passes take, and add a take... name this take based off of current object

select all objects, include in take display paramater: set to 0 for all objects, then select current object, set it to 1....

select all lights,

include specular and diffuse, turn off specular, turn on diffuse *this would override all so guess could check for if something has it's diffuse off already, and could make that an ability, to override or not*, but anyways,

select MAIN take

create mantra node, have it create a path "based on objects" name, and "user controlled root"

and then basically, have it do this for each object and each pass: spec pass, reflection pass, shadow pass... *all with their obvious setting and not setting* of particular paramaters. also, would have to have user control so that the artist could decide to not render particular passes (right)

i know this can get complicated quite quick, but for simple things, i think this is more than worthwhile. it can also continue, script could, create a layer node in a cops, attach a file node to it's input, and it could set the name to whatever the name of the output file name of the mantra node was.... then at the end, you can have the comp set up procedurally with all of it's layers...

SO, i have no time to work on this at all, also should really be doing my particle work instead, but i've taken a detour for a little while!

okay thanks for listening,

Jonathan

oh yeah and please let me know if you are aware of this kind of script lying around out there somewhere.

Edited by itriix
Link to comment
Share on other sites

oh yeah and please let me know if you are aware of this kind of script lying around out there somewhere.

Most scripts like this are tailored to studio pipelines, since they would rely heavily on specific project environment variables and web services, examples being a global project render location or a call that returns a shot's frame range. Every studio's pipeline differs, from the OS they use, to the way they submit renders, and what they use to render (mantra, renderman, mental ray, or some proprietary renderer). That being said, there isn't an easy way to build a script to do all this. There could be for certain parts, such as setting up takes for objects, and taking care of the naming conventions based on such. Other parts, such as setting up render nodes, render directories, and other misc. shot data would be different for each studio. It would be more realistic to look for a cookbook of functions that do something similar. Most of these functions can be hacked together quite easily with Python, with a few calls to hscript, since the hou module doesn't seem to support takes yet.

Link to comment
Share on other sites

yeah, i was sure it was pipeline oriented but it would still be nice for "personal projects" so i'll look more into the "cookbook" of functions that i'd need to accomplish it... thanks for the warning about "hou module not supporting takes". i'm sure i would have gone in circles with that!

thanks again

J

Link to comment
Share on other sites

I would recommend if you're going the route of diffuse/spec/etc pass that you export those layers in the shader and embed them all into a single exr file with the beauty pass. Mantra has to compute the diffuse layer in order to give you the beauty layer anyway, so exporting it is effectively 'free', rather than doing the render all over again. Plus you get the compactness of a single image containing the final render plus all the layers needed to assemble it.

Cheers,

J.C.

Link to comment
Share on other sites

I would recommend if you're going the route of diffuse/spec/etc pass that you export those layers in the shader and embed them all into a single exr file with the beauty pass. Mantra has to compute the diffuse layer in order to give you the beauty layer anyway, so exporting it is effectively 'free', rather than doing the render all over again. Plus you get the compactness of a single image containing the final render plus all the layers needed to assemble it.

Cheers,

J.C.

sounds good, seems like this will all get pretty tricky very quicky! i'll post results if and when i get around to messing with this.

thanks,

J

so just thinking about it a bit more..... if i have three objects, square, sphere, grid. if each have their own shader... and basic three point lighting. and need to get all of their passes seperated, as i LOOP through the objects in my scene, i'd want to tell a mantra node to "communicate with the shader and set up a layer for each pass"... so in the end i'd have a mantra node for each object?... or can it all be crammed into one mantra node, with a script that essentially creates a layer for EACH object and each pass of that object? and then jam ALL of that in one exr?

Edited by itriix
Link to comment
Share on other sites

Well, no, I was just referring to the render layers, as in diffuse, etc. I think you effectively remove those from the looping process - any given pass, just make sure your shader exports those names, and in the mantra ROP you specify the extra layers and it will pick it up automatically. Check out Properties/Output near the bottom and add extra image plane. That way, any other looping you're doing just has those in there by default. You do need to use shaders that are setup for this, however.

Cheers,

J.C.

Link to comment
Share on other sites

Well, no, I was just referring to the render layers, as in diffuse, etc. I think you effectively remove those from the looping process - any given pass, just make sure your shader exports those names, and in the mantra ROP you specify the extra layers and it will pick it up automatically. Check out Properties/Output near the bottom and add extra image plane. That way, any other looping you're doing just has those in there by default. You do need to use shaders that are setup for this, however.

Cheers,

J.C.

gotcha... i guess that "render pass pdf is kind of old" haha... they used takes for everything, so that's what got me thinking about this beast because it took FOREVER to go through and set it all up. but if the shader is already exporting the correct passes, then i simply just need to loop through the objects in the scene, and have it render... HMMM that doesn't sound so bad!

Link to comment
Share on other sites

gotcha... i guess that "render pass pdf is kind of old" haha... they used takes for everything, so that's what got me thinking about this beast because it took FOREVER to go through and set it all up. but if the shader is already exporting the correct passes, then i simply just need to loop through the objects in the scene, and have it render... HMMM that doesn't sound so bad!

Yeah that's pretty much the standard way of doing it these days. Then you just take it in the comp and copy each channel out of the exr to work with. By Using Deep Rasters you can avoid using a lot of takes, but they're still useful for setting up certain passes.

Edited by static
Link to comment
Share on other sites

Yeah that's pretty much the standard way of doing it these days. Then you just take it in the comp and copy each channel out of the exr to work with. By Using Deep Rasters you can avoid using a lot of takes, but they're still useful for setting up certain passes.

thanks so much, i truly appreciate you taking the time to explain this

cheers,

Jonathan

Link to comment
Share on other sites

Hi,

When I need aditional passes (not using deep rasters), I always put all the needed geometries in a subnet rendered with its own rop. I find it much easier to use than takes.

I wrote some python scripts some time ago for this kind of work : http://frenchdog.wordpress.com/2009/01/11/...i-renderset-v1/

I put an apprentice OTL on the exange too http://www.sidefx.com/exchange/info.php?fi...p;versionid=592

Hope this help,

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...