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

    Taking Simple BP Node Requests

    Anyone have a simple thing they'd like to have added to Blueprints?

    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


      What about more array manipulating nodes?

      Comment


        New Node as of 9/25/14

        Draw Thick Circle With Axis Control

        New 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:	DrawThickCircle.jpg
Views:	1
Size:	105.1 KB
ID:	1057072

        Click image for larger version

Name:	drawthickcircle2.jpg
Views:	2
Size:	99.7 KB
ID:	1057073

        Click image for larger version

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

        Click image for larger version

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

        Rama
        Last edited by Rama; 09-25-2014, 09: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


          I don't think I can use this yet but that draw circle system looks awesome!
          Last edited by Isaac Nichols; 09-25-2014, 10:33 AM.
          Isaac Nichols
          Game Developer & Music Producer - Threaded Pixel Studios
          Currently working on Drones & Ruins a Sci-Fi twin-stick shooter.

          Comment


            Does this work on Mac? If it does it looks like a dream come true.
            Also, is there a clear list of all the available nodes included in it with a brief description? I know there's a lot of that here but it's kinda hard to scroll through on multiple pages.

            Comment


              Originally posted by 0vr View Post
              Does this work on Mac? If it does it looks like a dream come true.
              Also, is there a clear list of all the available nodes included in it with a brief description? I know there's a lot of that here but it's kinda hard to scroll through on multiple pages.
              ~~~

              Mac

              Yes! The draw circle will work on Mac!

              UE4 has its own platform-agnostic rendering system and my Draw Circle BP node uses this system.

              ~~~

              Rama's BP List

              Install my plugin (it's free) and right click in any blueprint and type into the search filter "Victory"

              Make sure you dont have a pin selected/dragged from, just regular right click, context sensitivity shouldn't matter.



              I put all my nodes under one category heading so they are easy to find

              ~~~

              50-60 BP Nodes For You

              I can't actually write out the whole list here in this thread though cause there's 50-60+ of them now (I've lost count)

              Rama
              Last edited by Rama; 09-26-2014, 01:35 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


                Hello Rama,

                I may have something for your consideration.

                Firstly, I was using your get Viewport Center & Set Mouse Position BP nodes to force the mouse cursor to center to screen (to be same location as the First person camera crosshair).

                The reason I did that was so I can use the

                -Enable Click events
                -Enable Mouse Over Events

                in first person view.

                They worked fine, & you can highlight & pick objects like you are in the editor or the poker game using the first person camera view. Since the mouse is set the same location as my crosshaor, it appears that I am interacting with objects with the cross hair, but actually using the mouse (which is of course hidden).

                However, I met with a major issue (while will surely be an issue in a release game), is that the mouse stayed locked to the center of viewport, even when you alt-tab to other applications! I can set a bool or condition unlock it on certain conditions (like pressing escape or exit), but I think in the end, its too risky in a released game, & I am scraping this method of using using mouse over event to detecting item & picking up item in lie of sight, which is s shame as its trace very well, no matter if the object is big or small.

                I am now exploring the raytrace options of detecting objects in game. However, I thought it would really be useful if you can made a

                -Enable Click events
                -Enable Cursor Over Events

                for the first/third person camera cursor. I think it will really be helpful for many people.
                Last edited by starseeker; 09-27-2014, 12:51 PM.
                Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

                Comment


                  Originally posted by starseeker View Post
                  Hello Rama,

                  I may have something for your consideration.

                  Firstly, I was using your get Viewport Center & Set Mouse Position BP nodes to force the mouse cursor to center to screen (to be same location as the First person camera crosshair).

                  The reason I did that was so I can use the

                  -Enable Click events
                  -Enable Mouse Over Events

                  in first person view.

                  They worked fine, & you can highlight & pick objects like you are in the editor or the poker game using the first person camera view. Since the mouse is set the same location as my crosshaor, it appears that I am interacting with objects with the cross hair, but actually using the mouse (which is of course hidden).

                  However, I met with a major issue (while will surely be an issue in a release game), is that the mouse stayed locked to the center of viewport, even when you alt-tab to other applications! I can set a bool or condition unlock it on certain conditions (like pressing escape or exit), but I think in the end, its too risky in a released game,
                  Solution Already Exists

                  I already have an easy solution for this!

                  I have a node that lets you perform actions if the UE4 game is not the foreground window of the OS ! This works in packaged games!

                  So you are setting the mouse cursor to be center of screen, you can use my node to stop doing that if the user tabs out / the ue4 game is not the foreground window any more

                  I have pictures of this node here:

                  https://forums.unrealengine.com/show...ll=1#post26153

                  ~~~

                  Better Solution

                  Why are you not just getting the center of the viewport and using the player controller deproject node to get the world space position of center of screen, and then tracing in the direction of the camera?

                  steps

                  1. get viewport center of screen
                  2. get player controller 0 -> get deprojected position (screen to world)
                  3. get the viewing rotation of the player's camera and trace in that direction
                  (rotation->As X Vector)

                  You can use my tracedata nodes to simplify the tracing process.


                  then you dont need to set the mouse at all!


                  Victory BP Node ~ Get Center of Viewport

                  I already gave you a node in my most recent download (if you dont have it in your version of the Victory BP Library Plugin) to get the viewport center!

                  So just follow my 3 steps above and you are set, no mouse cursor involved, as long as it is the center of the screen you want

                  Code:
                  bool UVictoryBPFunctionLibrary::Viewport__GetCenterOfViewport(const APlayerController * ThePC, float & PosX, float & PosY)
                  {

                  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


                    I am using the tracing solution now, so all (mostly) is good. The node that let you perform actions if the UE4 game is not the foreground window of the OS will be useful in a package game. Thanks.
                    Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

                    Comment


                      @Rama, here's another node that might be useful with the other texture related nodes.

                      It uses Zoid's Dynamic Texture update method, and lets you pass in an array of FColors as the texture data.

                      I have it set here to do the whole texture at once because supposedly sub-regions don't work, but I haven't tested that yet. I've tested out the updating in general and it does work, though some of the streaming settings on the UTexture2D need to be set (so it may not work on UTexture2Ds that come out of the TextureFromDisk node, without a minor change there).

                      If sub-regions do work, it'd be really nice to change this to pass in the region data (source X/Y, dest X/Y, basically).

                      If you ever figure out how to raycast and get a UV coordinate, this would be the perfect second piece to allow for dynamic decals on skinned meshes (the update happens in the render thread, and is quite fast).

                      https://wiki.unrealengine.com/Dynamic_Textures (UpdateTextureRegions is what you want)

                      Code:
                      	
                              /** Updates a UTexture2D* from an FColor array.
                      	* Update texture from color data.
                      	* @param ColorData		Array of FColors to update this texture with. Array is assumed to be the same dimensions as texture, otherwise this call will fail.
                      	* @param Texture		Texture to update.
                      	*/
                      	UFUNCTION(BlueprintCallable, Category = "TextureFromDisk")
                      	static void UpdateTextureFromColorData(TArray<FColor>& ColorData, UTexture2D* Texture);
                      And the definition:

                      Code:
                      void UTextureFromDiskFunctionLibrary::UpdateTextureFromColorData(TArray<FColor>& ColorData, UTexture2D* Texture)
                      {
                      	// Sanity checks.
                      	if (!Texture)
                      		return;
                      
                      	if (ColorData.Num() <= 0)
                      		return;
                      
                      	// Update region.
                      	FUpdateTextureRegion2D *region = new FUpdateTextureRegion2D(0, 0, 0, 0, Texture->GetSurfaceWidth(), Texture->GetSurfaceHeight());
                      
                      	// Call the render command.
                      	UpdateTextureRegions(Texture, 0, 1, region, Texture->GetSurfaceWidth() * 4, 4, (uint8*)ColorData.GetTypedData(), false);
                      }
                      Right now the way it's set up it will leak the FUpdateTexture2D - so you may want to change UpdateTextureRegions to free the FUpdateTextureRegion2D but NOT the SrcData pointer, because that refers to your TArray of FColors, which you don't want freed.

                      To fix that, change this in UpdateTextureRegions

                      Code:
                      	
                      	if (bFreeData)
                      	{
                      		FMemory::Free(RegionData->Regions);
                      		FMemory::Free(RegionData->SrcData);
                      	}
                      to this:

                      Code:
                      	if (bFreeData)
                      	{
                      		FMemory::Free(RegionData->Regions);
                      	}
                      If you change this, make sure to change the last parameter for UpdateTextureRegions to be true, so it will actually free the FUpdateTextureRegion2D.
                      Storyteller - An immersive VR audiobook player

                      Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                      Comment


                        Hey Rama, are you still taking requests?

                        If yes, would it be possible to add something like this?

                        Comment


                          Originally posted by n00854180t View Post
                          @Rama, here's another node that might be useful with the other texture related nodes.

                          It uses Zoid's Dynamic Texture update method, and lets you pass in an array of FColors as the texture data.

                          I have it set here to do the whole texture at once because supposedly sub-regions don't work, but I haven't tested that yet. I've tested out the updating in general and it does work, though some of the streaming settings on the UTexture2D need to be set (so it may not work on UTexture2Ds that come out of the TextureFromDisk node, without a minor change there).

                          If sub-regions do work, it'd be really nice to change this to pass in the region data (source X/Y, dest X/Y, basically).

                          If you ever figure out how to raycast and get a UV coordinate, this would be the perfect second piece to allow for dynamic decals on skinned meshes (the update happens in the render thread, and is quite fast).

                          https://wiki.unrealengine.com/Dynamic_Textures (UpdateTextureRegions is what you want)
                          Hi there!

                          What is the benefit of this function / BP node?

                          Any sort of pictoral example?

                          Thanks!

                          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 Thommie View Post
                            Hey Rama, are you still taking requests?

                            If yes, would it be possible to add something like this?
                            Yes I can surely do that, but can you be specific about what you want this node for?

                            If you just want to store data you should use a BP of the GameInstance class, or you can use the globally accessible Game Data object that I describe in my wiki here, already implemented by Epic for storing data in a UObject format:

                            https://wiki.unrealengine.com/Global...During_Runtime!



                            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 Rama View Post
                              Hi there!

                              What is the benefit of this function / BP node?

                              Any sort of pictoral example?

                              Thanks!

                              Rama
                              I don't have a pictorial example, but it allows you to update any Texture2D surface with new color data at runtime in a threaded manner (the render command puts it into the rendering thread, so the game thread won't hitch). I use it myself for updating a Texture2D with large amounts image data from disk so it won't hitch/pause the game thread.

                              It could be useful for a lot of things, like doing a live painting application (would need to figure out UV raycasting, though, to know where to put the color data when the user presses), bullet holes/slashes on skinned meshes (again needs UVs tho), or any number of things.
                              Storyteller - An immersive VR audiobook player

                              Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                              Comment


                                Originally posted by n00854180t View Post
                                I don't have a pictorial example, but it allows you to update any Texture2D surface with new color data at runtime in a threaded manner (the render command puts it into the rendering thread, so the game thread won't hitch). I use it myself for updating a Texture2D with large amounts image data from disk so it won't hitch/pause the game thread.

                                It could be useful for a lot of things, like doing a live painting application (would need to figure out UV raycasting, though, to know where to put the color data when the user presses), bullet holes/slashes on skinned meshes (again needs UVs tho), or any number of things.
                                Oh that does sound neat!

                                Well if you'd like, you could download my latest plugin version, add the relevant code to the specifications that you know are correct, and then you could pm me when ready!

                                Have fun today!

                                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