Giter Club home page Giter Club logo

Comments (26)

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt At this time, we don't plan on doing any updates to the Wwise plugin. If you get blocked, please let us know.

We did notice that the debug voxels were not displaying correctly on UE5.3.0, but also noticed that it was fixed for us on UE5.3.1. Are you building from source or using the public engine distribution? It might be something that wasn't fixed in the version of UE5.3.1 that you sync'ed to.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Thanks!
Looked at it now, seems to be a bug with bDefaultConstrainAspectRatio and slate, all debug rendering seems broken so it doesn't have anything to do with PA.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Hi!
We want to upgrade Wwise to version 2023 in our project. Is there any plan to repackage the plugin for 2023, or is it possible to do it in some other way to fix it locally?

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt

I don't think it would be too hard to get the plugin working for Wwise 2023. First, you'll need to modify the metadata in the Wwise plugin package to adjust the value for year in the targetWwiseVersion section to 2023.

Next, you'll need to apply the following changes to the PA Unreal plugin code:

AcousticsEdMode.cpp

@@ -77,27 +77,28 @@ void FAcousticsEdMode::BindCommands()
         Commands.SetObjectTag,
         FExecuteAction::CreateRaw(this, &FAcousticsEdMode::OnClickObjectTab),
         FCanExecuteAction(),
-        FIsActionChecked::CreateLambda(
-            [=] { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::ObjectTag; }));
+        FIsActionChecked::CreateLambda([this]
+                                       { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::ObjectTag; }));

     UICommandList->MapAction(
         Commands.SetMaterials,
         FExecuteAction::CreateRaw(this, &FAcousticsEdMode::OnClickMaterialsTab),
         FCanExecuteAction(),
-        FIsActionChecked::CreateLambda(
-            [=] { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Materials; }));
+        FIsActionChecked::CreateLambda([this]
+                                       { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Materials; }));

     UICommandList->MapAction(
         Commands.SetProbes,
         FExecuteAction::CreateRaw(this, &FAcousticsEdMode::OnClickProbesTab),
         FCanExecuteAction(),
-        FIsActionChecked::CreateLambda([=] { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Probes; }));
+        FIsActionChecked::CreateLambda([this]
+                                       { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Probes; }));

     UICommandList->MapAction(
         Commands.SetBake,
         FExecuteAction::CreateRaw(this, &FAcousticsEdMode::OnClickBakeTab),
         FCanExecuteAction(),
-        FIsActionChecked::CreateLambda([=] { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Bake; }));
+        FIsActionChecked::CreateLambda([this] { return AcousticsUISettings.CurrentTab == AcousticsActiveTab::Bake; }));
 }

 void FAcousticsEdMode::SelectObjects()

AcousticsSimulationConfiguration.cpp

@@ -108,18 +108,17 @@ bool AcousticsSimulationConfiguration::Initialize(
     const TritonOperationalParameters& opParams, const AcousticsMaterialLibrary* library,
     TritonPreprocessorCallback& callback)
 {
-    // Async processing to avoid blocking the UI thread
-    m_CreateProbesFuture = Async(EAsyncExecution::ThreadPool, [=]() {
-        auto libraryHandle = library ? library->GetHandle() : nullptr;
-        return TritonPreprocessor_SimulationConfiguration_Create(
-            mesh->GetHandle(),
-            const_cast<TritonSimulationParameters*>(&simulationParams),
-            const_cast<TritonOperationalParameters*>(&opParams),
-            libraryHandle,
-            callback,
-            &m_Handle);
-    });
-    return true;
+    auto libraryHandle = library ? library->GetHandle() : nullptr;
+    // Send to Triton to run Prebake
+    bool result = TritonPreprocessor_SimulationConfiguration_Create(
+        mesh->GetHandle(),
+        const_cast<TritonSimulationParameters*>(&simulationParams),
+        const_cast<TritonOperationalParameters*>(&opParams),
+        libraryHandle,
+        callback,
+        &m_Handle);
+
+    return result;
 }

 bool AcousticsSimulationConfiguration::Initialize(const FString& workingDir, const FString& configFilename)

AcousticsAudioComponent.cpp

