Hi.
For those having a hard time, I followed dpernuit suggestions and it worked for me, but what he wrote might not be as clear so Im gonna detail it here.
- You have to create and set a new project, it is easier for testing purposes. Create said project with an hda and geo folder as the default has.
- Make all your HDA processors point to $PDG_DIR. That is, select both the 'HDA File' and if you have Asset Output then select 'Output File Name' and then change the prefix to $PDG_DIR (Just overwrite it by hand). I'm kind of new to PDG so I don't know if any other nodes have to be set this way but I'm imagining they have to.
- You have to make (of course) your TOP network an HDA. Go to the scheduler and make 'Working Director' a parameter of said HDA. You can do this by opening your Type Properties of your TOP HDA, then going to the Scheduler and Alt + MMB over the name Working Directory. It will add it directly to your parameters (or add a File Directory parameter and link them, whatever you want). Make sure the default value is empty.
- Make sure your output HDA processor is prefixed as HE_OUT_ as that is what HE needs to know what is the output HDA.
- Save all your needed HDA in your project hda folder. Get them to Unreal.
- Drop you TOP and the details should contain the Working Directory parameter. Link this directly to your project file folder. In my case as you can see in the image is 'D:/Houdini/HoudiniProjects/PDG_intro', that is my project with all my folders like the hda and geo folders. This needs to be an absolute path as you can see there, the HE convention of relative paths wont work. This is what HE tries to resort to when the token $PDG_DIR is used (and what dpernuit tried to convey by using that phrasing). Inside your HIP file Houdini understands, but that's not necessarily the case for HE as this needs a ENV VAR to be set.
- This should make everything work.
- Inside your HIP you can either use $HIP, $JOB or $PDG_DIR as Working Directory parameter in your HDA and it should work as well. In this Houdini will (or should) understand any of the tokens.
I agree with dpernuit, this is probably the best way to work for PDG in your personal or small projects. Read again his suggestions to follow the rest I'm not covering here.
For bigger projects this probably won't do tho, a more robust setup of ENV VAR should be in place, you can see something like that in the Indie Pixel PDG terrain intro
https://www.youtube.com/playlist?list=PLXNFA1EysfYnCqXOWZIiPNeukPT-thmGd [
www.youtube.com] (although this is for Unity).
Hope this helps.