$ parameters in file output not working as expected

   2242   3   0
User Avatar
Member
1 posts
Joined: March 2021
Offline
Hello Houdinos,

I am following along with this tutorial (sidefx.com/tutorials/tree-generator, Bake Branches) and at ~10 minutes in we bake our branches onto a 2d grid as a color texture.

In the video, Simon uses the naming convention: $HIP/render/Leaves_$(CHANNEL)_$F.png
which results in the filename "Leaves_color_1" for frame 1, etc.

I thought to myself "If I *were* going to be rendering multiple outputs like AO in addition to color, I would want the frame number to be *before* the channel name, not after." So I tried the convention: $HIP/render/Leaves_$F_$(CHANNEL).png

but the output I got was "Leaves_color". No frame present at all! I thought maybe the parenthesis was necessary so I tried $HIP/render/Leaves_$(F)_$(CHANNEL).png but here, $(F) was interpreted literally and I ended up with "Leaves_$(F)_color".

How should I format my arguments to end up with "Leaves_1_color", etc?

Thanks!
User Avatar
Member
678 posts
Joined: Feb. 2017
Offline
Hey omni_tekniq,

try separating your $ variables with a . and not a _
Or set the _ in backticks like that: `_`

Cheers
CYTE
Edited by CYTE - April 9, 2021 11:36:34
User Avatar
Member
8525 posts
Joined: July 2007
Offline
or use curly brackets for frame, also not sure where you got $(CHANNEL) from, it should be %(CHANNEL)s
$HIP/render/Leaves_${F}_%(CHANNEL)s.png

EDIT: oh, $(CHANNEL) is in the video, so maybe that works too, but it surely makes it look confusing if string formatting tokens syntax is mixed with global variables syntax for the same token

EDIT2: also on the second look the node in the video is Labs Maps Baker, not Bake Texture, so I guess the string tokens expected there are different
so maybe keep what you have just replace $F with ${F}
Edited by tamte - April 9, 2021 20:13:47
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
3 posts
Joined: April 2021
Offline
throw it off, please. Once again, your link is not visible to me.
thanks in advance,
Olivia developer WorkTime [www.worktime.com]
Edited by OliviaParcker - April 30, 2021 05:24:55
  • Quick Links