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

    Maybe I'm doing something really silly again. But it does not work properly for me. I tested it in the 3rd person template, added 2 levels and added 2 level-stream-volumes to it and then spawned 3 spheres (one for each level). But right off the bat, they are all visible and loaded already even though the other 2 levels are not checked as initially loaded. Note that the meshes that are not spawned by code work properly (not shown on screenshot).
    Click image for larger version

Name:	problem.png
Views:	1
Size:	211.0 KB
ID:	1067422
    Also unloading the levels has no effect for the spheres. So I fear that they are all spawned in the persistent level instead.

    And just a minor thingy, the "Return Value pin" from "Spawn Actor Into Level" must be cast to the actor that I spawned before I can use it, unlike the default build-in "Spawn Actor From Class". Is that intended?
    Last edited by Napoleonite; 03-01-2015, 06:08 PM.

    Comment


      Originally posted by Rama View Post
      Since this BP node is static there's no easy way for me to set a default loading directory, unless I set it for everyone forever, such a default directory could be the working directory of your project where the .uproject is, or the root level of the Content folder

      What do you think?


      @Bruno

      Its more work for me to maintain two split uploads than it is for you to simply remove the parts you dont feel you need

      Keep in mind I do all this without compensation of any kind

      Rama

      Hi Rama - I think it would be handy for built applications to have some kind of handle on where the .exe file is, then you can either build a path relative to that. I tried to make a python script which did that and wrote it to the game.ini file but it didn't seem to write it in a format which your INI reader liked - it couldn't find either the section or the var - I don't know which. Here's my python code (which I was going to turn into an exe which ran in a bat)
      Code:
      #!/usr/bin/env python
      
      import os
      import ConfigParser
      here = os.getcwd()
      
      qDir = here + "\Questions"
      inFile = here + "\Tower_A\Saved\Config\WindowsNoEditor\Game.ini"
      
      print qDir
      print inFile
      
      config = ConfigParser.SafeConfigParser()
      config.add_section('QuestionPath')
      config.set('QuestionPath','questionFolder', qDir)
      
      with open (inFile, 'wb') as configfile:
          config.write(configfile)
      Like i said - it works but the ini reader doesn't like it (I only had a quick go at it)

      Dan

      Comment


        Originally posted by Rama View Post
        @Sanborn and Tea-Rexx

        I dont have a lot of spare time right now, please see what additional intel you can gather on your respective issues and let us know how it goes.

        Sanbordn ~ Not sure, both of the nodes you mention are working great for me in 4.7.1, please investigate further.
        I completely understand, no worries.

        Here's the thing, it actually works on everything BUT my player Pawn. Here's what I think is the real issue:
        Click image for larger version

Name:	BPPenguin.PNG
Views:	1
Size:	45.9 KB
ID:	1067478 Click image for larger version

Name:	WorldOutliner.PNG
Views:	1
Size:	23.3 KB
ID:	1067479 Click image for larger version

Name:	Blueprint.PNG
Views:	1
Size:	91.3 KB
ID:	1067477

        If I use Is Rendered or Is Not Rendered on anything BUT my Pawn it works perfectly fine. If I use it for my Pawn I can't even get the find substring for Penguin to work. There's something about the way the engine is naming the Pawn from Player Start that I'm just not comprehending.

        Comment


          Originally posted by Napoleon View Post
          Maybe I'm doing something really silly again. But it does not work properly for me. I tested it in the 3rd person template, added 2 levels and added 2 level-stream-volumes to it and then spawned 3 spheres (one for each level). But right off the bat, they are all visible and loaded already even though the other 2 levels are not checked as initially loaded.
          I contacted Epic about this issue a while back and was told by a senior Epic engineer that spawning actors directly into sublevels is not a supported functionality, and so the fact that my nodes are not working correctly does not surprise me.

          Spawning into the persistent / main level and then hiding stuff as needed / managing your own level spawn list is the only thing I can recommend given what I've been told



          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


            Originally posted by Dannington View Post
            Hi Rama - I think it would be handy for built applications to have some kind of handle on where the .exe file is
            I can do this quite easily!

            Will make a node for you shortly

            EDIT: New File Path Nodes For you!
            https://forums.unrealengine.com/show...l=1#post234711

            Rama
            Last edited by Rama; 03-03-2015, 01:08 AM.
            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


              Click image for larger version

