Can you point instances at already existing Unreal Assets?

   2737   17   2
User Avatar
Member
22 posts
Joined: Nov. 2007
Offline
Hey all,

Sorry if this is a noob question, but I was wondering if there is a point attribute I can put on the points of my instance node that allows me to use Assets (static meshes) that already exist in Unreal, rather than having to hook them up by hand on the Unreal side. I tried setting the instance node's “instancepath” parameter to the Unreal path (ie “/Game/MyObj”). I also tried the same thing with a point attribute of “instance” on the points, but it doesn't seem to affect the instance inputs when its created in Unreal.

I am hoping there is similar functionality to the way you can set prim attrs of “unreal_face_material” to Unreal paths (ie. “/Game/MyMat”) to materials and get the materials to automatically hook up when you create the object.

I know I could embed the model in the hda pre-Unreal, but I am hoping to avoid that.

Any help is appreciated.
User Avatar
Member
402 posts
Joined: March 2013
Offline
This is quite the opposite of a noob question.

Unfortunately, there's no way at the moment to assign instances via attributes. That said, it's a cool feature and you should submit an RFE to support@sidefx.com. Alternatively, you can also add an Github Issue at:
https://github.com/sideeffects/HoudiniEngineForUnreal [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2007
Offline
Thanks for the reply! I will do just that.
User Avatar
Member
173 posts
Joined: April 2014
Offline
Hello! I filed an RFE for this #73617

Also referenced in https://github.com/sideeffects/HoudiniEngineForUnreal/issues/20 [github.com]
User Avatar
Member
22 posts
Joined: Nov. 2007
Offline
Oh. Great Thanks! I will check it out.
User Avatar
Member
332 posts
Joined: Feb. 2013
Offline
As far as I understand from https://github.com/sideeffects/HoudiniEngineForUnreal/issues/20 [github.com]
this feature is now implemented. Is that correct?

The typical way to get the reference path would be to right click the Object in the UE4 editor content browser, and select “Copy Reference”, right?
User Avatar
Member
173 posts
Joined: April 2014
Offline
DASD
As far as I understand from https://github.com/sideeffects/HoudiniEngineForUnreal/issues/20 [github.com]
this feature is now implemented. Is that correct?

The typical way to get the reference path would be to right click the Object in the UE4 editor content browser, and select “Copy Reference”, right?

Hello, this is not in yet; if you require this, I can bump it up. But yes; that's how it would work. Please let me know.

Thanks.
User Avatar
Member
332 posts
Joined: Feb. 2013
Offline
I don't need it right now, but I will probably need it in the future. I was just curious about the status. Thanks!
User Avatar
Member
173 posts
Joined: April 2014
Offline
Hello; this feature has been added and should be available in H15.0/413.

Please use unreal_instance detail or point parameter (or specify your own in preferences). Please report any issues / bugs.

Thanks!
User Avatar
Member
2 posts
Joined: May 2016
Offline
I'm using H15.0 /459 and I can't find this unreal_instance parameter anywhere
User Avatar
Member
332 posts
Joined: Feb. 2013
Offline
You have to create it yourself. For example, with an attribute create node.

It is not a parameter but an attribute. Maybe that distinction is only in my head, but a paramter is rather an input connected to an attribute, rather than the attribute itself. An attribute is essentially a variable.
User Avatar
Member
2 posts
Joined: May 2016
Offline
Aha, thank you for clarifying.
User Avatar
Member
21 posts
Joined: July 2015
Offline
Hi,

Does any one has an example HDA they could share on how to instance object into Unreal from Houdini?

The documentation here : http://www.sidefx.com/docs/unreal/_instancing.html [www.sidefx.com]

It refers to using packed primitives but I still can't figure out how it connects to Unreal.

I have an attribute on my points called unreal_instance but what path should I give it? /Content/… or Content/… ???
Is it case sensitive? Do I need to use the Transfer Attributes parameter on the Pack node at all?

Any info or an actual HDA that works would be useful.

Thx!
Christian
User Avatar
Member
332 posts
Joined: Feb. 2013
Offline
Hi,

In Unreal in your content browser right-click on the asset then “copy reference”. Paste that into the string parameter. That should do, if everything else is set up correctly.


If you can't get it to work, I'll make a file for you.

Enjoy!
User Avatar
Member
21 posts
Joined: July 2015
Offline
Thx DASD,

Turns out I didnt't need the pack node and it was breaking things (most probably I don't know how to use it). The Copy Reference worked perfectly.

Cheers!
C
User Avatar
Member
1 posts
Joined: July 2018
Offline
Hi,

Sorry to dig this thread from the dead but I can't get it to work…

So right now I have to setup all the instances as inputs in Unreal, which is really not optimal.

If someone would be kind enough to show me how to do this with a file or screenshot that would be appreciated.
I managed to get the unreal_material working without any problem but not this one

Thanks a lot
User Avatar
Member
1 posts
Joined: Feb. 2017
Offline
Good day,

I am testing how the instacing works from Houdin to Unreal. Inside Houdini, I am currently scattering some points and using copy to points (with Pack and Instance enable) to copy the input 1 of the HDA. Later, inside Unreal, I am linking the first input with an asset from the project. The problem is: once I bake the HDA, Houdini is generating new geometry (a copy of the asset I linked in the first input) instead of instancing the asset from the project.

Here is a link with my screenshots: https://imgur.com/Acp7stb [imgur.com]

Thanks for your time and help!
User Avatar
Member
332 posts
Joined: Feb. 2013
Offline
Haven't touched this in a while, but I think the solution is the method described above.

You don't need to pack anything, just make use of the unreal_instance attribute.

I attached a file, that works for me (Unreal 4.21.1, Houdini 17.0.416).

- Basically the packing step makes the engine think that you generated the mesh, because it is not aware of the history of how the mesh was a reference to an existing thing in the first place. The unreal_instance attribute method on the other hand exists so you can reference things that already exist in your Unreal project.

- It probably makes sense to expose the string for the reference as a parameter, but I left it out to show that it is not necessary.
Edited by DASD - Dec. 28, 2018 18:21:30

Attachments:
unreal_instance_test_01.hdalc (9.7 KB)

  • Quick Links