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 Isaac Nichols View Post
    Hi Rama,

    Is it possible to take the Pawn Sensing function under actors and make it where it can see 360 degrees around? Right now it seems to be locked at 90 degrees. I'm sure it makes sense for a human to not have peripheral vision going to the back of there head however maybe other creatures may have eyes on the back of there head.
    For 360 awareness you can use something much simpler, just a distance check! You just want to get all actors of class and do a vector length squared check with your AI unit

    Let me know if this works!

    Originally posted by Isaac Nichols View Post
    Also,

    Screen Brightness or Gamma. Not sure if this can be done already.
    Ah yes, that is on my list

    Originally posted by J. J. Franzen View Post
    How difficult would it be to add a node that can present 2d image data (aka textures) as an array of vector4s? I would imagine that functionality would be very useful for a lot of people. Just a thought. Cheers,

    J^2
    What do you mean by Vector4s? Are you talking about the Material Editor now? Even though it looks like blueprints that is a completely different system that I cannot so easily add nodes to If you meant something else let me know!

    Do you mean Linear Color when you say Vector4?

    You want an image turned into an array of Linear Colors?

    ~~~

    Any other requests anyone?



    Rama
    Last edited by Rama; 04-12-2015, 11:10 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


      Draw Thick Circle With Axis Control

      Fun node for you!

      With this node you can draw circles!

      And you can control their thickness, as well as how many points make up the circle!

      You can also have axis control!

      So you can draw circles horizontally, vertically, at angles, any way you like, with convenient BP node inputs!

      See pics!

      Click image for larger version

Name:	drawthickcircle3.jpg
Views:	11
Size:	100.4 KB
ID:	1072397

      Click image for larger version

Name:	DrawThickCircle4.jpg
Views:	11
Size:	131.1 KB
ID:	1072398



      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


        Get All Screen Resolutions

        Now works in packaged games!

        You can use this with your UMG menus!

        It gathers data specific to the end user's display adapter, including all available refresh rates

        old but has nice in-game pic
        Click image for larger version

Name:	ScreenResolutions.jpg
Views:	4
Size:	339.4 KB
ID:	1072424

        ~~~

        With Refresh Rates

        Click image for larger version

Name:	Resolutions2BP.jpg
Views:	8
Size:	579.1 KB
ID:	1072426

        ~~~

        No Refresh Rates!

        Click image for larger version

