Download

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

Apparently 4.24 needs decompressed sample data.

@apfelbaum If you really need to work with .ogg files, you can use this modified version of the Victory function:


USoundWave* **UBP_FunctionLibrary**::GetSoundWaveFromOGGFile(const FString& filePath, bool& Success)
{
    if (filePath == "") { Success = false; return nullptr; }

    char* filePathChar = TCHAR_TO_ANSI(*filePath);

    USoundWave* sw = NewObject<USoundWave>(USoundWave::StaticClass());
    if (!sw) { Success = false; return nullptr; }

    TArray < uint8 > rawFile1;

    FFileHelper::LoadFileToArray(rawFile1, filePath.GetCharArray().GetData());

    FByteBulkData* bulkData = &sw->CompressedFormatData.GetFormat(TEXT("OGG"));

    bulkData->Lock(LOCK_READ_WRITE);
    FMemory::Memcpy(bulkData->Realloc(rawFile1.Num()), rawFile1.GetData(), rawFile1.Num());
    bulkData->Unlock();

    FSoundQualityInfo info;
    FVorbisAudioInfo vorbis_obj;

    if (!vorbis_obj.ReadCompressedInfo(rawFile1.GetData(), rawFile1.Num(), &info))
    {
        //Debug("Can't load header");
        return nullptr;
    }
    else
    {
        sw->SoundGroup = ESoundGroup::SOUNDGROUP_Default;
        sw->NumChannels = info.NumChannels;
        sw->Duration = info.Duration;
        sw->RawPCMDataSize = info.SampleDataSize;
        sw->SetSampleRate(info.SampleRate);

        // - Decompress and bake PCM Data from file into SoundWave
        sw->RawPCMData = (uint8*)FMemory::Malloc(sw->RawPCMDataSize);
        vorbis_obj.ExpandFile(sw->RawPCMData, &info);

    }

    if (!sw) { Success = false; return nullptr; }

    Success = true;
    return sw;
}

This part will ensure that it works in 4.24 in editor as well as in packaged game:


        sw->RawPCMData = (uint8*)FMemory::Malloc(sw->RawPCMDataSize);
        vorbis_obj.ExpandFile(sw->RawPCMData, &info);

It’s a bit slower than original Victory function since it needs to “Expand” the file.

Make sure to include VorbisAudioInfo.h to your BP_FunctionLibrary.cs


#include "Runtime/Engine/Public/VorbisAudioInfo.h"

And add “Vorbis” to your project’s .Build.cs:

I do believe that it does not matter what FORMAT a sound byte is used as. If the sound byte is copyrighted it does not matter if you convert it to mp3, ogg or WAV or any other format. it is the actual audio that is protected by a copyright not the format. and WAV is supported in the engine for export so I doubt that would be an issue. if the sound bytes are not legal they should not be used at all if you don’t have a license to use them in the first place <3

and also just because a “TOOL” exists does not make it a legal action to use it. like the youtube downloader software. these softwares are Illegal and go against copyrights and youtube policy even though many people use them. This is not a good idea to offer to your game users. you can support WAV and other formats
for loading sounds but you must have a disclaimer that states using copyrighted sounds is forbidden and can void your user agreement to protect yourself etc.
I’d talk to a lawyer before releasing the game. TOS can save your butt so be cautious.

@Rama @Everyone Thank you so much for creating this amazing plugin, and thank you to everyone who contributed to it! Amazing!

I’ve been working with these plugins a bit, but I had two questions:

  1. Is it possible to have multiple materials with the instanced static meshes all merged into one?
  2. Would it be possible to manipulate the texture coordinates on different instanced static meshes?

What I’m going for is a single atlas texture, with one instanced static mesh, copied tens of thousands of times, with different texture coordinates on the different meshes.

Thank you all again!

Ah I see, so the static meshes are converted then merged based on the mesh, and if you change the texture coordinates, it would change ALL the static meshes that you have in the level, of that particular mesh, so if you have 10 static meshes, the plugin searches and finds all meshes of a particular name, then merges those, so you could have potentially hundreds of thousands of meshes merged into the number of beginning meshes you have, 250,000 meshes with 50 basic meshes would be 50 draw calls(plus those other extra draw calls for texture, etc), but that’s still way better than rendering that many meshes.

I wonder if it is possible though? You can change the scale, location, etc in the editor, I wonder if an overlay with an atlas material could be implemented? So you could have the same static mesh, just one draw call, with thousands of texture coordinates in different positions on the atlas material.

I’m developing a massive, game world wide modular building system, such that modular building pieces can be laid down(foundations, walls, frames, etc), and seen in the distance. The entire game world is built entirely out of modular pieces. You can build a town, city, castle, anything you want anyway you want, and see it in the distance efficiently. Even ruins and underground tunnels are built using the same system.

I’m using a runtime static mesh merging system for most of the building pieces, they are based on provinces, there are around 30 provinces, each with a different merged static mesh. This static mesh merging works well enough, only problem is when you want to build something, you can’t take any triangles away from the merged mesh, so when you enter build mode in a province, there is a simple mesh that is spawned on each control of the modular building system, and these meshes are Victory Plugin instanced meshes, that are all merged together with only as many draw calls as you have unique meshes within the province. When you want to delete a piece, the pieces are separated so that individual instances can be deleted, then merged together again after you’re done. When you’re finished building the static mesh is spawned again with updated pieces(the previous merged static mesh is merged with the updated pieces).

Does anyone else have issues with the “get rendered actors” node? It seems to NOT run when you are not viewing any blueprints. It runs when nothing but the main UE4 screen is up.

Victory Plugin License ~ MIT

A lot of people have been asking me for a specific software license to declared for the Victory Plugin

