Define $HIP for hbatch.exe rendering

   9654   15   3
User Avatar
Member
72 posts
Joined: March 2014
Offline
Hi
I wanna render my files out of the Houdini with cmd, Of course I can render it with hbatch.exe correctly.
But my problem is relative paths for File SOP , or others.
I take error for each File SOP that using $HIP for it's path .

for example I used this path in the file1 :
$HIPtest.bgeo

But I take this error :

Error saving geometry for: /obj/sphere_object1/file1
Command Exit Code: 1



How can I define $HIP (global variable) in the hbatch command ?
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
hbatch automatically understand $HIP. No need to do any thing.

for example I used this path in the file1 :
$HIPtest.bgeo

It should be:
$HIP/test.bgeo
User Avatar
Member
72 posts
Joined: March 2014
Offline
Sorry , but it doesn't work for me.
In the attached project I take two error when using hbatch.exe.

one error for geometry file , because I used $HIP/Geo/TestGeo.bgeo.
another error for Mantra node , because I used $HIP/Render/Test.$F.jpg for output.

Maybe that's because I didn't use hbatch.exe directly , I put these codes in the batch file , then I execute it :? If yes , so how can I solve it ?

echo render -V -I -C -f 1 100 mantra1 | “C:\Program Files\Side Effects Software\Houdini 13.0.401\bin\hbatch.exe” “C:\Users\Jack\Desktop\testHbatch\testHBatch.hip”

But this project rendered correctly if I use full path for File SOP and Mantra !!!

Attachments:
testHbatch.zip (22.4 KB)

User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
I do not use Houdini on windows.
but you can do:
open Command Line Tool
then
hscript “C:\Users\Jack\Desktop\testHbatch\testHBatch.hip”
then
render -V \path\to\your\rop
User Avatar
Member
72 posts
Joined: March 2014
Offline
Really Thanks my friend , I did that , But I take same error !
Can you render my project perfectly on your system ?
what's your OS ?
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
what's your OS ?
Linux:
CentOS (at work)
Mint (at home)
User Avatar
Member
72 posts
Joined: March 2014
Offline
So I should test it on Linux :cry:

nobody Really don't know how can I do that in Windows ???

I have to change all $HIP variables to full path on my projects manually and it's a little annoying , specially if I wanna use my projects on another PC with different path
User Avatar
Member
303 posts
Joined: May 2007
Offline
Hi
I always do that on windows, no problems if it can be rendered in houdini.
Maybe you load your hip while you open hcommand,then the $hip path is the hcmd.exe path.
I use mread command

Open your command line tool

hscript
mread //path/to/file.hip
render -V /out/mantra



Or cd to your hip path first.or put your batch file in your hip path.
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
72 posts
Joined: March 2014
Offline
luoqiulin
Hi
I always do that on windows, no problems if it can be rendered in houdini.
Maybe you load your hip while you open hcommand,then the $hip path is the hcmd.exe path.
I use mread command

Open your command line tool

hscript
mread //path/to/file.hip
render -V /out/mantra



Or cd to your hip path first.or put your batch file in your hip path.

I should test it , I think this is my answer , really thanks :wink:
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
You should just write an expression in your project for set $HIP to your specify address , So when your file open in HBatch.exe then this variable will set currectly :wink:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
258 posts
Joined:
Offline
In my experience $HIP fails in hbatch when:

1. $HIP refers to a mapped network drive, I usually substitute the full path. (See next suggestion).

2. $HIP is defined incorrectly - Open up the Alias and Variables check and see how $HIP is defined. I usually replace a mapped drive path with

//myserver/my_houdini_project

Also the use of $JOB is very helpfull.
User Avatar
Member
72 posts
Joined: March 2014
Offline
sl0throp
In my experience $HIP fails in hbatch when:

1. $HIP refers to a mapped network drive, I usually substitute the full path. (See next suggestion).

2. $HIP is defined incorrectly - Open up the Alias and Variables check and see how $HIP is defined. I usually replace a mapped drive path with

//myserver/my_houdini_project

Also the use of $JOB is very helpfull.

Thanks for your reply , But unfortunately I didn't use mapped network , all of the files are local , Also $HIP defined correctly in the Alias and Global variables window !
User Avatar
Member
72 posts
Joined: March 2014
Offline
Joker386
You should just write an expression in your project for set $HIP to your specify address , So when your file open in HBatch.exe then this variable will set currectly :wink:

Wooow , Specially thanks Sadjad , your suggestion working perfectly :shock:
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
I had same problem before , usually $HIP in external batch file refer to C: !
After too many trying, I found this solution finally :wink:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
5 posts
Joined: Nov. 2007
Offline
It's an old thread but I had the same problem on windows, $HIP refers to my drive letter in hscript. I just fix it in in changing my path with “/” instead of “\”.
For example :
c:\PROJECT\A\A.hip in cPROJECT/A/A.hip
User Avatar
Member
1 posts
Joined: Dec. 2011
Offline
teresuac
$HIP refers to my drive letter in hscript. I just fix it in in changing my path with “/” instead of “\”.
For example :
c:\PROJECT\A\A.hip in cPROJECT/A/A.hip

Oh my gosh, thank you so much! After hours of confusion and trying, this fixed my batch render problem. All I needed to do was call my file path with forward slashes, and all my file textures loaded! To be clear for others in the future, all I had to do was change my python command from:

hou.hipFile.load(“C:\path\to\file\file.hip”)

to

hou.hipFile.load(“Cpath/to/file/file.hip”)
  • Quick Links