@@ -43,7 +43,11 @@ UAcousticsAudioComponent::UAcousticsAudioComponent(const class FObjectInitialize
 {
     // Do not use Wwise's occlusion/reverb behavior.
     OcclusionRefreshInterval = 0.0f;
+#if AK_WWISESDK_VERSION_MAJOR < 2023
     UseReverbVolumes(false);
+#else
+    bUseReverbVolumes = false;
+#endif
     EnableSpotReflectors = 0;
 #if AK_WWISESDK_VERSION_MAJOR < 2019 || (AK_WWISESDK_VERSION_MAJOR == 2019 && AK_WWISESDK_VERSION_MINOR < 2)
     bUseSpatialAudio = false;
@@ -137,7 +141,7 @@ void UAcousticsAudioComponent::BeginPlay()
         {
             AkAudioDevice->SetAttenuationScalingFactor(this, AttenuationScalingFactor);
 #if AK_WWISESDK_VERSION_MAJOR >= 2022
-            AkAudioDevice->PostAkAudioEventOnComponent(AkAudioEvent, this);
+            AkAudioEvent->PostOnComponent(this, nullptr, nullptr, nullptr, (AkCallbackType)0, nullptr, false);
 #else
             AkAudioDevice->PostEvent(GET_AK_EVENT_NAME(AkAudioEvent, EventName), this, 0, nullptr, nullptr);
 #endif

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Thank you, Noel!

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Got most of the stuff up and running now, I changed wwise-version in bundle.json before installing. But Wwise complains that Project Acoustics Spatial Reverb using the wrong version ("Plug-in version doesn't match sound engine version."), any idea how to fix that one?

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

Can you show me where you are seeing this error? Is this happening when integrating the plugin in a specific version of Wwise in the launcher or is this error happening in the Wwise authoring tool?

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

It's in the capture log when profiling, the effect is available in Wwise authoring tool.
The spatial reverb is not working when running the game, when soloing the reverb it sounds just like an LP-filter so I guess the effect is just by-passed.
WwiseLog

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

It looks like we need to produce pre-compiled binaries to support Wwise 2023. I have most of the changes ready and I'm doing some validation before updating Microsoft's Download Center. Looking at having the update posted by the end of the week.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Thank you Noel!

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

The latest package which supports Wwise 2023 is now available at https://www.microsoft.com/en-us/download/details.aspx?id=58090. Let us know if you run into any issues.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Hi, downloaded the package but I didn't find any "Wwise/2023.1"-folder?

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

Sorry for the confusion. I made an error in the build packaging such that the 2023.1 folder was missing.

The package has been updated now with the correct folders included and the version number bumped to 2022.1.428.

Thanks for letting us know about the issue.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Thank you Noel, now it works fine for the most parts!
I do have one bug (don't know if it's my changes in Wwise integration or Project Acoustics that's causing it, but maybe you have an idea why it happens).
We have a one-shot event, an explosion that's spawning an AudioComponent with acoustics and spatial reverb. Sometimes the spatial reverb goes crazy when the event triggers and try to output a mighty +600dB on the main bus (a bit of surprise the first time it happened). Have you heard about this earlier or know any reason why this might happen?
I noticed this behaviour before when developing our own filters, but haven't seen this with PA before.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

The bug seems to occur when removing points from an active multipos-event.

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt we aren't really sure why this is happening, but we've seen issues with garbage values when the authoring plugin and the dsp plugins are out of sync. Could you try removing the PA plugin from the Wwise Launcher and try re-installing again.

Otherwise, it would be good if you could capture the RTPCs that are being sent to the spatial reverb plugin when this happens and share the result with us.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

@NoelCross I've added the log of the RTPCs from WWISE when the bug happens. From what I can tell the values doesn't look that strange but you can have a look (sorry for the formatting).
Our repro for this bug is to have a looping Multiple Positions-sound playing (that's sending to Spatial Reverb) and then remove a position (call SetMultiplePositions) while it's playing.

LoudReverbRTPCs.txt

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Hi, did you get a chance to look into this? I've re-installed the plugin but no differences.

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt sorry for the slow response on this. The team is busy working with some internal partners so I haven't had a chance to look at this yet. I'm hoping to continue the investigation next week.

One question, it seems like you are hooking the spatial reverb up to a bespoke engine given the comment about the SetMultiplePositions usage. I don't believe that our Unreal plugin uses this interface so just curious if using a custom engine is your scenario.

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Hi, Noel, no worries!
I'm not sure what you mean by bespoke engine, we're using WWISE pretty untouched in UE 5.3 (just some minor Linux customizations).
The SetMultiplePositions is available in AkGameplayStatics:
... UFUNCTION(BlueprintCallable, Category = "Audiokinetic") static void SetMultiplePositions(UAkComponent* GameObjectAkComponent, TArray<FTransform> Positions, AkMultiPositionType MultiPositionType = AkMultiPositionType::MultiDirections); ...

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

It seems like you have customized the ProjectAcousticsWwise plugin since the one we provide uses the singular version of the SetPosition API.

AcousticsAudioComponent.cpp, line 443:
auto akResult = AudioDevice->SetPosition(this, pathAsAkTransform);

Are you calling SetMultiplePositions from a blueprint or did you modify the UAcousticsAudioComponent::SetDryAndWetPaths() method?

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

Yes, sorry. You're absolutely correct in your assumption. :)
We call SetMultiposition from blueprint and skip the setposition for multipos components in SetDryAndWetPath, totally forgot.
It has worked fine in previous versions of Wwise (2021)

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt I'm trying to get back to this investigation now that the team cleared an internal milestone. I'm trying to get a minimal repro by replacing the call to SetPosition with a call to SetMultiplePositions with some random input. In the UE4.27 SunTemple sample that we ship with PA, I'm not hearing any bursty sound so I'm wondering what's different about your repro.

If you have a minimum repro project without any private assets that you can share with us, that would be super helpful to isolate what's going on.

#if 1
    TArray<FTransform> in_aPositions;
    for (auto i = 0; i < rand() % 10 + 1; i++)
    {
        FTransform tranform(FRotator(rand() % 360, rand() % 360, rand() % 360), FVector(rand() % 100, rand() % 100, rand() % 100), FVector(rand() % 100, rand() % 100, rand() % 100));
        in_aPositions.Add(tranform);
    }

    auto akResult = AudioDevice->SetMultiplePositions(this, in_aPositions, AkMultiPositionType::MultiDirections);
#else
    auto akResult = AudioDevice->SetPosition(this, pathAsAkTransform);
#endif
    // Setting position will fail if sound engine isn't ready for us
    if (akResult == AK_Fail)
    {
        return;
    }

from projectacoustics.

HDalsfelt avatar HDalsfelt commented on June 21, 2024

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt I was able to repro after your correct insight about this only happening on Wwise 2023. We'll now be able to figure out the root cause of this.

from projectacoustics.

NoelCross avatar NoelCross commented on June 21, 2024

@HDalsfelt I think that we have a fix for this issue. At least it appears to be addressed with my internal testing.

Could you send an email to [email protected] so that I can send you a copy of a test PA Wwise plugin package? This would allow you to validate that you no longer experience that burst of audio on the spatial reverb bus so we can package up an official patch to address this issue in the public package.

from projectacoustics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.