Name:	Paths.jpg
Views:	6
Size:	78.2 KB
ID:	1067531

              Victory Absolute Paths!
              Live as of March 3rd 2015 build

              Get the File Path to your project .exe, your project root directory, and more!

              These paths are dynamically updated even if you move the entire project to a new location on your computer!

              All these nodes are fully compatible with packaged builds and return absolute paths!

              These nodes also work in Development/Editor builds!

              ~~~

              More Power For You in BP

              Now you can easily create your own folders/files, relative to the project root directory or your project's .exe!

              Please note that in editor builds, the .exe returns your UE4Editor.exe location, but in packaged games it returns your game's .exe

              Click image for larger version

Name:	Paths2.jpg
Views:	7
Size:	298.6 KB
ID:	1067530

              ~~~

              Recommendation:

              I recommend using the Project Game directory for most of your relative path needs! This works the same in Editor and packaged builds!

              You can also get your Saved and Logs folders for your project in both packaged and editor builds!

              UE4 Wiki, Plugin Download Page
              https://wiki.unrealengine.com/File:VictoryPlugin.zip



              Rama
              Last edited by Rama; 03-03-2015, 01:18 AM.
              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


                Originally posted by Rama View Post
                [ATTACH=CONFIG]27882[/ATTACH]

                Victory Absolute Paths!
                Live as of March 3rd 2015 build

                Get the File Path to your project .exe, your project root directory, and more!

                These paths are dynamically updated even if you move the entire project to a new location on your computer!

                All these nodes are fully compatible with packaged builds and return absolute paths!

                These nodes also work in Development/Editor builds!

                ~~~

                More Power For You in BP

                Now you can easily create your own folders/files, relative to the project root directory or your project's .exe!

                Please note that in editor builds, the .exe returns your UE4Editor.exe location, but in packaged games it returns your game's .exe

                [ATTACH=CONFIG]27881[/ATTACH]

                ~~~

                Recommendation:

                I recommend using the Project Game directory for most of your relative path needs! This works the same in Editor and packaged builds!

                You can also get your Saved and Logs folders for your project in both packaged and editor builds!

                UE4 Wiki, Plugin Download Page
                https://wiki.unrealengine.com/File:VictoryPlugin.zip



                Rama
                This is great!

                Awesome!
                Isaac Nichols
                Game Developer & Music Producer - Threaded Pixel Studios
                Currently working on Drones & Ruins a Sci-Fi twin-stick shooter.

                Comment


                  Wow Rama - thanks so much for this, it's really going to help tie together my app which hot-reloads textures a runtime.

                  CHEERS!!!

                  I hope you're getting as much out of these nodes as we are!

                  Comment


                    Originally posted by Rama View Post
                    I contacted Epic about this issue a while back and was told by a senior Epic engineer that spawning actors directly into sublevels is not a supported functionality, and so the fact that my nodes are not working correctly does not surprise me.

                    Spawning into the persistent / main level and then hiding stuff as needed / managing your own level spawn list is the only thing I can recommend given what I've been told



                    Rama
                    That is extremely disappointing... Thanks for the info though.
                    Anyway, for other people, to disable an actor completely:
                    1. set actor hidden in game: true
                    2. set actor enabled collision: false
                    3. set actor tick enabled: false
                    4. add triggerboxes to your level to set/unset the above 3. And don't forget to also disable enemies/AI manually (and projectiles and such!) as well or they'll fall outside of the level. Very messy.
                    Last edited by Napoleonite; 03-03-2015, 05:52 PM.

                    Comment


                      Originally posted by Napoleon View Post
                      That is extremely disappointing... Thanks for the info though.
                      Anyway, for other people, to disable an actor completely:
                      1. set actor hidden in game: true
                      2. set actor enabled collision: false
                      3. set actor tick enabled: false
                      4. add triggerboxes to your level to set/unset the above 3. And don't forget to also disable enemies/AI manually as well or they'll fall outside of the level.
                      Yeah I kind of feel bad because I got him to make the nodes, only to have Epic basically say "Yeah, we don't advise doing that".

                      I feel like these nodes are really the only way we can take advantage of level streaming in a procedural way, so it is kind of sad. I am hoping that Epic gives us that ability in a future release.

                      So I am actually in the process right now of re-working my instancing system so that I can move them around, scale them to 0, etc. I am currently using "Add Instance" node, but you don't have per instance control that way. Trying to use "Add Instanced Static Mesh" which should fit the bill, but haven't had the time or energy lately to figure out why I can't get them working similar to Add Instance.
                      Map Generator 1.0
                      Map Generator 2.0
                      Map Generator 3.0

                      Comment


                        Hi Rama - should there be a March 3rd build on the end of that link? I can only see a Feb 25th one.

                        Cheers Buddy!

                        Comment


                          Originally posted by Dannington View Post
                          Hi Rama - should there be a March 3rd build on the end of that link? I can only see a Feb 25th one.

                          Cheers Buddy!
                          Hi there!

                          The wiki is having problems right now, system wide, on my screen it lists two Feb 25ths

                          Do you see two feb 2ths?

                          EDIT:

                          I uploaded a second time and now I see A March 3rd and a March 4th

                          So I agree it was wonky before

                          but you should have two builds to choose from now, March 3rd or March 4th, either will have your new Victory Path nodes in them!

                          UE4 Wiki, Plugin Download Page
                          https://wiki.unrealengine.com/File:VictoryPlugin.zip

                          ~~~

                          Talking about these new nodes!

                          You can use these nodes to get the file path to your project directory in a editor or packaged game!

                          Click image for larger version

