sideeffects / HoudiniEngineForUnreal-v2

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

crash opening map with asset that used Parameter Ramp #54

Open CBhoudini opened 3 years ago

CBhoudini commented 3 years ago

Excited to get this new plugin going.

Just trying out the Beta 1 plugin today opened our project, saw the houdini engine menu, verified plugin was already checked our title screen level was fine (no assets in it)

I then opened our world map which has lots of assets from the v1 plugin.

it crashes on load

Fatal error: [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp] [Line: 3899] HoudiniAssetParameterRamp ....snip..... HoudiniAssetComponent.HoudiniAssetParameterRamp_0: Serial size mismatch: Got 111, Expected 115

I tried again, same issue. I also tried manually reimporting the assets before I loaded that level but no luck.

CBhoudini commented 3 years ago

I was able to finally get loaded after killing that one asset in a couple levels.

but a map with a different asset using a ramp had the same crash, just different expected size HoudiniAssetParameterRamp_0: Serial size mismatch: Got 108, Expected 112

looking for where the data conversion happens in the new code.....

CBhoudini commented 3 years ago

ah, that makes sense

if (bIsFloatRamp) { UHoudiniParameterRampFloat* Parm = UHoudiniParameterRampFloat::Create(Outer, ParameterName);

    // TODO: 
    // Convert HoudiniAssetParameterRampCurveFloat

    return Parm;
}
else
{
    UHoudiniParameterRampColor* Parm = UHoudiniParameterRampColor::Create(Outer, ParameterName);

    // TODO: 
    // Convert HoudiniAssetParameterRampCurveColor

    return Parm;
}   

CBhoudini commented 3 years ago

update: I was able to get it to load to continue testing by reading in the dummy multiparm value like this:

void UHoudiniAssetParameterRamp::Serialize(FArchive & Ar) { // Call base implementation. Super::Serialize(Ar);

int32 multiparmvalue = 0;
Ar << multiparmvalue;

Ar.UsingCustomVersion(FHoudiniCustomSerializationVersion::GUID);

Ar << HoudiniAssetParameterRampCurveFloat;
Ar << HoudiniAssetParameterRampCurveColor;

Ar << bIsFloatRamp;

}

kelvincai522 commented 3 years ago

Good find. Having the same issue. Where should I update the code?

CBhoudini commented 3 years ago

I ended up reverting back to version 1 of the plugin until things stabilize more, so don't have the code still but
for me it was the thing in the previous message.

in void UHoudiniAssetParameterRamp::Serialize(FArchive & Ar) {

reading in that dummy multiparmvalue

last houdini engine version had an extra bit of data that was persisted with ramps. there used to be another base class that serialized it. I assume that is why it was complaining.