sideeffects / HoudiniEngineForUnreal-v2

Houdini Engine Plugin for Unreal Engine 4 - Version 2
http://www.sidefx.com/unreal
Other
294 stars 75 forks source link

Landscape output multiple SharedLandscape actors with StreamingProxy at World Partition of UE5EA #143

Open kelvincai522 opened 2 years ago

kelvincai522 commented 2 years ago

Understanding UE5 is still in Early Access, and HE does not support UE5EA officially yet. I have tested outputting Landscape tiles with World Partition at UE5EA.

With unreal_landscape_tile_actor_type = 1 and no unreal_level_path set, it generate one SharedLandscape actor with one StreamingProxy.

ie. with 16x16 tiles, it generates 16x16 SharedLandscape actor and 16x16 StreamingProxy in total.

The behavior is different as it was in UE4 and it looks like it is broken in UE5EA with World Partition

subTropic commented 2 years ago

I don't think this is just a world partition issue, Houdini Engine doesnt appear to be generating landscape streaming proxies at all in UE5, even with world partition turned off.

xiaodaiacg commented 2 years ago

@kelvincai522 Because of GetFName Is not represent the actor's label name in world partition, I just change it to GetActorLabel in FindActorInWorld function , then It works.

Here is the code in HoudiniEngineUtils.cpp. Hope it can help you.

    template<class T>
    static T* FindActorInWorld(UWorld* InWorld, FName ActorName, EActorIteratorFlags Flags = EActorIteratorFlags::AllActors)
    {
        T* OutActor = nullptr;
        for (TActorIterator<T> ActorIt(InWorld, T::StaticClass(), Flags); ActorIt; ++ActorIt)
        {
            OutActor = *ActorIt;
            if (!OutActor)
                continue;
            //UE5EA world partition workaround
            if (OutActor->GetActorLabel().Compare(ActorName.ToString()) == 0)
                return OutActor;
        }
        return nullptr;
    }
vsamusenko commented 1 year ago

Will this be implemented officially ? Any response from the devs ? landscapes are unusable w/ world partition at the moment

yurivieira commented 1 year ago

Please, we need this. Landscape with Houdini in eu5 is broken.

mchataway commented 1 year ago

Hi there, I'm having the same issue (I think), where each Landscape Streaming Proxy is importing with it's own independent Landscape Actor, they are not all sharing the same Landscape actor as they should be.