[Engine V2] Instantiating existing Foliage Actor

   5981   11   2
User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
I'm trying to instantiate foliage on a bunch of scattered points. I can point to a static mesh and set “unreal_foliage” to True, ending up with a new foliage actor, but I want to reference an already existing foliage actor so that I can change the setup in Unreal after the fact.

Edit: There was feedback and bug reporting done on the subject here https://github.com/sideeffects/HoudiniEngineForUnreal-v2/issues/21 [github.com]
Edited by valdomat - Oct. 7, 2020 07:24:11
Houdini Technical Artist @ Sharkmob
User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
As a last resort I'm looking to change settings trough unreal_uproperty_*. But I have issues with setting Min Max values for something like CullDistance. Unreal calls the value “FInt32Interval”, it essentially looks like an int array, but engine only uses int, floats and strings. So I wonder how I would define such a value?
Houdini Technical Artist @ Sharkmob
User Avatar
Member
7 posts
Joined: May 2018
Offline
You have achieved pointing to an existing foliage from Unreal? After cooking and HDA with unreal_foliage with a static mesh reference it creates a new foliage type. If I save this type with a new name it won't update when recooking, but instead and it will create a new foliage type.
Setting the unreal_instance to reference a foliage type didn't work.
User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
Sdruvie
You have achieved pointing to an existing foliage from Unreal? After cooking and HDA with unreal_foliage with a static mesh reference it creates a new foliage type. If I save this type with a new name it won't update when recooking, but instead and it will create a new foliage type.
Setting the unreal_instance to reference a foliage type didn't work.

No luck yet. It looks like there's no support for foliage actors yet. But if you reference a static mesh, you get your foliage. If you keep that foliage name created by the HDA, it will continue to update that foliage type.
Houdini Technical Artist @ Sharkmob
User Avatar
Member
7 posts
Joined: May 2018
Offline
Yes, that's what I came up with. The problem is that I want two type of foliage that goes with the same mesh, but with different materials. The only “solution” I have right now is to have a duplicate mesh, and change the materials there.


The perfect solution would be to use a foliage reference the content browser directly. That way I can create two foliage types in unreal, both with same mesh, but one with override materials.
User Avatar
Member
30 posts
Joined: Feb. 2020
Offline
I tried doing this but compared to Simon Houdinis presentation the little checkbox is missing in my HDA.

My Setup is …
1. Attribute Create with the static mesh string from Unreal (works)
2. Another Attribute Create node below with “unreal_foliage” as an Integer.

Do I need to add a special tag to the HDA? What am I doing wrong ?

Attachments:
2020-11-03_15-47-39.png (1.1 MB)

User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
Sdruvie
Yes, that's what I came up with. The problem is that I want two type of foliage that goes with the same mesh, but with different materials. The only “solution” I have right now is to have a duplicate mesh, and change the materials there.


The perfect solution would be to use a foliage reference the content browser directly. That way I can create two foliage types in unreal, both with same mesh, but one with override materials.

Have you tried setting the material with an attribute? I know that you can have different uProperties on instanced meshes.
Houdini Technical Artist @ Sharkmob
User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
ChrisGG
I tried doing this but compared to Simon Houdinis presentation the little checkbox is missing in my HDA.

My Setup is …
1. Attribute Create with the static mesh string from Unreal (works)
2. Another Attribute Create node below with “unreal_foliage” as an Integer.

Do I need to add a special tag to the HDA? What am I doing wrong ?

From what I understand you need unreal_instance as well
Houdini Technical Artist @ Sharkmob
User Avatar
Member
7 posts
Joined: May 2018
Offline
valdomat
Have you tried setting the material with an attribute? I know that you can have different uProperties on instanced meshes.
Yes, and it worked, but it changes all slots of the mesh. If one mesh has two slots of materials (wood, metal), it changes both of them. I suppose it's possible to divide them in groups… but it's not as fast and easy to set up.
User Avatar
Member
11 posts
Joined: May 2017
Offline
Hello, I'm looking into this same issue right now. I need to be able to instance existing FoliageType actors, but haven't been able to find the correct workflow for this.

I’ve tried adding the path to a Static Mesh Foliage actor as my unreal_instance attribute in Houdini but that didn’t work. I also tried swapping the reference on the HoudiniOutput_Instancer from a StaticMesh to a FoliageType actor and the instances disappear.

What would be the best way to use one mesh for instancing, but have it for example pick its corresponding FoliageType actor to be instanced instead of itself? I’m thinking down the line we will have multiple FoliageTypes derived from the same mesh with different properties such as materials, cull distance, and other gameplay related features, so it would be quite important that the foliage system integration in the Houdini engine supports this somehow.

Any help would be really appreciated!
User Avatar
Member
31 posts
Joined: Sept. 2019
Offline
@particula - I haven't found any solution or new info regarding this. It's touched upon in this Github issue [github.com].

We chose to write transforms, tiles and references to a CSV and create the foliage actors from that. Something that was done in code.
Houdini Technical Artist @ Sharkmob
User Avatar
Member
11 posts
Joined: May 2017
Offline
@valdomat - Interesting approach! And good news, I got a response from support today regarding this topic:

This issue has been fixed in today's 18.5 daily build (18.5.399).
FoliageTypes can now be instanced via attribute instancers, and we now also update the foliage type/instancers properties using the unreal_uproperty attributes.
I've also added support for Interval type properties, which will let you set properties like “CullDistance” using an Int tuple 2 attribute:
(in the case of cullDistance, the attribute would be “unreal_uproperty_CullDistance”)
  • Quick Links