This is kind of a broad question that's not just about Houdini Engine for UE4, but I'm concerned also about my end use-case, which is bringing HDAs into UE4, so I thought this is maybe the more appropriate place to post this.
Effectively, I'm looking for a good break-down of how digital assets get found and loaded, in various circumstances.
What I would like to have is a set-up where HDA-1 references HDA-2, I can create HDA-1 in a .hip workfile and I can import HDA-1 into UE4 and I can then update HDA-2, which would cause HDA-1's behaviour to change both in the .hip workfile and inside my UE4 scene. In fact, this works great! I was surprised that I can change HDA-2 and that I would see the change in UE4 when I recook HDA-1 without even needing to recook it. That's awesome.
However, the problem that I have is that I want this to work over relative paths when these assets are distributed across the wider team, since on different artists' machines the project root can be different. The way that HDAs handle paths seems inconsistent, at least from what I've been able to tell.
Example 1.
I have three files:
projectRoot/Houdini/hda/hda-1.hda
projectRoot/Houdini/hda/hda-2.hda
projectRoot/Houdini/workfile.hip
Workfile references hda-1, hda-1 references hda-2.
In this case I can move projectRoot to wherever, open the workfile and it actually seems to automatically work out what the path for hda-1 needs to be, finds and loads it correctly, finds and loads hda-2 correctly. That's cool.
However, if I move the projectRoot and then import hda-1 into UE4, it will not be able to find hda-2.
Example 2.
I have three files:
projectRoot/Houdini/hda/hda-1.hda
projectRoot/Houdini/hda/hda-2.hda
projectRoot/Houdini/workfiles/workfile.hip
In this case, moving projectRoot breaks hda references. The workfile can no longer find hda-1, even though their relative path is still the same.
Is there some obvious means of doing relative referencing through the asset manager that I'm missing? I can add $HIP-relative paths when installing an asset library, but they get converted to absolute paths. Or is this something that is inherently unsupported and will require craft workarounds?
Obviously, embedding is an option, however that loses all of the links between nested digital assets, meaning that small changes to sub-HDAs end up with everything getting recompiled and reimported, which means we lose a lot of the advantages to setting our assets up in this way.
Sample files attached!
Using and Updating Nested HDAs Over Relative Paths
4764 3 1- 9of9
- Member
- 39 posts
- Joined: 10月 2017
- Offline
- 9of9
- Member
- 39 posts
- Joined: 10月 2017
- Offline
To follow up, in case anyone comes across this and is struggling with the same issues:
I feel like there's a conflict between the expectation of treating OTLs as resource libraries, and treating HDAs as assets. Houdini expects to be given all the paths in which HDAs are located ahead of time, and therefore doesn't cope well with tracking paths of dependencies when it comes to HDAs.
For UE4, the way I have solved this going forward is to create a project-specific houdini.env file (the path for which can be specified in the Houdini Engine Plugin settings as part of the Project Settings) which enhances the HOUDINI_OTLSCAN_PATH variable with all of the folders in the project that contain HDAs. The paths in houdini.env are written relative to an environment variable in Windows that points to the project root, which is defined when the project is set up on the user's machine.
This means that if we add new folders containing HDAs to the project, we do need to manually update houdini.env to scan that folder as well - adding it to HOUDINI_OTLSCAN_PATH. It also means that for Houdini users wanting to edit those HDAs, we need to manually also update our own local houdini.env files. In the future we may look to write Python scripts to automate some of this.
I feel like there's a conflict between the expectation of treating OTLs as resource libraries, and treating HDAs as assets. Houdini expects to be given all the paths in which HDAs are located ahead of time, and therefore doesn't cope well with tracking paths of dependencies when it comes to HDAs.
For UE4, the way I have solved this going forward is to create a project-specific houdini.env file (the path for which can be specified in the Houdini Engine Plugin settings as part of the Project Settings) which enhances the HOUDINI_OTLSCAN_PATH variable with all of the folders in the project that contain HDAs. The paths in houdini.env are written relative to an environment variable in Windows that points to the project root, which is defined when the project is set up on the user's machine.
This means that if we add new folders containing HDAs to the project, we do need to manually update houdini.env to scan that folder as well - adding it to HOUDINI_OTLSCAN_PATH. It also means that for Houdini users wanting to edit those HDAs, we need to manually also update our own local houdini.env files. In the future we may look to write Python scripts to automate some of this.
- aboutvrp
- Member
- 7 posts
- Joined: 4月 2019
- Offline
- dpernuit
- スタッフ
- 546 posts
- Joined: 9月 2016
- Offline
Hi,
Apologies for the late reply, but that is exactly what the otlscan path is used for, you can either set it on the .env file, or set it in the plugin settings.
If you don't specify custom otlscanpaths, then Houdini / the plugin will look for HDAs in the default otl folder, in “Documents\houdini18.0\otls”.
For unreal, I'd actually recommend having a folder to centralize all HDAs in the project and under source control.
That folder will contain all the HDAs used and you can point your .env file to it.
Apologies for the late reply, but that is exactly what the otlscan path is used for, you can either set it on the .env file, or set it in the plugin settings.
If you don't specify custom otlscanpaths, then Houdini / the plugin will look for HDAs in the default otl folder, in “Documents\houdini18.0\otls”.
For unreal, I'd actually recommend having a folder to centralize all HDAs in the project and under source control.
That folder will contain all the HDAs used and you can point your .env file to it.
Edited by dpernuit - 2020年4月29日 17:21:34
-
- Quick Links