Name:	ResolutionsNoRefreshRates.jpg
Views:	3
Size:	231.4 KB
ID:	1072425

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



        Rama
        Last edited by Rama; 04-12-2015, 06:59 PM.
        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


          70+ Extra BP Nodes For You!

          No c++ required!

          No compile required!

          Download and plug in!

          Latest plugin download is here:
          https://wiki.unrealengine.com/File:VictoryPlugin.zip



          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


            Well I said vector4 since that seems to be how texture data is presented. Basically, I want to be able to get the pixel values of a texture map in a blueprint. For instance, I would like to use a texture map to control placement of actors in a level. As far as I can tell, there's no way to do that currently. Am I wrong?

            J^2

            Comment


              Originally posted by J. J. Franzen View Post
              For instance, I would like to use a texture map to control placement of actors in a level.J^2
              Wow this is a really neat idea!

              I will work on getting you the per-pixel data, as an extended version of my Load Image From File node.



              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


                Hi Rama, I've been using the Load Image node and it's now a vital part of my software! - As you're looking into the node again for this asset placement thing have you thought of an async loader? I'm loading about 20 2k images into an array and the whole engine locks for about 8 secs while this happens. There's a similar node in the 4.8 master which loads URL's async - I've experimented with this to load my images but they arrive out of order so I gave up on it. Also - if you take a look at the source of that node - there's a flag somewhere in it which forces no mipmaps - it might be worth a look to see if you can flag compression or other import options. I of course have no idea with the c++ side as you know so this email is as much as I can contribute.

                Cheers buddy!

                Dan.

                Comment


                  Rama, how do you get this working in packaged games? When I try running a packaged game's .exe, I get the error message "Plugin 'VictoryPlugin' failed to load because module 'VictoryBPLibrary' could not be found. Going by this thread (https://forums.unrealengine.com/show...have-C-Project) I get the impression the source code needs to be compiled into the project, though I haven't tried that yet.

                  Comment


                    Please make a pull request for your "Set Viewport Mouse Position" Nodes
                    Easy to use UMG Mini Map on the UE4 Marketplace.
                    Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

                    Comment


                      Originally posted by YarnBallSoftware View Post
                      om/showthread.php?25009-Plugins-Are-Only-Working-For-People-in-a-Package-Game-if-they-have-C-Project[/url]) I get the impression the source code needs to be compiled into the project, though I haven't tried that yet.
                      After 4.8 happens things will be easier, for now just add an empty Actor class to your project via File->Add Code to project or using the 4.7 way of adding code.

                      Then my plugin will get compiled when your game gets packaged!

                      Originally posted by John Alcatraz View Post
                      Please make a pull request for your "Set Viewport Mouse Position" Nodes
                      Thanks for suggestion John!

                      I will write this down to do


                      Originally posted by Dannington View Post
                      Hi Rama, I've been using the Load Image node and it's now a vital part of my software! - As you're looking into the node again for this asset placement thing have you thought of an async loader? I'm loading about 20 2k images into an array and the whole engine locks for about 8 secs while this happens. ...... lso - if you take a look at the source of that node - there's a flag somewhere in it which forces no mipmaps

                      Cheers buddy!

                      Dan.
                      Yes I am working on my Load Image node right now actually!

                      Async = great idea!

                      option for no mip maps = great idea!

                      Right now I am trying to get the pixels


                      I can multi thread the loading of the image, the issue will be how your BP code will be told properly when the loading process has finished

                      I will probably need an UImageLoader component to organize this and you can ping this Victory Image Loader to to ask it if it has finished loading everything.

                      This component could be added to any actor / a new actor that gets spawned on level start



                      Rama
                      Last edited by Rama; 04-16-2015, 07:37 PM.
                      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! Think you could bang out a node for making a Victory Key? Like we feed a string in the format your Key as String into this node and it gives us the Key struct back? We need to store our Keybindings in a database and storing them as strings would be best. We'd really appreciate it! Your BP nodes are the best!

                        Comment


                          Originally posted by Hudolus View Post
                          Hey Rama! Think you could bang out a node for making a Victory Key? Like we feed a string in the format your Key as String into this node and it gives us the Key struct back? We need to store our Keybindings in a database and storing them as strings would be best. We'd really appreciate it! Your BP nodes are the best!
                          Okay this will be the next thing I work on in my spare time, buuuuut check out my next poooost!
                          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 Image From File, and Retrieve All Pixel Data!

                            Click image for larger version

Name:	LoadImagePixelsBanner.jpg
Views:	1
Size:	172.7 KB
ID:	1074614

                            Dear Community,

                            As requested I've made a node that let's you load an image from file, and get all the pixel data from the image for use in Blueprints!

                            Very conveniently, the pixel data comes in the Linear Color format so you can directly plug your pixels into Print string nodes or any other node that wants a color in UE4 Blueprints!!

                            This node is live as of April 17th, 2015 5:43am version!

                            ~~~

                            Bonus Just For You ~ Get Pixel by Coordinate!

                            And as a bonus, just for you Community members, I've added a node that let's you specify a pixel coordinate and retrieves that value from the pixel data array!

                            ~~~

                            Picture explanation

                            In the top picture I am loading an image at runtime, and then using print string to display the color values of different pixels within the image, notice how they match correctly in a 5 x 5 image! (it blurs cause of how textures work)

                            ~~~

                            BP Implementation

                            Click image for larger version

Name:	LoadImagePixels.jpg
Views:	1
Size:	330.7 KB
ID:	1074612

                            Click image for larger version

