Search - User list
Full Version: $ parameters in file output not working as expected
Root » Houdini Learning Materials » $ parameters in file output not working as expected
omni_tekniq
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!
CYTE
Hey omni_tekniq,

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

Cheers
CYTE
tamte
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}
OliviaParcker
throw it off, please. Once again, your link is not visible to me.
thanks in advance,
Olivia developer WorkTime [www.worktime.com]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.