PDG cooking is expecting files to be under UE install?

   9423   13   4
User Avatar
Member
27 posts
Joined: March 2020
Offline
Trying to follow along the Procedural Desert tutorial (https://www.sidefx.com/tutorials/procedural-desert/). I have:
1. Dragged an instance of the PDG HDA onto the Unreal scene.
2. Clicked on Houdini Engine -> Rebuild, then Houdini - PDG Asset Link -> Cook Output under TOP Networks.
It starts but then fails. Error messages look like the Houdini Engine is expecting the output files to be under the UE installation folder. The output log has a bunch of messages like:

LogHoudiniEngine: Warning: Work item 'Desert_Terrain_100' lists file 'C:/Program Files/Epic Games/UE_4.25/Engine/Binaries/Win64/geo/Desert_Terrain.Desert_Terrain_100.0.bgeo.sc' as an expected output file, but it wasn't found when the item cooked

In the TOP network, the HDA Processor has the output file name as $JOB/geo/$OS.`@pdg_name`.0.bgeo.sc. The local scheduler's Working Directory is $HIP. I've tried changing the path to use $PDG_DIR instead of $JOB, but still get same errors in Unreal AND it won't cook in Houdini anymore (get similar error about file not found).

I don't know what else to check or try.
User Avatar
Member
40 posts
Joined: Nov. 2019
Offline
I had similar issues, for some reason if I save a HDA in documents/Houdini.X/otls and then source it from there in the HDA processor it worked, in the HDA processor it would be using the $HOME variable, in the scheduler it would $HIP (my project dir) and in the output value I would change PDG_DIR to the $JOB.

I would really like to see a step by step document/video of the setup options using these variables in the PDG for Houdini Engine, explained for the likes of me, ignorant artist. Pretty frustrating when you are inspired by the power of PDG but cant get your head around what is probably basic for those in the know.
User Avatar
Member
27 posts
Joined: March 2020
Offline
I ended up working around the issue by using hard-coded full paths.
- In the localscheduler, I set the Working Directory using a full path. $HIP or $JOB didn't work out.
- For the HDA Processors, path to the HDA file can use $PDG_DIR (but not $HIP or $JOB).
- However, I couldn't use $PDG_DIR in the Output File Name for reasons I don't know. I had two HDA Processors. the second depending on the first. The first HDA Processor generated the output .bgeo.sc properly. But then the subsequent HDA Processor couldn't find it or couldn't work with it? The log said there was an invalid input error to _hou.Node_setInput(). The second HDA Processor is set to use the Upstream Output File as input. So I had to use full paths for the Output File Names.

In UE, $HIP and $JOB were resolving to C:\Program Files\Epic Games\UE_4.25\Engine\Binaries\Win64\ which I don't want but I can understand it happening because you're no longer in a Houdini project/environment. $PDG_DIR only worked when specifying the HDA file path but not the output file name, which doesn't make sense.

User Avatar
Staff
546 posts
Joined: Sept. 2016
Offline
Hi,

So, my recommended workflow for PDG would be:

- Use $PDG_DIR for all paths, don't use $JOB and $HIP.
$JOB could be used if set in an env file, but setting it up properly is not as easy as PDG_DIR.
Using $HIP doesn't make sense when using Houdini Engine, since there is no HIP file.


- Expose the Working Directory parameter on the TOP Scheduler on your HDA, and set that working directory via the HDA parameters in Unreal. This ensures that both Unreal and Houdini understand that directory properly ($PDG_DIR).


- I then use that directory a my main PDG folder for the PDG Asset Link:
I place all the HDAs needed by PDG in a hda subfolder, and use "$PDG_DIR/hda/XXX" for my HDA processors.
Same thing for any input/output files, just use subfolders for them and reference them in the HDA with $PDG_DIR.

By doing that, you basically only need to worry about setting that Working Directory parameter, and having everything needed under that folder tends to make things a lot more portable.
User Avatar
Member
5 posts
Joined: Nov. 2018
Offline
need the more detail or a example for use the top include HDA in UE4.thx
User Avatar
Member
13 posts
Joined: Jan. 2017
Offline
Getting this " as an expected output file, but it wasn't found when the item cooked"-error with some HDA processors used in PDG HDA when used in UE4.26.1 (v2 Houdini engine). Same PDG working normally in Houdini Editor. Having all paths set as full paths. Can Python node's in HDAs behave differently in UE4? Do the HDA need to be in 18.5 otl-folder. Using some older HDA from 17.5 (still updated). Generating point-cloud with unreal_instances for whole building, much foreach feedback loops. Probably will divide the HDA to smaller pieces if nothing else helps, wrote it too messy. Or will just generate the results this time in UE4 side and randomly bringing premade point clouds into UE4.

But any tips are welcome.
User Avatar
Member
10 posts
Joined: April 2020
Offline
dpernuit
Hi,

So, my recommended workflow for PDG would be:

- Use $PDG_DIR for all paths, don't use $JOB and $HIP.
$JOB could be used if set in an env file, but setting it up properly is not as easy as PDG_DIR.
Using $HIP doesn't make sense when using Houdini Engine, since there is no HIP file.


- Expose the Working Directory parameter on the TOP Scheduler on your HDA, and set that working directory via the HDA parameters in Unreal. This ensures that both Unreal and Houdini understand that directory properly ($PDG_DIR).


- I then use that directory a my main PDG folder for the PDG Asset Link:
I place all the HDAs needed by PDG in a hda subfolder, and use "$PDG_DIR/hda/XXX" for my HDA processors.
Same thing for any input/output files, just use subfolders for them and reference them in the HDA with $PDG_DIR.

By doing that, you basically only need to worry about setting that Working Directory parameter, and having everything needed under that folder tends to make things a lot more portable.

https://www.sidefx.com/docs/unreal/_parameters.html#ParametersFile [www.sidefx.com]

The documents of houdini engine for unreal says "paths relative to the unreal project are converted to absolute paths in Houdini". I tried by setting my file parameter as things like 'Content/geo/test.bgeo', '/Content/geo/test.bgeo', 'Game/geo/test.bgeo' and so on. None of them works.

Has this feature finished? Or my relative path is not correct? Setting a directory for each hda costs time.
User Avatar
Member
5 posts
Joined: July 2020
Offline
guys at sidefx, do you at least read what people ask? why so basic thing is done so messy? heck, I spend so much struggling houdini and houdini engine I almost sure I'd finish my work if worked in blender/zbrush!
User Avatar
Member
49 posts
Joined: April 2020
Offline
i can't get this to work with $PDG or hardcoded paths.

any of you folks have a working hardcoded path that works that you can share? i've tried countless variations like these and all fail :

FAIL : /Game/PooGame/EnvArt/Meshes/Test/poo_`@pdg_index`.bgeo.sc
FAIL : Z:/PooGame/EnvArt/Meshes/Test/poo_`@pdg_index`.bgeo.sc

the error it prints:

Work item 'terrainTiles_20' lists file '/Game/PooGame/EnvArt/Meshes/Test/poo_3.bgeo.sc' as an expected output file, but it wasn't found when the item cooked
User Avatar
Member
2 posts
Joined: July 2020
Offline
dpernuit
Hi,

So, my recommended workflow for PDG would be:

- Use $PDG_DIR for all paths, don't use $JOB and $HIP.
$JOB could be used if set in an env file, but setting it up properly is not as easy as PDG_DIR.
Using $HIP doesn't make sense when using Houdini Engine, since there is no HIP file.


- Expose the Working Directory parameter on the TOP Scheduler on your HDA, and set that working directory via the HDA parameters in Unreal. This ensures that both Unreal and Houdini understand that directory properly ($PDG_DIR).


- I then use that directory a my main PDG folder for the PDG Asset Link:
I place all the HDAs needed by PDG in a hda subfolder, and use "$PDG_DIR/hda/XXX" for my HDA processors.
Same thing for any input/output files, just use subfolders for them and reference them in the HDA with $PDG_DIR.

By doing that, you basically only need to worry about setting that Working Directory parameter, and having everything needed under that folder tends to make things a lot more portable.

Can you post some screenshots of the relevant settings? Clearly a number of people are having issues here still.
User Avatar
Member
10 posts
Joined: Oct. 2014
Offline
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.
Edited by lobachevscki - Nov. 22, 2021 11:23:08

Attachments:
pdg_001.jpg (167.7 KB)
pdg_002.jpg (100.0 KB)
pdg_003.jpg (170.7 KB)
pdg_004.jpg (179.1 KB)
pdg_005.jpg (96.0 KB)

User Avatar
Member
49 posts
Joined: April 2020
Offline
so in ue5 with the ue5 houdini plugin i was able to get the PDGs to work, so that's great. the tutorial's only remaining issue that i know of is that it tells you to write your geo to the $JOB dir which is thus throwing geo into the unreal engine folder which isn't correct, of course.
User Avatar
Member
6 posts
Joined: March 2023
Offline
For anyone having this issue still, here is a direct link to Inde Pixels video on ENV VAR:


Very easy to set up!

Also refer to PDG for Indie Gamedev | Section 2 | Video 8+9
Edited by CoulterH - July 16, 2023 19:20:07
User Avatar
Member
5 posts
Joined: Oct. 2018
Online
Thank you dpernuit and especially lobachevscki for the thorough explanation!
  • Quick Links