Name:	GetImagePixel.jpg
Views:	1
Size:	310.5 KB
ID:	1074613

                            ~~~

                            Indices Start at 0,0

                            Please note that in the image that is 5 x 5, the lower right corner is 4,4 because picture indices start at 0,0 not 1,1.

                            ~~~

                            PNG Format

                            Please make sure to use .png format for small images if you are wanting to use the pixel data to proceduraly generate world, jpg has compression quality loss that destroys pixel-level precision, especially for small files.

                            ~~~

                            Plugin Download ( Tiny file, about 0.5 MB )

                            Latest Download From the UE4 Wiki Site
                            https://wiki.unrealengine.com/File:VictoryPlugin.zip

                            ~~~

                            My C++ Code For You

                            Here's the C++ code for my new node!

                            Code:
                            UTexture2D* UVictoryBPFunctionLibrary::Victory_LoadTexture2D_FromFile_Pixels(const FString& FullFilePath,EJoyImageFormats ImageFormat,bool& IsValid, int32& Width, int32& Height, TArray<FLinearColor>& OutPixels)
                            {
                            	//Clear any previous data
                            	OutPixels.Empty();
                            	
                            	IsValid = false;
                            	UTexture2D* LoadedT2D = NULL;
                            	
                            	IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(FName("ImageWrapper"));
                            	// Note: PNG format.  Other formats are supported
                            	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();
                            			
                            			const TArray<uint8>& ByteArray = *UncompressedBGRA;
                            			//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            			
                            			for(int32 v = 0; v < ByteArray.Num(); v+=4) 
                            			{ 
                            				if(!ByteArray.IsValidIndex(v+3)) 
                            				{ 
                            					break;
                            				}   
                            				  
                            				const uint8& B = ByteArray[v];
                            				const uint8& G = ByteArray[v+1];
                            				const uint8& R = ByteArray[v+2];
                            				const uint8& A = ByteArray[v+3]; 
                            				
                            				OutPixels.Add(FLinearColor(R,G,B,A));
                            			}
                            			//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            			   
                            			//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;
                            	
                            }
                            ~~~

                            C++ Pixel Core

                            Here's the core of my C++ code above where I turn the loaded byte array into Linear Color Pixel data!

                            Note how the provided format is BGRA so I have to re-arrange the values when I send them out to the FLinearColor constructor!

                            Code:
                            const TArray<uint8>& ByteArray = *UncompressedBGRA;
                            
                            for(int32 v = 0; v < ByteArray.Num(); v+=4) 
                            { 
                            	if(!ByteArray.IsValidIndex(v+3)) 
                            	{ 
                            		break;
                            	}   
                            	  
                            	const uint8& B = ByteArray[v];
                            	const uint8& G = ByteArray[v+1];
                            	const uint8& R = ByteArray[v+2];
                            	const uint8& A = ByteArray[v+3]; 
                            	
                            	OutPixels.Add(FLinearColor(R,G,B,A));
                            }
                            ~~~

                            Enjoy!



                            Rama
                            Last edited by Rama; 04-17-2015, 02: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


                              You truly are an unstoppable coding machine, Rama. Thank you! Can't wait to try this out. Is this in the current download? Cheers!

                              J^2

                              Comment


                                Originally posted by J. J. Franzen View Post
                                You truly are an unstoppable coding machine, Rama. Thank you! Can't wait to try this out. Is this in the current download? Cheers!

                                J^2
                                Wait hold on a few minutes!, wait about 2-5 minutes and then get my latest version!

                                I just made the code more efficient by getting the byte data by const reference!

                                ~~~

                                C++ Pixel Core

                                Here's the core of my C++ code above where I turn the loaded byte array into Linear Color Pixel data!

                                Note how the provided format is BGRA so I have to re-arrange the values when I send them out to the FLinearColor constructor!

                                Code:
                                const TArray<uint8>& ByteArray = *UncompressedBGRA;
                                
                                for(int32 v = 0; v < ByteArray.Num(); v+=4) 
                                { 
                                	if(!ByteArray.IsValidIndex(v+3)) 
                                	{ 
                                		break;
                                	}   
                                	  
                                	const uint8& B = ByteArray[v];
                                	const uint8& G = ByteArray[v+1];
                                	const uint8& R = ByteArray[v+2];
                                	const uint8& A = ByteArray[v+3]; 
                                	
                                	OutPixels.Add(FLinearColor(R,G,B,A));
                                }
                                ~~~

                                Plugin Download ( Tiny file, about 0.5 MB )

                                It's ready now, top-most link, April 17th!

                                Latest Download From the UE4 Wiki Site
                                https://wiki.unrealengine.com/File:VictoryPlugin.zip


                                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

                                Working...
                                X