Understanding of environment variable in Houdini.

   2215   2   2
User Avatar
Member
20 posts
Joined: June 2019
Offline
Sorry to bother everyone, I know this is a very basic question, but it stuck me for a long time, so that every time it would give me trouble in mine mind. That is a clear explanation of the two environment variables of $HIP and $JOB.
I've read a lot of tutorials and explanations. I basically know that $HIP represents the parent path of my current scene file, and $JOB represents the parent path of my current project folder. Is that right?
But in my Houdini practice, this is confusing. When I create a new project, I can clearly see what my $JOB means. But that doesn't explain where the $HIP points to. When I create a 'file cache' node, it is obvious that $HIP, which is my project folder, is displayed on the upper level of the geo folder. Isn't that a same path with my $job?
I have attached my screenshot below, which shows my directory structure. I use the default folder structure generated when Houdini creates a new project. I made a little change, but it should be the same basically.

I hope someone could give me some advice.

Thanks

Attachments:
pipeline_question.jpg (672.3 KB)

User Avatar
Member
466 posts
Joined: Aug. 2014
Offline
$HIP is the path where your currently opened .hip file resides in, $JOB is whatever you set it to in your .hip file.

When I create a 'file cache' node, it is obvious that $HIP, which is my project folder, is displayed on the upper level of the geo folder. Isn't that a same path with my $job?
No, $HIP is not your project folder. It is merely a parent directory of your .hip file.

When you launch "File->Set Project" or "File->New Project" you're basically telling Houdini to set $JOB variable to whatever path you point it to. However, it is possible to have a .hip file residing in $JOB path, which has $JOB variable set to a completely different path by just altering $JOB var in "Edit->Aliases and Variables" of that file. $HIP on the other hand is automatically set and will always point to a path where the .hip file is located in, while $JOB is a manually set variable which can point to literally anything (or $HOME, if the variable is not set).
Edited by ajz3d - June 1, 2021 17:47:34
User Avatar
Member
20 posts
Joined: June 2019
Offline
Oh, thank you so much for your explanation. After some twists and turns, I finally got it.
I was misled to a large extent by the default path '$HIP/geo...' provided by 'file cache'node.
Because it makes me think that under $HIP are "geo", "flip", "cache"... these folders, so $HIP somehow becomes the location of project folder.


Thanks,
Ilya
  • Quick Links