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
    Hi Rama,

    I encountered a crash in your VictoryBPFunctionLibrary.cpp.

    in
    Victory_LoadTexture2D_FromFile

    if I pass in an EXR file, it will crash in line

    FMemory::Memcpy(TextureData, UncompressedBGRA.GetData(), UncompressedBGRA.Num());

    for TextureData is made of 8 bit but EXR data is usually more than 16 bit.

    I modified

    ImageWrapper->GetRaw(ERGBFormat::RGBA, 8, UncompressedBGRA) to

    ImageWrapper->GetRaw(ERGBFormat::RGBA, bitDepth, UncompressedBGRA)
    the program passed.

    Another question is, I fed the final UTexture2D into HDRIBackdrop it became all white, for it needs TextureCube?
    Is it possible for Victory_LoadTexture2D_FromFile to get UTextureCube instead?

    Thanks.

    Richard

    Leave a comment:


  • replied
    Hi, Rama -

    I'm having difficulty using your plugin - Could you help me out? How should I use "Load string from file"? I get the txt file and plug it into the file path -> but the "result" has no value-> therefore I have nothing to "Parse into Array". This is a simple setup, but it does not recognize my selected file.

    Leave a comment:


  • replied
    Hi, and thanks for this extremely usefull pluggin!!
    I have a lot of pages in this topic but can't find my answer, I'm sorry... Is it still necessary to have a C++ programmer to package for android (and mac since I'm working with somebody using it)? I've read it was the case some times ago, but I'm using 4.25 and the pluggin may have changed in beetween.

    Thanks

    Leave a comment:


  • replied
    Rama, could you possibly look into these node suggestions?

    -capsule trace with orientation (i hear this exists in C++ but the blueprint capsule trace mysteriously lacks it?)
    -trace by distance and direction nodes: so for example instead of setting end points, you just set a starting point, unit vector direction, and float distance
    -exposed engine quaternion and spherical interpolation functions
    -vector += and -= like you have for floats currently
    -clamp vector and clamp rotator to closest of number given directions, for example returning only 8 directions or 4 directions

    thank you for all your hard work, and for such a wonderfully useful plugin.
    Last edited by Capsu1; 01-03-2021, 01:33 PM.

    Leave a comment:


  • replied
    Originally posted by R4thren View Post

    In case you are still looking for an answer, these settings inside the texture render target should make the image look the same as in the engine

    Click image for larger version Name:	settings.PNG Views:	0 Size:	25.0 KB ID:	1845950
    thx very much. Yes i am still searching .... will try this tomorrow !!

    Leave a comment:


  • replied
    Hey Rama!!
    I think I remember you had a plugin that allowed for much better performance when dealing with thousands of destructible meshes? Thanks man and great to hear from you as always,
    Dj

    Leave a comment:


  • replied
    For the sake of documenting what was a really long struggle getting seeking / start from time / any deeper audio issues with an vorbis OGG -> soundwave importer, i found that UE4 relies on both the RawData and RawPCMData part of a soundwave to perform tasks deeper than just playing audio, the solution i found was to use the SerializeWaveFile function on pcm data to make a normal .wav type rawdata and then set the rawdata that way. I'm not certain if this works in packaged games. Code for setting the RawData:
    Code:
     //SERIALIZE PCM AND FILL IN RAW DATA
    TArray < uint8 > rawSerialized;
    SerializeWaveFile(rawSerialized, sw->RawPCMData, info.SampleDataSize, info.NumChannels, info.SampleRate);
    sw->RawData.Lock(LOCK_READ_WRITE);
    void* LockedData = sw->RawData.Realloc(rawSerialized.Num());
    FMemory::Memcpy(LockedData, rawSerialized.GetData(), info.SampleDataSize);
    sw->RawData.Unlock();
    Full Frankenstein OGG import code:
    Code:
    USoundWave* XXXXXXXXX::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))
    {
    return nullptr;
    }
    else
    {
    sw->SoundGroup = ESoundGroup::SOUNDGROUP_Default;
    sw->NumChannels = info.NumChannels;
    sw->Duration = info.Duration;
    //sw->TotalSamples = info.SampleDataSize;
    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);
    sw->bDecompressedFromOgg = true;
    //SERIALIZE PCM AND FILL IN RAW DATA
    TArray < uint8 > rawSerialized;
    SerializeWaveFile(rawSerialized, sw->RawPCMData, info.SampleDataSize, info.NumChannels, info.SampleRate);
    sw->RawData.Lock(LOCK_READ_WRITE);
    void* LockedData = sw->RawData.Realloc(rawSerialized.Num());
    FMemory::Memcpy(LockedData, rawSerialized.GetData(), info.SampleDataSize);
    sw->RawData.Unlock();
    }
    
    if (!sw) { Success = false; return nullptr; }
    
    Success = true;
    return sw;
    }

    Leave a comment:


  • replied
    Originally posted by R4thren View Post
    Hi,

    Thanks for the great plugin @Rama, It works like a charm and helped me a lot with my game. But I am currently trying to port my game to android and I think it is causing the app to crash (I am on 4.26), I was wondering does this plugin support android? Or am I just doing something wrong and that's the reason for the crash?
    Here the error I am getting before the crash happens.
    Click image for larger version