I have officially chosen the MIT license!

Here is the License for my UE4 C++ Victory Plugin!

:heart:

Rama


**License**

Copyright 2020 by Nathan "Rama" Iyer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Rama lives! <3

Hahaha, lovely to hear from you [USER=“434”]BrUnO XaVIeR[/USER] !

Wow, your BP exceptions plugin is an amazing technical achievement!

Congratulations!

Victory to You!

:heart:

Rama

Hey @Rama, first of thank you ever so much for the plugin! This is a true life saver, the external image and text reading has helped a ton on my project, I’ve recently attempted to get external audio working as well, however it seems to me that the “Play Sound From File” nodes are no longer compatible with the new audio engine or something? They are not playing anything no matter what I do.

Any chance of getting these looked at?

EDIT: Just read the previous page, looks like a fix exists! Yay! Sadly I’m not a programmer and have no clue how this fix would be implemented.

@Rama WE LOVE YOU! <3

@Rama I have used some of the BP nodes to help create my latest open source project: 3D Animated Desktop Wallpaper Engine, let me know what you think:)
https://www.youtube.com/watch?v=blNmtoWyL7M

[USER=“35307”]Walid Chekkouri[/USER] @Rama @frostic @Traggey @Falconeyi [USER=“434”]BrUnO XaVIeR[/USER] @LordNelson7 @Jaytheway @apfelbaum @EricLiu2018 @Fire_O
This plugin is causing errors such as LODs set to hard-coded value…in 4.22.
How can this be fixed? See code below:


UATHelper: Packaging (Windows (64-bit)): E:\Unreal Games\Projects\UPlatformGame\Plugins\VictoryPlugin\Source\VictoryBPLibrary\VictoryBPLibrary.Build.cs: warning: Referenced directory 'D:\Programs\Epic Games\UE_4.21\Engine\Source\VictoryBPLibrary\Public' does not exist.
PackagingResults: Warning: Referenced directory 'D:\Programs\Epic Games\UE_4.21\Engine\Source\VictoryBPLibrary\Public' does not exist.
UATHelper: Packaging (Windows (64-bit)): LogGameplayTags: Display: UGameplayTagsManager::DoneAddingNativeTags. DelegateIsBound: 0
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogClass: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogAutomationTest: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
PackagingResults: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
PackagingResults: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
PackagingResults: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogClass: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: FLevelStreamInstanceInfo::Location is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: FLevelStreamInstanceInfo::Rotation is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeLoaded is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBeVisible is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FLevelStreamInstanceInfo::bShouldBlockOnLoad is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: FLevelStreamInstanceInfo::LODIndex is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FVictoryInput::bShift is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FVictoryInput::bCtrl is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FVictoryInput::bAlt is not initialized properly
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogAutomationTest: Warning: BoolProperty FVictoryInput::bCmd is not initialized properly

How can this be fixed? Thanks.

I don’t see any ERROR these are warnings.
most warnings can be ignored. unless it is effecting your game i would just ignore them.
I also see these warnings but they have not caused an issue for me yet.

hope this helps.

Hi guys and @Rama ,

Wow, I’m still discovering this “pack of useful nodes with their C++ inside” and it’s incredible! Only tested a few things, but for example the GPU ones it’s a thing I was dreaming with :eek: Thank you fi this!

I have a question too. I have seen I can import a texture from the computer with the Victory nodes, but is it possible to also export a texture from the project to the computer? (Using nodes, of course). I have been trying with this, but UE editor crashes when executing:

Thank you again!!

@Miguel1900

I don’t know about the crashing, but I know that to get the Victory Save Pixels node to work, the file path has to include the desired file name as well as the extension. So instead of “C:\Users\Desktop” it should be something like “C:\Users\Desktop\ImageName.png”. Also, if you want to make sure the directory you’re pointing to is right, I like to use one of Rama’s Paths nodes, like “Victory Paths Saved Dir” and then just append it with the file name and extension.

Thank you @CrowdTheFactory !

I have discovered that it’s working but only with very small images. When it’s a “common” image of 1024 or more, it crashes, you too?

What I am trying to do is to generate a Render Target, generate a Texture from it (already done) and export it (or both) to the computer. Maybe for this case is most useful to follow a different workflow?

Thank you very much

here is a change i had to make today as DefaultUSoundwave

else {
    Success = false;
    return nullptr;
}

// - Baking PCM Data from file into SoundWave memory
const int32 NumSamples = sw-&gt;RawPCMDataSize / sizeof(Audio::FResamplerResults);

sw-&gt;RawPCMData = (uint8*)FMemory::Malloc(sw-&gt;RawPCMDataSize);
FMemory::Memcpy(sw-&gt;RawPCMData, WaveInfo.SampleDataStart, NumSamples * sizeof(Audio::FResamplerResults));

if (!sw) { Success = false; return nullptr; }

Success = true;
return sw;

}

It seems that DefaultUSoundWaveSampleType is no longer in 4.24.3 and returns a null reference and crashes. the above change fixes this issue.

When comparing Read Render Target Pixel with Get Pixel From T2D, is there a significant performance cost difference between the two?

*Read Render Target *comes with a warning that the operation is extremely inefficient and slow.

Hello,
am kind of confuse on the packaging part for mobile devices for UE4.24 ?

Is there any plans on getting the Download Image Working with your plugin?
i was told that i can modified that { Download Image } blueprint node with c++ to have it take 2DTexture instead of waiting for the second GetPixel to accepts FTexture2DDyanamic but am not good with C++ :(.

this we’ll probably be a piece of cake for you to share so that we can enjoy the plugin in the meantime.

Here’s a image of someone showing me that he got it working But not willing to share :

Thank you.