Name:	Paths2.jpg
Views:	7
Size:	298.6 KB
ID:	1067653

                          Enjoy!

                          Rama
                          Last edited by Rama; 03-04-2015, 07:24 AM.
                          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


                            Load Texture 2D From File!

                            JPG, PNG, BMP, ICO, EXR, and ICNS are Supported File Formats !


                            With this node you can load a Texture 2D from a file during runtime!

                            I output for you the width and height of the loaded image!

                            Now you can easily create Texture 2D's from image files in Blueprints, during runtime!

                            ~~~

                            Special Note!

                            Tim Sweeney liked this node!


                            Enjoy!

                            Rama

                            PS: Make sure to include the file extension when you use this node!

                            Click image for larger version

Name:	LoadImageFromFile.jpg
Views:	8
Size:	238.0 KB
ID:	1067667

                            Click image for larger version

Name:	LoadImageFromFile2.jpg
Views:	8
Size:	201.0 KB
ID:	1067668

                            ~~~

                            C++ Code For You

                            Here is the core C++ function involved, entire source is in the download! I wrote my own Enum for the file formats.

                            Code:
                            UTexture2D* UVictoryBPFunctionLibrary::Victory_LoadTexture2D_FromFile(const FString& FullFilePath,EJoyImageFormats ImageFormat, bool& IsValid,int32& Width, int32& Height)
                            {
                            	IsValid = false;
                            	UTexture2D* LoadedT2D = NULL;
                            	
                            	IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(FName("ImageWrapper"));
                            	
                            	IImageWrapperPtr ImageWrapper = ImageWrapperModule.CreateImageWrapper(GetJoyImageFormat(ImageFormat));
                             
                            	//Load From File
                            	TArray<uint8> RawFileData;
                            	if (!FFileHelper::LoadFileToArray(RawFileData, * FullFilePath)) 
                            	{
                            		return NULL;
                            	}
                            	
                            	  
                            	//Create T2D!
                            	if (ImageWrapper.IsValid() && ImageWrapper->SetCompressed(RawFileData.GetData(), RawFileData.Num()))
                            	{ 
                            		const TArray<uint8>* UncompressedBGRA = NULL;
                            		if (ImageWrapper->GetRaw(ERGBFormat::BGRA, 8, UncompressedBGRA))
                            		{
                            			LoadedT2D = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_B8G8R8A8);
                            			
                            			//Valid?
                            			if (!LoadedT2D) 
                            			{
                            				return NULL;
                            			}
                            			
                            			//Out!
                            			Width = ImageWrapper->GetWidth();
                            			Height = ImageWrapper->GetHeight();
                            			 
                            			//Copy!
                            			void* TextureData = LoadedT2D->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
                            			FMemory::Memcpy(TextureData, UncompressedBGRA->GetData(), UncompressedBGRA->Num());
                            			LoadedT2D->PlatformData->Mips[0].BulkData.Unlock();
                            
                            			//Update!
                            			LoadedT2D->UpdateResource();
                            		}
                            	}
                            	 
                            	// Success!
                            	IsValid = true;
                            	return LoadedT2D;
                            }
                            ~~~

                            Download Link (6.5mb)

                            UE4 Wiki, Plugin Download Page
                            https://wiki.unrealengine.com/File:VictoryPlugin.zip



                            Rama
                            Last edited by Rama; 03-04-2015, 11:58 AM.
                            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


                              Epic should employ you Rama. Enough said.

                              Comment


                                Anyone else get the rag-doll system to work? Iv'e tried and tried but haven't yet. I cant figure out what I'm doing wrong.

                                If this isnt too much to ask, could you possibly do a video tutorial of how the ragdoll system works? Including your Physical Asset properties, and the view-port of your character BP? Iv'e been trying for about an hour and a half now. Ive got a good ragdoll in my physical asset for my character, and everything seems like it should work, but I keep getting weird results no matter what I try.
                                Last edited by c.longmire42; 03-04-2015, 07:57 PM.

                                Comment

                                Working...
                                X