Download

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

Currently In-Engine: Min and Max of Int/Float Array!

4 New Nodes

**Max of Float Array

Max of Int Array

Min of Float Array

Min of Int Array**

Returns the max/min value as well as the index in the array of that value!

Please note that I submitted the C++ code for these nodes to Epic and they were accepted into the Engine!

You can access these nodes right now!

See pic!


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

**Latest plugin packaged binaries, Win32 Shipping and Win64 Development on UE4 Wiki: **
https://wiki.unrealengine.com/File:VictoryPluginPackaged.zip

Enjoy!

:)

Rama

I have no idea why it does what it does. This is just a cube exported from blender.

Check the node called WorldAlignedTexture. You can project a texture on z, xy and xyz. So you can make statues or other meshes with constant texture on them. It won’t look perfect but it is something.
Btw did you manage to make extrude and other actions that can be done in 3dsmax?

Edit: I think there are twice v then vn because the cube is not smooth so each edge consider it’s faces as seperated meshes. This is why you will see a bigger verts count inside a game engine.

Hey Rama, you have these 2 nodes in your plugin:

f165139ec9.png
e5451cc416.png

So I can load a Texture from a file and get a PixelArray and I can also get a specific pixel value from a PixelArray, thats awesome. But what I would like to see is to also get the PixelArray from an existing Texture2D or an existing RenderTarget2D. Would that be possible to add as a node? I searched for a way to do this through blueprint and I only found a lot of people asking for how to do it but no answer except “use c++” :slight_smile:

Cheers!

Hey Rama,

Did god send you down from the heavens to assist me in making a game that will transcend time and space to deliver the most entertainments we can currently conceive of?

If yes, thanks!

This is a rather massive project for me to work on at the moment give my current work load, I will keep it in mind though! I think its time for you to do more C++ yourself and then maybe I could help out along the way :slight_smile:

Keep in mind I do offer tutoring sessions in UE4 C++!

:slight_smile:

Rama

Yes

Yes, and I am pretty sure you came to help many others have fun too!

:slight_smile:

Rama

Thine request is granted, see below!

:slight_smile:

Rama

Load Pixel or Pixels from Texture 2D to complete Rama’s Texture BP Node Suite!

Dear Community,

I’ve now completed my suite of Image BP Nodes!

You can now get a single pixel or the entire pixel array from a Texture2D!

  1. Get Pixel From T2D
  2. Get Pixels Array From T2D!

I’ve tested and verified that these nodes work with all my other pixel nodes, including:

  1. Get Pixel (By Coordinates, Row,Col)
  2. Save Pixels To File
  3. Load Image From File

Yay!


**Image Made Via Victory BP Library**

Here I make a 3x3 image and set several color values.

I use my Victory BP Library to save these pixels to a file on my computer, creating my own PNG image!

