Unreal Engine - How to use PDG?
9137 11 5- Aladin Sane
- Member
- 67 posts
- Joined: 1月 2016
- Offline
- Andr
- Member
- 899 posts
- Joined: 2月 2016
- Offline
- kfinlayson
- Member
- 9 posts
- Joined: 7月 2013
- Offline
- Andr
- Member
- 899 posts
- Joined: 2月 2016
- Offline
here you can let SideFX devs know that you'd like to see it implemented sooner than later.
https://www.sidefx.com/forum/topic/61738/?page=1#post-275459 [www.sidefx.com]
https://www.sidefx.com/forum/topic/61738/?page=1#post-275459 [www.sidefx.com]
Edited by Andr - 2019年3月20日 11:11:28
- dpernuit
- スタッフ
- 550 posts
- Joined: 9月 2016
- Offline
Hi,
The PDG Asset link for the Unreal plugin is on our roadmap and will be available in the near future.
You can still use PDG with the Unreal plugin by nesting TOP networks at the SOP level in your HDAs.
The TOP net will cook as would any “regular” subnet in your asset's network.
The downside to this approach is that you wont have the asynchronous loading of outputs/inputs from PDG that the asset link provides.
The PDG Asset link for the Unreal plugin is on our roadmap and will be available in the near future.
You can still use PDG with the Unreal plugin by nesting TOP networks at the SOP level in your HDAs.
The TOP net will cook as would any “regular” subnet in your asset's network.
The downside to this approach is that you wont have the asynchronous loading of outputs/inputs from PDG that the asset link provides.
- MarkcusD
- Member
- 3 posts
- Joined: 12月 2017
- Offline
dpernuit
Hi,
The PDG Asset link for the Unreal plugin is on our roadmap and will be available in the near future.
You can still use PDG with the Unreal plugin by nesting TOP networks at the SOP level in your HDAs.
The TOP net will cook as would any “regular” subnet in your asset's network.
The downside to this approach is that you wont have the asynchronous loading of outputs/inputs from PDG that the asset link provides.
It would be great if someone could put together a tutorial showing how to do this. I tried but couldn't get it to work.
- doppioslash
- Member
- 2 posts
- Joined: 4月 2011
- Offline
MarkcusDdpernuit
Hi,
The PDG Asset link for the Unreal plugin is on our roadmap and will be available in the near future.
You can still use PDG with the Unreal plugin by nesting TOP networks at the SOP level in your HDAs.
The TOP net will cook as would any “regular” subnet in your asset's network.
The downside to this approach is that you wont have the asynchronous loading of outputs/inputs from PDG that the asset link provides.
It would be great if someone could put together a tutorial showing how to do this. I tried but couldn't get it to work.
How would this work exactly?
I have nested a TOP network inside a Geo node, but it doesn't seem to bake in Unreal.
- dpernuit
- スタッフ
- 550 posts
- Joined: 9月 2016
- Offline
Hi,
I did play around with your HDA and got it to work.
Since you didn't upload the box hda, I made mine, which likely does what yours was doing, basically, it just generates a box, with color, uniform scale and center available as parameters.
One issue in your TOPnet, was that the HDA processor cache was set to automatic, which means that if a file named properly existed, the HDA processor wouldn't run again, and just import the existing file.
(this can be beneficial in some case, but in yours, wasn't, as the PDG graph was just reloading old data)
I tried promoting the wedge count on the HDA to dynamically change the number of generated boxes, but that didnt dirty the PDG graph properly. That seem to be a PDG bug, and the team is looking at it.
The rest of it was perfectly fine, when I imported your HDA in UE4, I got 5 boxes (all hidden inside a big purple box since they all have the same position)
Anyway, I made another HDA to show how to use a TOP net inside an actual HDA:
The idea is similar, generate randomly colored/scale boxes, but this time, using the points of a grid, with the number of points of this grid controlled on the HDA.
- The grid is used as an input for the TOPnet, and will dirty/recook it when its geometry is changed.
- On the geometry import node in the topnet, I'm importing the grid's point, to create a single workitem per point.
- I then use a wedge, to generate a random scale and color for each point.
(note that I'm using the @pointoffset attribute on the seed so that each point gets different values)
- a HDA processor then applies the color box HDA using the wedged color/scale attributes for each workitem, and reuses the grid point's position to place the cubes. Cache mode on the HDA processor is set to “Write” so that new files are created everytime the workitem is dirtied (automatic would have reused previous versions of the cube).
- Since HDA processor is the output of the TOPSOP, all of the geometry it has generated is merged together and used as output of the network.
Once imported in Unreal, you can simply change the rows/columns attributes, and the HDA and TOPnet inside will recook.
I'm attaching the HDAs for this, the “HDA File” parameter on the HDA processor in the TOPnet may need to be changed so that the color box HDA can be found correctly.
damienp_color_box is the box generator
damienp_pdg_boxes is the TOP asset
I did play around with your HDA and got it to work.
Since you didn't upload the box hda, I made mine, which likely does what yours was doing, basically, it just generates a box, with color, uniform scale and center available as parameters.
One issue in your TOPnet, was that the HDA processor cache was set to automatic, which means that if a file named properly existed, the HDA processor wouldn't run again, and just import the existing file.
(this can be beneficial in some case, but in yours, wasn't, as the PDG graph was just reloading old data)
I tried promoting the wedge count on the HDA to dynamically change the number of generated boxes, but that didnt dirty the PDG graph properly. That seem to be a PDG bug, and the team is looking at it.
The rest of it was perfectly fine, when I imported your HDA in UE4, I got 5 boxes (all hidden inside a big purple box since they all have the same position)
Anyway, I made another HDA to show how to use a TOP net inside an actual HDA:
The idea is similar, generate randomly colored/scale boxes, but this time, using the points of a grid, with the number of points of this grid controlled on the HDA.
- The grid is used as an input for the TOPnet, and will dirty/recook it when its geometry is changed.
- On the geometry import node in the topnet, I'm importing the grid's point, to create a single workitem per point.
- I then use a wedge, to generate a random scale and color for each point.
(note that I'm using the @pointoffset attribute on the seed so that each point gets different values)
- a HDA processor then applies the color box HDA using the wedged color/scale attributes for each workitem, and reuses the grid point's position to place the cubes. Cache mode on the HDA processor is set to “Write” so that new files are created everytime the workitem is dirtied (automatic would have reused previous versions of the cube).
- Since HDA processor is the output of the TOPSOP, all of the geometry it has generated is merged together and used as output of the network.
Once imported in Unreal, you can simply change the rows/columns attributes, and the HDA and TOPnet inside will recook.
I'm attaching the HDAs for this, the “HDA File” parameter on the HDA processor in the TOPnet may need to be changed so that the color box HDA can be found correctly.
damienp_color_box is the box generator
damienp_pdg_boxes is the TOP asset
Image Not Found
Image Not Found
- doppioslash
- Member
- 2 posts
- Joined: 4月 2011
- Offline
Hi Damien,
thanks Damien, that works great.
Another question, is there a way to avoid merging the geometry?
I'd like every cube to save to a separate static mesh, in Unreal.
dpernuit
- Since HDA processor is the output of the TOPSOP, all of the geometry it has generated is merged together and used as output of the network.
thanks Damien, that works great.
Another question, is there a way to avoid merging the geometry?
I'd like every cube to save to a separate static mesh, in Unreal.
Edited by doppioslash - 2019年9月6日 06:59:31
- dpernuit
- スタッフ
- 550 posts
- Joined: 9月 2016
- Offline
Hi,
The best and easiest way to split those meshes on the unreal side would be to use packed primitives in your HDA, by packing each building, roads…
On the unreal side, you'd get separate instanced static mesh components per packed geometry (which could be beneficial if you're re-using the same building multiple times for example).
If you do not want instanced static meshes, you can simply add the “unreal_split_instances” detail attribute to your HDA, this will tell the plugin to create separate static meshes for each instances instead.
The best and easiest way to split those meshes on the unreal side would be to use packed primitives in your HDA, by packing each building, roads…
On the unreal side, you'd get separate instanced static mesh components per packed geometry (which could be beneficial if you're re-using the same building multiple times for example).
If you do not want instanced static meshes, you can simply add the “unreal_split_instances” detail attribute to your HDA, this will tell the plugin to create separate static meshes for each instances instead.
- allenzhang1123
- Member
- 3 posts
- Joined: 9月 2019
- Offline
dpernuitHi, I've tried use your files, and relink them. In Houdini it has 25 boxes. but in UE4 there is nothing show up, both in 4.22 and 4.24 what should i do?
Hi,
The best and easiest way to split those meshes on the unreal side would be to use packed primitives in your HDA, by packing each building, roads…
On the unreal side, you'd get separate instanced static mesh components per packed geometry (which could be beneficial if you're re-using the same building multiple times for example).
If you do not want instanced static meshes, you can simply add the “unreal_split_instances” detail attribute to your HDA, this will tell the plugin to create separate static meshes for each instances instead.
- TomekPawlowicz
- Member
- 6 posts
- Joined: 3月 2014
- Offline
doppioslash
Hi Damien,dpernuit
- Since HDA processor is the output of the TOPSOP, all of the geometry it has generated is merged together and used as output of the network.
thanks Damien, that works great.
Another question, is there a way to avoid merging the geometry?
I'd like every cube to save to a separate static mesh, in Unreal.
Hi doppioslash,
Did you manage to put the cubes from the PDG setup into separate meshes?
Thanks,
Tom
-
- Quick Links