Jump to content

Compositing Setup


Rafal123

Recommended Posts

Hey guys!

I wanna post here question from my friend who use Houdini but which english skills r not the best.

Here's the translated his stuff:

---------------

"Hello everyone. It's my first post here. I hope U'll help me to make an OTL. I wanna create simple compositing setup. I render through 'Cop2/Render' ,and rendered this way frames I would like to automatically record on disk using 'Cop2/Rop File Output' (time change=Render image=save to disk)

If certain frame, with certain name (i.e test.34.tga) exist on disk, then 'node Cop2/Switch' turn us to 'node Cop2/File' ,which I load.

Example:

if (file exist "//test.$F4.tga")

load frame on disk

else

render frame and save on disk

Tell me how I can run Button render in ROP File Output from(using) Texport Editor?

---------------

Ok guys, I posted here cos there's a little bit scripting stuff.

Link to comment
Share on other sites

On a unix system you can use the test command to check that a file exists. You can call this command and capture the error status using the systemES command in Houdini's expression language:

           set errorStatus = `systemES("test -r $HIP/out/test.$F.tga")`

test -r returns 0 if the file exists and 1 if it doesn't.

If you have a ROP embedded in an asset you can trigger its render button by using an opparm command:

           opparm -c outputDriver execute

I'm not sure I understand why you want to use the textport editor if you are building an asset. Just put your script in the asset. It can be called by pressing a button which has a callback script. Use the above check to render any missing frames without overwriting ones that exist. You can then use a standard File COP to reference all of the files back from disk.

If you want, the script can also fill out the name of the files to load on the File COP. This is easiest of you promote the File COP's filename parameter up to the asset and make it a hidden parameter which can be written to by your script. And you could use another hidden parameter to store whether the files have been written successfully. If they have then you can switch in the File COP and if they haven't you can subsitite a dummy frame or whatever so that your comp doesn't break.

Hope that helps ...

Link to comment
Share on other sites

hey guys!

many thanks for answers but those didn't solve my problem, so here I got next issues, check it out:

1. I use Windows and command:

set errorStatus = `systemES("test -r $HIP/out/test.$F.tga")`

doesn't work. Are there any other way to check if certain file exist on hdd?

I've tried also cygwin, UnxUtils... but command (test -r cboot.ini) doesn't return any argument. If Unix commands are the only way to go what U suggest to install and which way?

2. How can I put in OTL script to be executed in time changing? Similar to --> cop2/Render/Autoredner.

Link to comment
Share on other sites

One rather nasty hack goes something like this

set currentpath = `execute("upwd")`
ucd $HIP/out
set file = "test.$F.tga"
set test = `execute("uls $file")`
if ($test != "") then
  echo found $file
endif
ucd $currentpath

I think uls and ucd are available through Houdini on windows without cygwin.

This is written from memory so may have syntax errors.

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...