Name:	crash.PNG
Views:	421
Size:	13.5 KB
ID:	1845946

    Thanks
    I figured it out in case someone is having the same issue:
    Open the .uplugin and add android to the target platform wite list, then build it for android and it works like a charm.
    Thanks again for the great plugin

    Leave a comment:


  • replied
    Originally posted by stucki View Post
    hi, first let me thank you very much for this very useful plugin !!!
    i mainly use it for storing load/savegame thumbs-textures.
    i have one question about it:
    the textures stored seem very dark compared to my screen output of the scene.
    is there any way to get the exact screen output ?
    i tried messing with brightness in the 2d capture texture, but it wont make any difference ...
    kind regards
    stucki
    In case you are still looking for an answer, these settings inside the texture render target should make the image look the same as in the engine

    Click image for larger version  Name:	settings.PNG Views:	0 Size:	25.0 KB ID:	1845950
    Last edited by R4thren; 12-23-2020, 04:25 AM.

    Leave a comment:


  • replied
    Hi,

    Thanks for the great plugin @Rama, It works like a charm and helped me a lot with my game. But I am currently trying to port my game to android and I think it is causing the app to crash (I am on 4.26), I was wondering does this plugin support android? Or am I just doing something wrong and that's the reason for the crash?
    Here the error I am getting before the crash happens.
    Click image for larger version

Name:	crash.PNG
Views:	421
Size:	13.5 KB
ID:	1845946

    Thanks
    Last edited by R4thren; 12-23-2020, 04:09 AM.

    Leave a comment:


  • replied
    hi, first let me thank you very much for this very useful plugin !!!
    i mainly use it for storing load/savegame thumbs-textures.
    i have one question about it:
    the textures stored seem very dark compared to my screen output of the scene.
    is there any way to get the exact screen output ?
    i tried messing with brightness in the 2d capture texture, but it wont make any difference ...
    kind regards
    stucki

    Leave a comment:


  • replied
    Hi,
    I have recently created a plugin to import the audio files with mp3, wav, flac in runtime.
    https://github.com/Respirant/RuntimeAudioImporter

    Leave a comment:


  • replied
    btw I got 4.26 working on a 4.25 version of the victory plugin just by changing one line:

    VictoryPC.cpp:79 to

    auto Request = Http->CreateRequest();

    Was faster than downloading it from the link

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    4.26 Update Is Here!

    Dear Victory Plugin Users,

    Here is 4.26 !!!!
    http://www.mediafire.com/file/0q10k9...gin26.zip/file

    Enjooooooy!



    Rama
    Thank you so much rama ♥

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    4.26 Update Is Here!

    Dear Victory Plugin Users,

    Here is 4.26 !!!!
    http://www.mediafire.com/file/0q10k9...gin26.zip/file

    Enjooooooy!



    Rama
    thank you ~

    Leave a comment:

Working...
X