Announcement

Collapse
No announcement yet.

(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Jaytheway View Post

    Nobody AbleChen

    Here's working modified version of that function, add it to your blueprint function library. Check if it works in packaged game.

    Code:
    USoundWave* GetSoundWaveFromFile(const FString& FilePath)
    {
    
    #if PLATFORM_PS4
    UE_LOG(LogTemp, Error, TEXT("UVictoryBPFunctionLibrary::GetSoundWaveFromFile ~ vorbis-method not supported on PS4. See UVictoryBPFunctionLibrary::fillSoundWaveInfo"));
    return nullptr;
    #else
    USoundWave* sw = NewObject<USoundWave>(USoundWave::StaticClass());
    
    if (!sw)
    return NULL;
    
    //* If true the song was successfully loaded
    bool loaded = false;
    
    //* loaded song file (binary, encoded)
    TArray < uint8 > rawFile;
    
    loaded = FFileHelper::LoadFileToArray(rawFile, FilePath.GetCharArray().GetData());
    
    if (loaded)
    {
    FByteBulkData* bulkData = &sw->CompressedFormatData.GetFormat(TEXT("OGG"));
    
    bulkData->Lock(LOCK_READ_WRITE);
    FMemory::Memcpy(bulkData->Realloc(rawFile.Num()), rawFile.GetData(), rawFile.Num());
    bulkData->Unlock();
    
    //loaded = fillSoundWaveInfo(sw, &rawFile) == 0 ? true : false;
    FSoundQualityInfo info;
    FVorbisAudioInfo vorbis_obj;
    if (!vorbis_obj.ReadCompressedInfo(rawFile.GetData(), rawFile.Num(), &info))
    {
    //Debug("Can't load header");
    loaded = false;
    }
    
    if (!sw) loaded = false;
    sw->SoundGroup = ESoundGroup::SOUNDGROUP_Default;
    sw->NumChannels = info.NumChannels;
    sw->Duration = info.Duration;
    sw->RawPCMDataSize = info.SampleDataSize;
    sw->SetSampleRate(info.SampleRate);
    
    sw->RawPCMData = (uint8*)FMemory::Malloc(sw->RawPCMDataSize);
    vorbis_obj.ExpandFile(sw->RawPCMData, &info);
    
    loaded = true;
    }
    
    if (!loaded)
    return NULL;
    
    return sw;
    #endif
    }
    Boldened code is what's different from the original.
    Thanks a lot! I can confirm this works now in 4.25 editor and packaged/shipping build!

    Leave a comment:


  • replied
    Originally posted by Nobody View Post
    Yeah Sound Importing is broken for me in 4.25 aswell. Tried modifing the code a bit but as I am not very good in c++ so the only thing I could manage is to get some static noise after a week on working on it.
    Nobody AbleChen

    Here's working modified version of that function, add it to your blueprint function library. Check if it works in packaged game.

    Code:
    USoundWave* GetSoundWaveFromFile(const FString& FilePath)
    {
    
    #if PLATFORM_PS4
    UE_LOG(LogTemp, Error, TEXT("UVictoryBPFunctionLibrary::GetSoundWaveFromFile ~ vorbis-method not supported on PS4. See UVictoryBPFunctionLibrary::fillSoundWaveInfo"));
    return nullptr;
    #else
    USoundWave* sw = NewObject<USoundWave>(USoundWave::StaticClass());
    
    if (!sw)
    return NULL;
    
    //* If true the song was successfully loaded
    bool loaded = false;
    
    //* loaded song file (binary, encoded)
    TArray < uint8 > rawFile;
    
    loaded = FFileHelper::LoadFileToArray(rawFile, FilePath.GetCharArray().GetData());
    
    if (loaded)
    {
    FByteBulkData* bulkData = &sw->CompressedFormatData.GetFormat(TEXT("OGG"));
    
    bulkData->Lock(LOCK_READ_WRITE);
    FMemory::Memcpy(bulkData->Realloc(rawFile.Num()), rawFile.GetData(), rawFile.Num());
    bulkData->Unlock();
    
    //loaded = fillSoundWaveInfo(sw, &rawFile) == 0 ? true : false;
    FSoundQualityInfo info;
    FVorbisAudioInfo vorbis_obj;
    if (!vorbis_obj.ReadCompressedInfo(rawFile.GetData(), rawFile.Num(), &info))
    {
    //Debug("Can't load header");
    loaded = false;
    }
    
    if (!sw) loaded = false;
    sw->SoundGroup = ESoundGroup::SOUNDGROUP_Default;
    sw->NumChannels = info.NumChannels;
    sw->Duration = info.Duration;
    sw->RawPCMDataSize = info.SampleDataSize;
    sw->SetSampleRate(info.SampleRate);
    
    sw->RawPCMData = (uint8*)FMemory::Malloc(sw->RawPCMDataSize);
    vorbis_obj.ExpandFile(sw->RawPCMData, &info);
    
    loaded = true;
    }
    
    if (!loaded)
    return NULL;
    
    return sw;
    #endif
    }
    Boldened code is what's different from the original.

    Leave a comment:


  • replied
    Yeah Sound Importing is broken for me in 4.25 aswell. Tried modifing the code a bit but as I am not very good in c++ so the only thing I could manage is to get some static noise after a week on working on it.

    Leave a comment:


  • replied
    Originally posted by RenaCava View Post
    So I'm working with the Get Sound Wave from File node in 4.24, it creates the USoundWave with the correct duration but no actual audio samples, so there's no sound playing. Same thing happens with the other two nodes (at location and attached). Importing the .ogg file manually, it plays in editor, though this somewhat defeats the point of the nodes. Any ideas?Click image for larger version

Name:	Rama.jpg
Views:	538
Size:	60.6 KB
ID:	1751837

    Hello, I encountered the same problem. Do you have any solutions?

    Leave a comment:


  • replied
    Just a little warning: This plugin does not seem to be fully compatible with the Oculus Quest. I just spent two hours of debugging trying to figure out why my app kept crashing on me ONLY on the Quest, but nowhere else. Turns out it was the usage of the "Append String" (Or "Append multiple"? Can't recall...) function of the VictoryBP Plugin.
    Since I replayced it with the builtin "Append" function, everything is working smoothly again.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    When you open the project file with notepad, is the plugin set to 'false'?
    Ah, thank you very much, this seems to help! Finally I was able to remove the plugin by setting it to "false" by hand in the project file. Phew! Thank you!

    Leave a comment:


  • replied
    GetPixelFromT2D is broken in 4.24. Crash. Access violation.

    Do not use this plugin if you're not familiar with C++ and don't want to check the code by yourself before using a node!

    I just looked into the UVictoryBPFunctionLibrary::Victory_GetPixelFromT2D function and it

    Code:
    T2D->SRGB = false;
    T2D->CompressionSettings = TC_VectorDisplacementmap;
    changes the texture settings without letting the user know! The texture will have other settings after calling the node.
    Last edited by ThiloN1987; 06-06-2020, 02:50 PM.

    Leave a comment:


  • replied
    Originally posted by hwacookie View Post

    Hi,
    did you ever get this sorted out?
    I also tried to remove the plugin, and even though I'm pretty sure that it's not used anymore, it still crashes upon next restart of the project. :-(

    Kind regards,

    /hauke

    BTW: does anybody have an idea how to check where a specific plugin is used aside from "look through all blueprints that you can open"?
    When you open the project file with notepad, is the plugin set to 'false'?

    Leave a comment:


  • replied
    Originally posted by Rollocasual View Post
    is there a way to uninstall this plugin? when i disable it , i cant open editor cause crashes all time
    Hi,
    did you ever get this sorted out?
    I also tried to remove the plugin, and even though I'm pretty sure that it's not used anymore, it still crashes upon next restart of the project. :-(

    Kind regards,

    /hauke

    BTW: does anybody have an idea how to check where a specific plugin is used aside from "look through all blueprints that you can open"?

    Leave a comment:


  • replied
    Is the sort node for array of strucs working ? nothing happen when i try to use it.

    Leave a comment:


  • replied
    Hi guys and Rama !

    Please, do you know if there is a way to export an image (bigger than 1024px) to disk? I have tried some nodes but I don't find an efficient way to save a texture in a specified path of the computer.

    Thanks!

    Leave a comment:


  • replied
    I'm having a similar problem. I'm trying to launch-to-device with two Android devices, and while this works fine, any time a VictoryPlugin node is called, the game crashes on the device. The editor preview works fine, as does everything else in the project on the mobile device. I've followed PTF40k 's advice but this doesn't alleviate the problem. Aeromir do you have any further insight on the issue?

    Leave a comment:


  • replied
    Originally posted by Aeromir View Post
    I'm having a lot of trouble getting this to package with my project, and the information on how to package this correctly seems to have changed over time and varies by who is explaining how to do it. Would it be possible to get a new, even just quick version of how to package this with at least version 4.24? I have the Victory24.zip files.

    At this point, I'm not even sure where the files are supposed to go.
    How to install the files:

    Program files>Epic Games>UE_4.25>Engine>Plugins>Runtime>Create New folder and extract the files into it.

    Leave a comment:


  • replied
    I'm having a lot of trouble getting this to package with my project, and the information on how to package this correctly seems to have changed over time and varies by who is explaining how to do it. Would it be possible to get a new, even just quick version of how to package this with at least version 4.24? I have the Victory24.zip files.

    At this point, I'm not even sure where the files are supposed to go.
    Last edited by Aeromir; 05-07-2020, 11:13 AM.

    Leave a comment:


  • replied
    4.25 Is Live!

    https://www.mediafire.com/file/pgrps...gin25.zip/file

    Enjoy!



    Rama

    Leave a comment:

Working...
X