Attributes not coming through to UE?

   2851   2   1
User Avatar
Member
13 posts
Joined: 4月 2019
Offline
Hi all,

I'm building a tool for stacking tv's on top of one another. On the houdini side its working well, but in UE none of the attributes are coming thru.
https://imgur.com/a/aeFSsjS [imgur.com]

It's detecting the instancers, but without unreal_instance being read, I'm manually having to choose the assets which is a massive pain. And it will get worse if the client wants more variations.


I'm adding the unreal_instance attribute to the tv's and a CD color attribute as well before scattering them, you can see in this image that i have the correct attributes on at the end of my graph.
https://imgur.com/a/qK8GnoN [imgur.com]
In UE I dont get teh asset placed via unreal_instance, and i dont even get color, even they are present on by bottom Null OUT node.

2 things that may be the cause? Copy to points is inside a forloop, and im also using attributeFromPieces/variant to scatter the different tvs.


Here is the HDA cook log inside of UE, there's some errors but I assume they are minor or not relevant.
Cook Results:
Cook succeeded.

Cook State:
Ready


===================================
Node Errors, Warnings, and Messages
===================================

/obj/HF_tv_sandpile_D/HF_tv_sandpile_D1/attribfrompieces1/rename_piece_attrib:
Warning: Invalid attribute specification: "variant not found".

/obj/HF_tv_sandpile_D/HF_tv_sandpile_D1/Quick_groups3/grouppromote1:
Warning: Name conflict while converting 'Box_selection' to 'Box_selection', which already exists.

/obj/HF_tv_sandpile_D/HF_tv_sandpile_D1/attribtransfer1:
Warning: Invalid attribute specification: "Attribute iamaPile either not used or unrecognized".

/obj/HF_tv_sandpile_D/HF_tv_sandpile_D1/attribtransfer2:
Warning: Invalid attribute specification: "Attribute tvDir either not used or unrecognized".


I'm using:
Houdini 18.5.633
HoudiniEngine-v2.0.3-H18.5633-UE4.27
Unreal engine 4.27.1

Here is a download link to a simplified version of the .HIP, The only geometry node in the file can be created into a HDA to test.
https://www.dropbox.com/s/9vj6bvt0my16j4n/MFN_hdas_HELP.hip?dl=0 [www.dropbox.com]

If anyone has any help it would be hugely appreciated!
If im missing anything let me know.

Matt B
Edited by matt_barker - 2021年12月2日 00:16:51
User Avatar
Member
38 posts
Joined: 2月 2018
Offline
The unreal_instance attribute needs to be set on the points you are instancing onto - not on the geometry that is being instanced. You also need to turn on "pack and instance" in your copy to points node - packed primitives is the recommended way to do instancing in Houdini Engine for Unreal:
https://www.sidefx.com/docs/unreal/_instancing.html#InstancingPack [www.sidefx.com]

Setting per instance color in Unreal via Houdini engine is a little more complicated and not as straight forward as it is in Houdini i.e setting @Cd on the points to instance on to does not affect Color in Unreal like it does in Houdini. You can either:

Use the unreal_split_attr to create multiple instances per attribute, and then assign precolored assets to each instancer:
https://www.sidefx.com/docs/unreal/_instancing.html#InstancingSplitting [www.sidefx.com]

Use the unreal_per_instance_custom_dataX attribute to write color data to the points. In Unreal this can be read as vertex color data
https://www.sidefx.com/docs/unreal/_instancing.html#InstancingPerInstanceCustomData [www.sidefx.com]
(As far as I understand Nanite does not support per-instance custom data, if that maters.)

The option I use is to generate a library of meshes with varying @Cd attributes, then use Houdini to select the required mesh from the library at the copy to points stage. The Unreal shader reads @Cd as vertex color to modulate the albedo. This way I don't have to create split instancers or deal with per_instance custom data (I am using Nanite meshes in UE5)

Hope that helps.
Edited by Eche - 2021年12月3日 05:46:32
User Avatar
Member
13 posts
Joined: 4月 2019
Offline
Thanks for that Eche,
I thought I had something the wrong way round in my setup! I'll adjust and try out some of this.

Appreciate it
  • Quick Links