Jump to content

Render Path + AOV Path Expression


cybor09

Recommended Posts

Hello!

I need some help to understand how to use some string expressions, I'm using Redshift ROP and I want to change the render paths on some AOVs using the Custom File Prefix from each AOV. I want they will be saved on the same folder like the main output path but with other names. So, I'm using this string for the main render path:

RS ROP output file name prefix: $HIP/render/$HIPNAME/$HIPNAME.$AOV.$F3.exr

And I was trying to use this expression for AOV custom path:

`${chs("RS_outputFileNamePrefix"):h}`/BumpNormal.exr

Because I saw in this link that this expression should return the directory from the entire string without the file name and extension but I'm not getting the file directory using this expression like this. In conclusion, I'm looking to set the render path only one time and the AOVs with custom path can load it and use other names or formats.

Thanks a lot!




 

 

 

Link to comment
Share on other sites

Hello, first of all, I don't understand why you don't use directly $HIP/render/$HIPNAME/$HIPNAME/BumpNormal.$F3.exr ?

Then, if you want to use the same name without the extension, like /mypathrender/myrendername_BumpNormal.$F3.exr

you can remove a number of chars with this :

`substr(chs("RS_outputFileNamePrefix"), 0, strlen(chs("RS_outputFileNamePrefix"))-4)`

Here the -4 remove the extension and the dot, if you want remove also the $F3 and the dot, then -8 must be used.

 

substr() > https://www.sidefx.com/docs/houdini/expressions/substr.html

Edited by fsimerey
Link to comment
Share on other sites

Hi fsimerey,
 

Quote

Hello, first of all, I don't understand why you don't use directly $HIP/render/$HIPNAME/$HIPNAME/BumpNormal.$F3.exr ?


Because I'm too lazy to change the name from each AOV multiple times :D, because of that I look for a more quicker solution defining the path only one time.

Thanks a lot for the substr() example, I'll try with that.

Cheers,

 

Link to comment
Share on other sites

  • 10 months later...

Hey guys, maybe this will help?

I make use of the context editor and create variables for the main paths, then I can use that variable to define the filename in the ROP:
1) Open the context options
2) Create a new 'text' option
3) Give it a name and set the path
4) Use the variable in your path : NOTE this is the syntax backtick|@|variable name|backtick - `@variable`
5) Middle click on the field label to see the expanded path

Hope that makes sense!

Screenshot_1.jpg

Screenshot_2.jpg

Screenshot_3.jpg

Screenshot_4.jpg

Screenshot_5.jpg

Edited by Matt_K
Updated text to be clearer
  • Like 1
Link to comment
Share on other sites

Hello guys!

@fxartist420 I'm using a "temporary" solution since some months. I have a template scene with some objects, materials and RS Rops + AOVs. And on the Out context have one null that defines the render paths for different things:

SKaE0FS.png

And copy the paths as relative reference on the RS Rop and AOVs:

dmN2LQP.png

j2bkUVA.png

 

On that moment still had problems manipulating the string, this method have only one bad thing in case you use Deadline as render manager. You can't send to render directly with the .hip file because deadline got some errors with the variables:

https://forums.thinkboxsoftware.com/t/houdini-redshift-extra-tokens-detected-in-expression/26761

The solution to use it with Deadline is export the RS Proxy scene files to send it to render. You can do that automatically and create presets with the Deadline node in the Out context. I attached one reduced file with this example.

I like also the feature that @Matt_K shared, maybe in some point will take a look in to this again to create a better optimized way.

 

 

RS ROP Preset example.hiplc

Link to comment
Share on other sites

  • 1 month later...

Hi there,

Just in case this old topic could still help someone:

The Redshift documentation states: "The Redshift ROP has an additional variable “$AOV” that can be used to set the AOV suffix name in the output image file name. If this variable is not found, the plugin appends the AOV suffix to the end of the file name, just before the file type extension."

So to get your AOVs sequences with numbers after their name, you have to set the AOV formatting in the Common file prefix field (ie main render output) instead of the AOV custom file prefix field. The default behavior was intended for multilayer files.

So using $JOB/renders/filename.$AOV.$F4.png would save both filename.1000.png as the main render and filename.puzzleMatte.1000.png for a puzzleMatte for example.

-

Olivier

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