New feature: Instance anything

   6681   18   4
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
We've added a much-requested new feature in the latest build of the plugin which allows instancing of actors.

Previously you could instance Static Mesh assets via the unreal_instance attribute or by overriding a generated instance with a Static Mesh asset from the content browser.

Now you can use any asset that is derived from AActor or can be converted to one. For example: Particle systems, Sounds, Skeletal Meshes, as well as Blueprints which are Actors ( volumes, lights, triggers, characters etc ).

Check it out, and let us know of any questions, problems or suggestions you have.

Note: ‘Bake to Blueprint’ does not currently consider any ‘instanced actors’, this is work-in-progress.
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
Suhwwweeeet!
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
how does this work exactly. if i want to, say, instance some lights, can i specify that somehow in houdini? or do i just instance some geometry and then replace it from the UE4 editor?
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
Either way works:

1. Create a detail or point attribute named unreal_instance with the value being the string reference to your asset. For example: Blueprint'/Game/Blueprints/BP_MyLightActor.BP_MyLightActor' You can get the reference string by right-clicking on the asset in the content browser and selecting copy reference.

2. Output of packed primitive geometry or an Instancer node can be overriden through the Houdini Asset with the same asset by dragging it over the ‘instanced override’ swatch or using the drop-down selection list.
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
I'm having some trouble, unfortunately, getting this to work. I tried to make an elevator blueprint (it's just a moving platform), and then i instanced it onto a grid with four points.

using the first method, unreal_instance attribute, i got nothing at all. (i'm prolly did something wrong)

using the 2nd method, the platforms were sort of instanced but, they were invisible during gameplay, and they were also invisible in the editor screen unless i first clicked on them.

I'm not sure if i can just give you the file bp uasset file? does it work like that?

Also, I'm using version 4.12.5 unreal and 15.5.642 of houdini.
Edited by twelveplusplus - Nov. 4, 2016 21:26:14

Attachments:
platform_bp.uasset (127.4 KB)

User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
twelveplusplus
I'm having some trouble, unfortunately, getting this to work. I tried to make an elevator blueprint (it's just a moving platform), and then i instanced it onto a grid with four points.

using the first method, unreal_instance attribute, i got nothing at all. (i'm prolly did something wrong)

I was able to instance your BP using attribute value: Blueprint'/Game/platform_bp.platform_bp' You could try checking the UE4 output log for error messages?

twelveplusplus
using the 2nd method, the platforms were sort of instanced but, they were invisible during gameplay, and they were also invisible in the editor screen unless i first clicked on them.

Yes, sorry the ‘invisible during gameplay’ is a bug we noticed and will hopefully have that fixed soon. I haven't seen any problems in the editor screen though. I'll try to reproduce that.
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
hmmm, i must have made a typo with the attribute…? now that i try that method again, it seems to be working just fine (in both the editor and in actual gameplay… and without having to bake the scene).

I will play with it some more. I think that actor instancing will be a very powerful addition for unreal! thanks for the cool new feature!
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
oh, one other quick question, i swapped out some geometry that was generated by my asset, using the drag-and-drop method.

Now, i can't figure out how to revert the instance to the generated geometry…
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
ha, ok one more thing, this might help with the disappearing instances. it isn't only drag-and-drop instances that dissapear at playtime, but also, if i load in a fresh copy of an asset into a new level that uses instance attribute and instances geometry created by the attribute, all of that geometry will vanish at playtime, as well.

It is only instanced geometry though. Geometry that is created by houdini and contained in a regular Geometry object is still drawn correctly at playtime.


(I don't know if people actually say “playtime,” but if they don't, i just coined the term. hahaha)
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
The latest build should have the ‘invisible instances’ bug fixed, thanks for the feedback on that.

twelveplusplus
i swapped out some geometry that was generated by my asset, using the drag-and-drop method.

Now, i can't figure out how to revert the instance to the generated geometry…

There should be a little yellow arrow next to the hourglass icon which will revert the assigned mesh to the generated one.
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
ok, thanks, i will check it out
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
So, the new feature is mostly working. I'm still getting some problems with using the unreal_instance attribute tho. Basically, it's just not doing anything, but i think it is because only when I am mixing it in an instance OBJ which already has “instance” attributes in it. (i will test that to make sure)

Maybe you just can't mix and match “unreal_instance” with “instance”???
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
ok, i tried to segregate all the “unreal_instance” points in their own instance container, and that works just fine. I was under the impression that multiple instance containers didn't work with Unreal.
User Avatar
Member
19 posts
Joined: Oct. 2016
Offline
This is realy cool! Tried it for placing my enemy ai (some spiders) around the level which worked very nice!
Now, there are spiders everywhere :-)
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
oh yes, i'm using it so i can just draw out systems of moving platforms. I look at all those platforms, and I'm like daaamn it would suck to place those all by hand!

Also, gonna use it to place lights, because right now, i can resize my level, and it was always aannoying because then i had to move the lights by hand. now i can have them place automatically. Super stoked about that!
Edited by twelveplusplus - Nov. 13, 2016 15:54:21
User Avatar
Member
22 posts
Joined: April 2018
Offline
chrisgreb
Either way works:

1. Create a detail or point attribute named unreal_instance with the value being the string reference to your asset. For example: Blueprint'/Game/Blueprints/BP_MyLightActor.BP_MyLightActor' You can get the reference string by right-clicking on the asset in the content browser and selecting copy reference.

2. Output of packed primitive geometry or an Instancer node can be overriden through the Houdini Asset with the same asset by dragging it over the ‘instanced override’ swatch or using the drop-down selection list.
Hi,
I created a simple HDA with a Box node and an Attribute Create node for creating the ‘unreal_instance’ point attribute.
The attribute's value is “Blueprint'/Game/WallLamp.WallLamp'”. The WallLamp blueprint inherits Actor.
When I drag the HDA into editor scene, only the Box is present, the WallLamp blueprint is not instanced. And there is no instance or Blueprint asset input socket in the Details panel.

I use Houdini 16.5.623 and UE4.19.2.
User Avatar
Staff
546 posts
Joined: Sept. 2016
Offline
Hi,

Due to the way HAPI/instancers work, for them to be recognized properly, the points must not be part of the main geo.
Try using a Add node for example, and add the unreal_instance attribute to them.
User Avatar
Member
22 posts
Joined: April 2018
Offline
It works, thanks!
User Avatar
Member
3 posts
Joined: March 2019
Offline
Hi,
It is possible to instantiate another HDA while referencing it, but how one can pass input parameters to it ?
Is that even possible ?
I am thinking of attributes that should be passed within geometry, aka wedging.
Going to try and report back.
  • Quick Links