New feature: Generic UProperty attributes

   4255   4   4
User Avatar
スタッフ
534 posts
Joined: 9月 2016
Offline
Hi everyone,

We have added support for generic UProperties attributes in the latest build of the plugin (16.0.674+).

This features allow you to set any Property on the static mesh components or instanced static mesh components generated by Houdini Assets in Unreal. To make it simple, this allows you to presets any of the “greyed out” properties on the components, where before, the only way to set these was to bake the asset, and manually change those values on the component.

To use it, simply add a primitive or detail attribute to your HDA, with its name starting with the “unreal_uproperty_” prefix. Append the name or display name of the UProperty you want to change to it, and set its value to what you want it to be. Float, Int and String attribute types are supported, and the plug-in will always convert the attribute's value to the UProperty's type.

For example, to have the “Use Emissive For Static Lighting” property enabled on the mesh components generated by the asset, simply add a primitive or detail attribute named “unreal_uproperty_UseEmissiveForStaticLighting” and set its value to 1.
Upon cook, the generated mesh components will have this property enabled.

Vectors UProperties are supported and can easily be modified too, just set the size of your attribute accordingly.

In most case, finding the name/display name of the UProperty from the editor UI should be easy, as removing spaces from the name displayed should do the trick (“Center Of Mass Offset” becomes “centerofmassoffset” ) but there will be a few cases where you'll need to find the UProperty's name in the source code (the “Lock Position” property's name is actually “LockXTranslation”, “LockYTranslation” and “LockZTranslation” for example).

I've attached a simple HDA demonstrating this.
It creates a one tonne box with physics enabled, by overriding the simulate physics, mass in Kg, override mass and mobility properties of the generated mesh.

Attachments:
OneTonneBox.hda (8.5 KB)

User Avatar
Member
21 posts
Joined: 4月 2017
Offline
Wow, this post is so important, it deserves more views. I was thinking how we can simulate HDA's physics in Unreal, then I found this post. However, I found a bug. I dragged a HDA to my Unreal level, it had physics enabled and was able to fall on the floor after Play the scene. But after relaunching the Unreal Editor, the HDA I dragged before could no longer moving. So I have to drag a new one again, this could be crucial if I have many HDAs in the level that need physics to be simulated.
User Avatar
スタッフ
534 posts
Joined: 9月 2016
Offline
Hi,

You're right about the bug, it seems like the changed uproperties are not saved/loaded properly with the level, so the asset needs to be recooked for them to be reapplied…

I'll post an update here when that issue is fixed, thanks for letting us know!
User Avatar
スタッフ
534 posts
Joined: 9月 2016
Offline
Hi,

Actually the bug wasn't due to the changed uproperties not being saved/loaded properly, but to the fact that the Houdini Asset Actor forces its mobility back to Static after loading…

This should be fixed in tomorrow's daily build.
User Avatar
Member
132 posts
Joined: 7月 2007
Offline
I know we're several years on, but I'm finding this, or similar bug in Houdini 18.0.499 and Unreal 4.25.
We are heavily using HDAs at our studio that generate geometry that needs to remain non-baked.
I've noticed some uproperties get reset after a map save, then reload. Specifically unreal_uproperty_CollisionProfileName _often_ but not always gets reset after reload. I'm using an HDA that generates two objects, with different properties, namely collision profile and collision complexity.
These properties will show up correctly when the HDA is first built (or rebuilt) but after save and reload they take what seems to be arbitrary new values.
Ultimately, we're trying to generate rather complex static mesh actors that are composed of different parts with different types of collision. We've found this impossible with this inconsistency. It would be very bad to have to recook all our HDA assets in UE every time we load a map.
Surprisingly I also tried these tests with the new Version 2 (alpha 2) of Houdini Engine inside 4.25.1 and similar problems occur.
I'm very eager to find a solution or even a workaround at this point.
EDIT: I wonder if this is an issue specifically with multi-mesh-component HDAs? I just tried the OneTonneBox and setting properties (like unreal_uproperty_Visible), saving, then reloading does seem to work fine.
EDIT2: Just tried OneTonneBox in 18.0.499 Engine and setting unreal_uproperty_Visible gets reset back to 1 after saving then reloading the map…so that's bad. Cooking the actor inconsistently reapplies the property correctly.
Edited by Len - 2020年8月4日 03:29:52
  • Quick Links