![c0d81d34a1fd66e902e30b32184b292819fb84c1.jpeg|1275x818](upload://rvYHbNdTdAo1W5F3QHTdv36W6xX.jpeg)

Get Pixels From T2D!

Here I am now retrieving the pixel values of a T2D that was just loaded from disk, loaded from the file that I saved in the picture above!

It woorks, Woohoo!

Now you can Get Pixels from Texture2D’s too!

[FONT=Comic Sans MS]:heart:

Rama


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

**Latest plugin packaged binaries, Win32 Shipping and Win64 Development on UE4 Wiki: **
https://wiki.unrealengine.com/File:VictoryPluginPackaged.zip

**Editor binaries and Packaged binaries in one file:**
   *Win32 Shipping and Win64 Development Supported*
https://www.mediafire.com/?g6uf9kt5ueb2upj

**Donations:**
[Donate to Rama](http://lightningfitness.org/donate/)

[FONT=Comic Sans MS]♥

Rama

Awesome, thanks Rama :slight_smile:

There is just the problem that the “GetPixelFromT2D” node does not work with RenderTarget2Ds unfortunately… Could you support RT or is there anything which would prevent the node from accessing the information out of a RT?

That will require more research, in the meantime please enjoy the fact that you can now read the pixels of Texture 2D’s loaded from file!

:slight_smile:

Rama

I am absolutely enjoying it and I’m sure a lot of other people do it too since it makes the whole image BP nodes a lot more complete :slight_smile:

I have an other question, I had to compile 4.9.2 myself to add a very small fix (only a few lines of code) but now when I start the project I get this:

4e90e8a0b6ba6c479e49c5eeff8b7a255ec6ff35.png

What do I have to do to make it work with a custom version of 4.9.2?

Edit: I compiled the plugin myself and now it works :slight_smile:

I’v just played a around with the proceduralMesh component in blueprint. The annoying thing is getting the triangles indexes array right.
I want to add the the ability to make walls with this component in my MapBuilder.
Is there any chance you add a node to your plugin that extrudes triangles like you would it 3ds max?

Nice work John Alcatraz!

:slight_smile:

Rama

I’ve not yet worked on extrusion due to time constraints, but if you choose to let me know what you come up with!

:wink:

Rama

Dear Community,

The code in this node was first presented by Epic staff, Marc Audy, as code used in Fortnite.

I’ve fully implemented the code as well as making it user-friendly.

In particular I’ve presented a solution for ensuring you can spawn multiple instances of the same UE4 level, by giving you an “Instance Number” that you should increment each time you spawn an instance of a level.

This allows me to enable you to easily create as many uniquely translated and rotated instances of a level as you want!

This is ideal for Dynamic Level Generation!


![65784d2e1f959b9e9b4ea8e4d04f78a466d2e655.jpeg|2500x960](upload://etDY5PoTOTGDt1kztxp5EnB6wp7.jpeg)

![LoadLevelInst_Graph.jpg|1273x793](upload://xve7tvcTCpva9Kw6st1yY0YshPB.jpeg)

Can Include Landscapes and Other Fancy Level Features!

In my demo I included a landscape in my level “tile.”


**Level Scripting / Level Blueprint**

You can also include level scripting that will run uniquely per level isntance!

Victory Load Level Instance


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

**Latest plugin packaged binaries, Win32 Shipping and Win64 Development on UE4 Wiki: **
https://wiki.unrealengine.com/File:VictoryPluginPackaged.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.

Editor binaries and Packaged binaries in one file:
Win32 Shipping and Win64 Development Supported


**Note on Packaging Victory Plugin**

https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=368790&viewfull=1#post368790

Enjoy!

:)

Rama

Thanks for this Rama. I’ve been working on my own similar solution for the last few weeks in my spare time and while I got something working I find your method a better implementation than what I had going.

The only thing I notice is that the level loaded callback doesn’t seem to work when using your method. Do you have any idea why this is? Right now I use that to determine when all the levels are loaded and streamed in so I can do the next step in my process.

Here is my original function in which the callback did fire.





void ADreamProjectGameMode::SetupNonStreamingLevelLoad()
{  
	auto positionOffset = FVector();
	auto mapNames = GetAllMapNames();
	for (auto mapName : mapNames)
	{ 
		FString fullMapPath = FString::Printf(TEXT("/Game/Rooms/Maps/%s"), *mapName);
		UE_LOG(LogTemp, Warning, TEXT("Loading level %s"), *fullMapPath); 
		ULevelStreaming* pStreaming = UGameplayStatics::GetStreamingLevel(GetWorld(), *fullMapPath);

		if (pStreaming)
		{
			UE_LOG(LogTemp, Warning, TEXT("Streaming level setup for %s with transform offset of %f "), *fullMapPath, positionOffset.Y);
			//pStreaming->LevelTransform = FTransform(positionOffset); 
			pStreaming->bShouldBeLoaded = true;
			pStreaming->bShouldBeVisible = true;
			pStreaming->OnLevelLoaded.AddDynamic(this, &ADreamProjectGameMode::OnLevelLoaded);
			numLevelsToLoad++;
			positionOffset.X += 10;
		}
		else
		{
			UE_LOG(LogTemp, Warning, TEXT("Unable toload map %s"), *fullMapPath);
		}
	} 
}


So a followup. I did manage to get the callback firing. I had upgraded my engine and it seemed to no longer like UFUNCTION being on a private method so I removed the markup. I didn’t realize that was a prerequisite for using delegates.

That said I’m still suffering one issue where the transform applied to the streaming level does nothing. I can get the level to transform if I do it after the level is loaded via a function who’s name escapes me right now (ULevel member function called applytransform or something to that effect) but I get a lot of warnings about transforming static objects. My hopes were that applying the transform to the streaming level before it’s loaded would avoid those warnings. I’m not sure how critical they are but nevertheless I don’t like to have a lot of warnings.

I’m considering just authoring the different rooms in my level at non-overlapping positions and doing away with the whole transformation stuff for now because this issue is taking my time away from actually working on my game and since this is more of a small learning project for me it’s not absolutely critical that I author all rooms at 0,0,0 (although in a real project this would indeed be critical).

So between both Rama’s method and my method not seeming to use the level transform my guess is that something about the way I’ve authored my levels is causing the streaming transform to get ignored. I’ll post back if I can figure out why this is.

Did you add this line to my version to trigger the delegate?



pStreaming->OnLevelLoaded.AddDynamic(this, &ADreamProjectGameMode::OnLevelLoaded);


it would go here:



    StreamingLevel->LevelColor = FColor::MakeRandomColor();
    StreamingLevel->bShouldBeLoaded = true;
    StreamingLevel->bShouldBeVisible = true;
    StreamingLevel->bShouldBlockOnLoad = false;
    StreamingLevel->bInitiallyLoaded = true;
    StreamingLevel->bInitiallyVisible = true;


4 New Nodes For You! Sort Array of Int/Float and Int += and -= operators for faster integer math!

Dear Community,

I have 4 new BP nodes for you!


**Efficiently Sort Integer / Float Array**

Now you can easily and efficiently sort an integer or float array, with the smallest entry being put at index 0!

This modifies the original array, saving you from creating unnecessary duplicate array data.

So my BP sort node is very efficient!

![bbca2414d736997bb47f825479abe221c9369d8a.jpeg|1042x777](upload://qNgn3LnIAFwIWUcYraeqbrNSavw.jpeg)

Plus Equals and Minus Equals Integer Math Operators

Typically you have to Get an integer variable and then Set it with some value added/subtracted in order to modify an integer value.

I find this rather cumbersome, especially because in C++ there is the += and -= operators which make adding and subtracting from integers very fast!

Using my new BP Operators you can easily add a value to an integer or subtract a value from an integer!

Note my operator modifies the original value and returns it, so I cannot make these operators Pure. Execution pins are required because the value is getting modified.

a24b2aedf5eaa54e981a57d52b1f190e88861b58.jpeg


**The C++ Code Involved**

In order to make these 4 new nodes I took advantage of UPARAM(ref) which allows a BP variable to be modified in C++ and returned back to Blueprints.

I wrote a [wiki on UPARAM(ref)](https://wiki.unrealengine.com/How_To_Modify_Blueprint_Variable_References_In_C%2B%2B_Without_Copying)that you can enjoy!



```


void UVictoryBPFunctionLibrary::VictoryIntPlusEquals(UPARAM(ref) int32& Int, int32 Add, int32& IntOut)
{  
	Int += Add;
	IntOut = Int; 
} 
void UVictoryBPFunctionLibrary::VictoryIntMinusEquals(UPARAM(ref) int32& Int, int32 Sub, int32& IntOut)
{ 
	Int -= Sub;
	IntOut = Int; 
}


```


**Latest plugin download on the UE4 Wiki: **

**Latest plugin packaged binaries, Win32 Shipping and Win64 Development on UE4 Wiki: **


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

**Editor binaries and Packaged binaries in one file:**
   *Win32 Shipping and Win64 Development Supported*
https://www.mediafire.com/?g6uf9kt5ueb2upj

Note on Packaging Victory Plugin

Enjoy!

:slight_smile:

Rama

Great new nodes!

Thanks! I always wondered why it isn’t there in the first place. You are awesome as always! :slight_smile: