Download

(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Hey Rama,

I noticed minor mistake while using your rotation/vector conversion nodes:
2015-08-09_15-07-33.png
The tooltips say opposite of what they do!

Edit: Also I just found out that there’s a node called RotationFromXVector that does the same thing, but yours is named a lot more clearly/easier to understand.

Yay! Great to hear from you Jacky!

Ahh thanks for pointing that out, I’ve fixed the comments in my local version, and it will be in my next update!

:slight_smile:

You’re welcome, I hope my animated vertices of skeletal meshes BP node takes your thesis research to the next level!

:slight_smile:

Rama

Get a Float as a String, With Precision and Optional Leading 0 !

8972b9ac2a0bda258dccf2e561750858aa4c6454.jpeg

Dear Community,

I’ve updated my Get Float As String With Precision node to

  1. Be pure (no exec chain)

  2. Utilize Epic’s FText C++ code to leverage all of their hard work on float decimal precision.

  3. Add bool to make the leading 0 optional, so 0.5 could be shown as 0.5 or .5 depending on your preferences!

Yay!


**My C++ Code For You!**

Here's how it works in C++ !



```


void UVictoryBPFunctionLibrary::StringConversion__GetFloatAsStringWithPrecision(float TheFloat, FString & FloatString, uint8 Precision, bool IncludeLeadingZero)
{ 
	FNumberFormattingOptions NumberFormat;					//Text.h
	NumberFormat.MinimumIntegralDigits = **(IncludeLeadingZero) ? 1 : 0;**
	NumberFormat.MaximumIntegralDigits = 10000;
	NumberFormat.MinimumFractionalDigits = **Precision;**
	NumberFormat.MaximumFractionalDigits = **Precision; **
	FloatString = FText::AsNumber(**TheFloat**, &NumberFormat).ToString();
}


```



**Latest plugin download is here: (about 8 mb) **
https://wiki.unrealengine.com/File:VictoryPlugin.zip

Enjoy!

:slight_smile:

Rama

Ragarding the ability to save the Color Array to a Texture2D:

Have you get anything to work?

you have deleted the victory rebind key ? with the new plugin i have error about that*
btw awesome plugin
you are a time saver

Hi Rama,

This plugin is awesome! Very handy thank you.

I am having an issue with the Capture Component 2d Save Image node. It works well when I play in editor, however when it is packaged into an exe, the game crashes whenever I trigger the save image node. (See image attached)

22c536d09b2420237750dfa7775325491c570ab6.png

Is this a known issue?

ok, i figured out how do it.**

Rama Key Rebinding During Runtime System

I have a 4.8 updated version of my Key Rebinding project here, which now includes axis bindings!

https://forums.unrealengine.com/showthread.php?51449-Full-Project-Rama-s-UMG-Rebindable-Key-System-Rebind-keys-at-Runtime!

My Victory BP Plugin has the new and updated nodes I use in the project

:slight_smile:

Rama

Capture Component 2D ~ Save Image ~ Crashing in Packaged Games

Yes this is a known issue, I did not develop that particular node, I am forwarding your report and hopefully it will get resolved!

:slight_smile:

Rama

**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!

5e04c4d83d602f944fb2cfd946e90787f3b20f70.jpeg

LoadImageFromFile.jpg


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



```


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;
}


```



**Latest plugin download on the UE4 Wiki: (8 mb) **
https://wiki.unrealengine.com/File:VictoryPlugin.zip


**Victory Plugin on Media Fire**

If your browser is not updating the Wiki download page to the most recent version, you can use my alternative Media Fire download link!

Please note clicking this link will not start a download instantly, it will just take you to the Media Fire file description.

https://www.mediafire.com/?g6uf9kt5ueb2upj

Enjoy!

:)

Rama

Hey Rama, what’s new about the node? You have already posted it here: https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=210419&viewfull=1#post210419 Your last post seems to be the exact same one, I’m just a bit confused :confused:

It’s not that there’s anything new, if there is I will tell you, I repost nodes periodically for newcomers and as reminders for people who’ve not tried certain nodes yet.

I also do this to recenter the thread on its focus of being a whole bunch of extra BP nodes that I am giving to the Community to play with!

I hope you are having fun today!

:heart:

Rama

Thanks again for the sound class blueprint, helped so much.

Sound Classes SFX/Music Separate Sliders

Thanks again for the “Victory Sound Volume Change” and “Victory Get Sound Volume” class blueprint, helped so much. Best part about it, I didn’t even have to create save object files for the setting. It automatically saves the volume for you.

I even made a short tutorial on how to use it.
https://youtube.com/watch?v=2GAnri2fjQI

I thought this was going to be more complicated but realized it was really easy to set up.

Isaac

Old code :slight_smile:
Fix incoming soon’ish.
New code is directly from released versions of Ground Branch, which has been packaged into an exe multiple times.
Stay tuned :slight_smile:

