Unreal Engine - How to use PDG?

   9127   11   5
User Avatar
Member
67 posts
Joined: Jan. 2016
Offline
I cannot find any documentation anywhere. I see some videos for how to use with unity. I cannot find anything comparable in Unreal. How do you set it up?
User Avatar
Member
899 posts
Joined: Feb. 2016
Offline
same question here..
User Avatar
Member
9 posts
Joined: July 2013
Offline
I would also love to see a some info on this topic.
User Avatar
Member
899 posts
Joined: Feb. 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]
Edited by Andr - March 20, 2019 11:11:28
User Avatar
Staff
546 posts
Joined: Sept. 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.
User Avatar
Member
3 posts
Joined: Dec. 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.
User Avatar
Member
2 posts
Joined: April 2011
Offline
MarkcusD
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.

How would this work exactly?
I have nested a TOP network inside a Geo node, but it doesn't seem to bake in Unreal.

Attachments:
cdoppioslash_unreal_boxes.hda (33.8 KB)
insidetop.PNG (44.6 KB)

User Avatar
Staff
546 posts
Joined: Sept. 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

Image Not Found

Image Not Found

Attachments:
damienp_color_box.hda (29.9 KB)
damienp_pdg_boxes.hda (35.8 KB)

User Avatar
Member
2 posts
Joined: April 2011
Offline
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.
Edited by doppioslash - Sept. 6, 2019 06:59:31
User Avatar
Staff
546 posts
Joined: Sept. 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.
User Avatar
Member
3 posts
Joined: Sept. 2019
Offline
dpernuit
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.
Hi, 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?
User Avatar
Member
6 posts
Joined: March 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