see my last few posts. JayTheWay helped me with loading WAV files. you can use that code to load wav files. tbh it is a more common format for windows users
Yes, I read your posts about .wav and that is my last option. But I donât want to use it right now. The game I am creating is using a radio which loads those audio files at runtime.
The user gets those files by extracting them elsewhere as .ogg (to overcome copyright problems) with an already existing tool. Having the user extract the files as .ogg is more than enough, not everybody knows how to convert to .wav 16-bit so I would like to keep it as simple as possible and use .ogg for imports as it is also much smaller in size (900mb vs. over 4gb in case). So if possible I would like to know how to fix with .ogg
greetings
Apparently 4.24 needs decompressed sample data.
@apfelbaum If you really need to work with .ogg files, you can use 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;
}
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. if the sound bytes are not legal they should not be used at 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. 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.
@ @Everyone Thank you so much for creating 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:
- Is it possible to have multiple materials with the instanced static meshes merged into one?
- 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 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 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 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. 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 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 . 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!
**License**
Copyright 2020 by Nathan "" Iyer
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 permission notice shall be included in 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.
lives! <3
Hahaha, lovely to hear from you !
Wow, your BP exceptions plugin is an amazing technical achievement!
Congratulations!
Victory to You!
Hey @, first of thank you ever so much for the plugin! 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 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 fix would be implemented.
@WE LOVE YOU! <3
@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./blNmtoWyL7M
[USER=â35307â]Walid Chekkouri[/USER] @ @frostic @Traggey @Falconeyi @LordNelson7 @Jaytheway @apfelbaum @EricLiu2018 @Fire_O
plugin is causing errors such as LODs set to hard-coded valueâŚin 4.22.
How can 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 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 for me yet.
hope helps.
Hi guys and @ ,
Wow, Iâm still discovering â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 !
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 , but UE editor crashes when executing:
Thank you again!!
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 '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 ) and export it (or both) to the computer. Maybe for 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->RawPCMDataSize / sizeof(Audio::FResamplerResults);
sw->RawPCMData = (uint8*)FMemory::Malloc(sw->RawPCMDataSize);
FMemory::Memcpy(sw->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 .
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.