sideeffects / HoudiniEngineForUnreal

Houdini Engine Plugin for Unreal Engine.
http://www.sidefx.com/unreal
Other
1.35k stars 373 forks source link

Landscape Tiles NOT Sharing a Common Landscape Actor When importing heightfield tiles into Unreal 5.0 #183

Closed ChrisHoooooo closed 1 year ago

ChrisHoooooo commented 2 years ago

Hi,

I just found that the behaviours are different between creating a landscape in UE5 manually and creating by HDA(with heightfield tiles split node). In the latter situation, each of the tiles (LandscapeStreamingProxy) will have its own LandscapeActor rather than sharing with other Proxies.

For example, if I split the landscape 2 x 2, which means 4 tiles total. What I expect in UE's WorldOutliner:

But I got something like this:

I found that the first created SharedLandscapeActor couldn't be found due to an improper way of comparing ActorLabels. In HoudiniEngineUtils.h

803:  if (OutActor->GetFName().Compare(ActorName)==0)
804:         return OutActor;

should be replaced with something like this

        FString ActorLabel = OutActor->GetActorLabel();
    FString sr = ActorName.ToString();
    if (ActorLabel == sr)
            return OutActor;

Please take care of it if what I said above make sense. Thank you very much!

pabluch commented 2 years ago

For me it depends on whether the map I'm working on has world partition enabled or not if it is enabled image Finds the actor to be connected to image For world partition map it does not.

pabluch commented 2 years ago

The proposed fix @ChrisHoooooo in static T FindActorInWorld(UWorld InWorld, FName ActorName, EActorIteratorFlags Flags = EActorIteratorFlags::AllActors) in HoudiniEngineUtils.h works for me. Please consider including it or you guys need a pull request with that?

dpernuit commented 1 year ago

Hi, This has been fixed in recent builds of the plugin.