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

    Originally posted by saga revolver View Post
    Hi, we are trying to compile in 4.24 without success. We are getting this error:

    Code:
    Severity Code Description Project File Line Suppression State
    Error LNK2001 unresolved external symbol "__declspec(dllimport) struct FThreadSafeStaticStat<struct FStat_STAT_PhysSceneWriteLock> StatPtr_STAT_PhysSceneWriteLock" (__imp_?StatPtr_STAT_PhysSceneWriteLock@@3U?$FThreadSafeStaticStat@UFStat_STAT_PhysSceneWriteLock@@@@A) Wardens D:\Revolver\Wardens\Intermediate\ProjectFiles\Module.VictoryBPLibrary.cpp.obj 1
    If someone was able to compile, please give us help.
    Thank you.
    Modify VictoryBPLibrary.Build.cs

    Add "ApexDestruction" to PublicDependencyModuleNames
    Add "APEX" to PrivateDependencyModuleNames

    Code:
    // Some copyright should be here...
    
    using UnrealBuildTool;
    
    public class VictoryBPLibrary : ModuleRules
    {
        public VictoryBPLibrary(ReadOnlyTargetRules Target) : base(Target)
        { 
            PrivatePCHHeaderFile = "Private/VictoryBPLibraryPrivatePCH.h";
    
            //4.15 Include What You Use
            bEnforceIWYU = false;
    
            PublicIncludePaths.AddRange(
                new string[] {
                    "VictoryBPLibrary/Public"
    
                    // ... add public include paths required here ...
                }
                );
    
    
            PrivateIncludePaths.AddRange(
                new string[] {
                    "VictoryBPLibrary/Private",
    
                    // ... add other private include paths required here ...
                }
                );
    
    
            PublicDependencyModuleNames.AddRange(
                new string[]
                {
                    "Core",
                    "ApexDestruction"
    
                    // ... add other public dependencies that you statically link with here ...
                }
                );
    
    
            PrivateDependencyModuleNames.AddRange(
                new string[]
                {
                    "CoreUObject", 
                    "Engine", 
                    "InputCore",
    
                    "RHI",
                    "RenderCore",
    
                    "HTTP",
                    "UMG", "Slate", "SlateCore",
    
                    "ImageWrapper",
    
                    "PhysicsCore", 
                    "PhysX", 
    
                    "HeadMountedDisplay",
    
                    "AIModule",
    
                    "NavigationSystem",
    
                    "Vorbis",
    
                    //FPlatformApplicationMisc
                    "ApplicationCore",
                    "APEX"
                }
                );
    
            //APEX EXCLUSIONS
            /*
            if (Target.Platform != UnrealTargetPlatform.Android && Target.Platform != UnrealTargetPlatform.IOS)
            {
                PrivateDependencyModuleNames.AddRange(
                new string[]
                {
                    "APEX"
                }
                );
    
                PublicDependencyModuleNames.AddRange(
                new string[]
                {
                    "ApexDestruction"
                }
                );
    
            }
            */
    
            DynamicallyLoadedModuleNames.AddRange(
                new string[]
                {
                    // ... add any modules that your module loads dynamically here ...
                }
                );
        }
    }

    Comment


      Great plugin, has many really really useful functionalities.
      There is (at least) one problem with the 'GetSoundWaveFromFile' node. The file gets somehow loaded, I checked with 'is valid' and also printed the loaded sound wave with a 'GetDisplayName'. But as soon I try to play the sound file the following error message occurs.

      LogAudioDerivedData: Warning: Can't cook SoundWave /Script/Engine.SoundWave:SoundWave_0 because there is no source compressed or uncompressed PC sound data

      I downloaded Plugin for 4.24 and that is also the engine version I use. I also use .ogg files. I don't know wether special conditions for the.ogg files exist, I tried a few things
      (different sample rate/bitrate) and never succeeded.
      I also don't run any plugins besides Victory nor modified the engine. The engine is a clean and fresh install.

      best regards

      Comment


        Originally posted by apfelbaum View Post
        Great plugin, has many really really useful functionalities.
        There is (at least) one problem with the 'GetSoundWaveFromFile' node. The file gets somehow loaded, I checked with 'is valid' and also printed the loaded sound wave with a 'GetDisplayName'. But as soon I try to play the sound file the following error message occurs.

        LogAudioDerivedData: Warning: Can't cook SoundWave /Script/Engine.SoundWave:SoundWave_0 because there is no source compressed or uncompressed PC sound data

        I downloaded Plugin for 4.24 and that is also the engine version I use. I also use .ogg files. I don't know wether special conditions for the.ogg files exist, I tried a few things
        (different sample rate/bitrate) and never succeeded.
        I also don't run any plugins besides Victory nor modified the engine. The engine is a clean and fresh install.

        best regards
        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
        Matt Walton: Programmer and owner for WireLiteSoft Games.

        Comment


          Originally posted by frostic View Post

          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 this case). So if possible I would like to know how to fix this with .ogg :-)

          greetings

          Comment


            Originally posted by apfelbaum View Post

            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 this case). So if possible I would like to know how to fix this with .ogg :-)

            greetings
            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:

            Code:
            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:
            Code:
                    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
            Code:
            #include "Runtime/Engine/Public/VorbisAudioInfo.h"
            And add "Vorbis" to your project's .Build.cs:

            Click image for larger version  Name:	Annotation-20200113-124610.png Views:	0 Size:	14.4 KB ID:	1707889
            Last edited by Jaytheway; 01-13-2020, 08:03 AM.

            Comment


              Originally posted by apfelbaum View Post

              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 this case). So if possible I would like to know how to fix this with .ogg :-)

              greetings
              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.
              Last edited by frostic; 01-14-2020, 02:59 PM. Reason: added more info
              Matt Walton: Programmer and owner for WireLiteSoft Games.

              Comment


                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!

                Comment


                  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).

                  Comment


                    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.

                    Comment


                      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!



                      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.

                      100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                      Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                      Comment


                        Rama lives! <3
                        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                        Comment


                          Originally posted by BrUnO XaVIeR View Post
                          Rama lives! <3
                          Hahaha, lovely to hear from you BrUnO XaVIeR !

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

                          Congratulations!

                          Victory to You!



                          Rama
                          100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                          UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                          Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                          Comment


                            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.
                            Last edited by Traggey; 02-19-2020, 01:24 PM.

                            Comment


                              Rama WE LOVE YOU! <3
                              Matt Walton: Programmer and owner for WireLiteSoft Games.

                              Comment


                                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

                                Comment

                                Working...
                                X