Problems with unreal_instance attribute

   2934   2   0
User Avatar
Member
30 posts
Joined: Feb. 2020
Offline
Hi,

I have created a scatter HDA with Trees, Rocks, Bushes, Boulders, etc. It worked great so far with the basic geometry from Houdini until I tried to automate the linking to existing unreal instances with the unreal_instance attribute.

I watched several videos but it looks like I have a problem linking more than one unreal_instance at a time. I tried to add them all at the end of the scatter nodes before the null. I used the Attribute Randomize Node and it works great for e.g. with the trees but the rocks and the other foliage are always missing.

Where do I need to put the attribute randomize nodes that it works for all different unreal instances? In the Video I have watched he was putting them all in the end … but that doesn't work for me.

Thanks for help.

Image Not Found


Image Not Found

Image Not Found

Attachments:
2020-05-29_17-03-30.jpg (138.7 KB)

User Avatar
Staff
534 posts
Joined: Sept. 2016
Offline
Hi

It looks like some of your images were lost in translation
Would you be able to post your HDA, or the video you're referring to so I can find the issue more easily?

Since your using multiple classes, I suspect that you're using multiple scatter nodes, one for each type of assets.
In that case, it's probably easier if you use the attribute randomize node after each scatter.
You basically want to apply the randomizer only to the points of a given class, then merge the scatter points for all the classes.

For the attribute randomizer, you want it to generate the unreal_instance attribute, then set it's distribution to custom discrete, type string. You can then fill the values with the references to all your rock assets for example.
Repeat the process for each class, then merge all the scatter points together.

You can also directly expose the multiparm from the attribute randomize nodes directly on your hda (“number of values”, (values)), which should allow you to set the number, paths, and weights directly in UE4.
User Avatar
Member
30 posts
Joined: Feb. 2020
Offline
Thanks for the reply.

I made it work after keeping the original string from Unreal. There are some old tutorials floating around that suggest deleting the bold part before because it's already a string StaticMesh'/Game/CGGMeshes/Foliage/S_QueenPalm_2.S_QueenPalm_2'

After just keeping the original string it perfectly works fine!
  • Quick Links