**Improved Get Vertex Locations of Static Mesh

Now works in Packaged Games**

560b4f2b24fb116ffc5c2ddfd4f04754501ad6c2.jpeg

VertexLocationsV2.jpg

My C++ Code For You

See my PhysX wiki for the basic build.cs setup:
https://wiki.unrealengine.com/PhysX,_Integrating_PhysX_Code_into_Your_Project

Here is the code I wrote to get all of the transformed vertex positions using the Body Instance and PhysX code!

I am doing many safety checks to ensure the Body Instance data is valid before utilizing it, and the result is that now you can get accurate vertex locations in packaged games!



//~~~ PhysX ~~~
#include "PhysXIncludes.h"
#include "PhysicsPublic.h"		//For the ptou conversions
//~~~~~~~~~~~

//Get Transformed Vertex positions of any static mesh! -Rama
bool UVictoryBPFunctionLibrary::GetStaticMeshVertexLocations(UStaticMeshComponent* Comp, TArray<FVector>& VertexPositions)
{
	
	if(!Comp || !Comp->IsValidLowLevel()) 
	{
		return false;
	}
	//~~~~~~~~~~~~~~~~~~~~~~~
	
	//Component Transform
	FTransform RV_Transform = Comp->GetComponentTransform(); 
	
	//Body Setup valid?
	UBodySetup* BodySetup = Comp->GetBodySetup();
	
	if(!BodySetup || !BodySetup->IsValidLowLevel())
	{
		return false;
	}  
	
	//Get the Px Mesh!
	PxTriangleMesh* TriMesh = BodySetup->TriMesh;
	 
	if(!TriMesh) 
	{
		return false;
	}
	//~~~~~~~~~~~~~~~~
	
	//Number of vertices
	PxU32 VertexCount 			= TriMesh->getNbVertices();
	
	//Vertex array
	const PxVec3* Vertices 	= TriMesh->getVertices();
	
	//For each vertex, transform the position to match the component Transform 
	for(PxU32 v = 0; v < VertexCount; v++)
	{ 
		VertexPositions.Add(RV_Transform.TransformPosition(P2UVector(Vertices[v])));
	}
	
	return true;
} 


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

Enjoy!

:slight_smile:

Rama

Can someone tell me how “Create Texture Render Target 2D” works correctly? I try to use it to create icons of meshes that have up to three different, user-chosen colors (so I can’t use simple textures and tint them). I do it in front of a pink (255,0,255) screen and set up the clear color to match the color of the screen but the output looks like this:

https://forums.unrealengine.com/attachment.php?attachmentid=53182&stc=1&d=1439973522

The greenish color is the button behind the image.

It’s supposed to look like this:

https://forums.unrealengine.com/attachment.php?attachmentid=53183&stc=1&d=1439973525

Minus the pink color.

Hello all,

I am trying to convert a group of spawned static meshes into an Instanced Static Mesh, and then Spawn multiple copies of that ISM, using blueprints. the “Victory ISM Convert to Victory ISM Actors” Node works great, but I can’t for the life of me figure out the 2nd part which is spawning multiple copy’s of that created ISMActor into the level. Can someone please give me some tips on this blueprint setup? Which nodes do I need to use to Spawn that Victory ISMActor properly?

An update for this is on the way - Rama contact me about it the other day :slight_smile:
New version swaps the red / blue channels and sets the alpha based on the clear colour RGB values.

New and Improved Save Texture Render Target 2D Image To Disk

Dear Community,

Community Member Kris has updated the “CaptureComponent2D_SaveImage” BP node in my Victory BP Library!

This latest version has been tested in packaged games and has been packaged and tested many times for Kris’s UE4 game Ground Branch.


**Capture Component 2D ~ Save Image To Disk**

![731a51f10583d865d90efd269acfc1bb44ce318d.jpeg|979x270](upload://gqfizKaSrfxrtxPGfEqh3g8MTPn.jpeg)

![CaptureComponentPictureByKris2.jpg|1266x758](upload://efn34WDbN2KB796l4527vMfvgyf.jpeg)

Overview

This node let’s you save a snapshot from your Capture Component 2D as an image file on your hard disk!

If your scene capture component is not set to update every tick, make sure to use Kris’s method of moving the component to force an update.

Supply the filename of your choosing, making sure to supply an absolute path (“C:/YourDir/NewImage.png” for example).

You can check out my Victory BP File Path Nodes to assist in this process.

Thank you Kris for contributing such a valueable node to my Victory Plugin!

:slight_smile:


**Latest plugin download on the UE4 Wiki: (8 mb) **
https://wiki.unrealengine.com/File:VictoryPlugin.zip

Victory Plugin on Media Fire

If your browser is not updating the Wiki download page to the most recent version, you can use my alternative Media Fire download link!

Please note clicking this link will not start a download instantly, it will just take you to the Media Fire file description.

Enjoy!

:slight_smile:

Rama