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

Only got to download new version from 01/04/15 now … will test and let you know!

Nice addition being able to see files. Thank you.

By “add a single C++ file” do you mean any old file or something specific? I can compile anything, I just need the source.

J^2

Depending on how we end up implementing custom patches/insignias, I may end up taking care of .

.

Hey !

You’re doing an amazing job here to the comunity, that’s awesome!

… I was trying your Victory Get Custom Config Var functionality but I looks like it’s not working. It loads random numbers from the config file.

I’m using the Saved\Config\Windows\Game.ini file!

Is there anything wrong?

Thank you!

Ok, I got the ISM node to work. I turned something like 34,000 into 1 mesh. Draw calls dropped from 136,000 to ~1500.

I don’t know why it didn’t work the other day, but it seems to do the trick today. kept their LODs and everything seemed to work fine visually.

We seem to have a problem with the though, which isn’t necessarily related to your node.

With those instanced in the world using either normal instance, or hierarchical, the FPS is about 4-6. When I use the Victory ISM node the FPS jumps to 15. If I just don’t spawn the at , the FPS is ~55.

I was hoping combining them into a single ISM would be the answer, but it doesn’t seem to be the case, at least not completely. Will have to investigate possible issues with the on end.

One solution to is to add an alpha culling in the foliage MAT, i am running some tests at the moment on .

What is the name of that node in the mat editor?

Posted about in a separate thread to avoid hijacking one:

Any advice or tips would be greatly appreciated. Cheers,

J^2

You’re welcome Isaac!

You can add an empty new AActor class with a name of your choosing and that should do the trick, again should be different once 4.8 comes along :slight_smile:

I will investigate as soon as I can! :slight_smile:

Glad to hear there was some improvement, good luck with your tree shader!

Lovely to hear from you , let me know how it goes!

Have fun today everyone!

**Load Texture 2D From File!

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

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

Sweeney liked node!

Enjoy!

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


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


```



Download Link (6.5mb)

UE4 Wiki, Plugin Download Page

:slight_smile:

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!

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

![ca6e47c3de4ce0fc029accc855a97ab3b66c7f0f.jpeg|1260x774](upload://sSMIRl140vUkZisnTkYGaDdAz4X.jpeg)

Recommendation:

I recommend using the Project Game directory for most of your relative path needs! 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

:heart:

From the Q&A Desk

Hi there!

I just ran some tests with my Config nodes, and I did not have any issues reloading data properly from config file.

Are you sure that you spelled the section name and var name the same way in both places?

It can help to save the section name and var names as string variables so that you just plug them in, guaranteeing that they are the same :slight_smile:

Please try that and if you still have issues let me or one of my assistants (points to the flying unicorns outside the window) know!

Have fun today!

:slight_smile:

, you’ve definitely been inspiring to us as we play with Unreal 4!

I know it’s not a riveting change but i notice i failed to use proper var names for the float variables. It should be better now.

Hee hee!

Play and fun are the goal!

:slight_smile:

** Taking BP Node Requests**

Does anyone have any BP node requests?

should be simple utility stuff that could be applicable to many projects.

Functionality you’d eventually like to see added to the engine if possible.

Let me know!

:slight_smile:

Hi ,

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. :slight_smile:

Also,

Screen Brightness or Gamma. Not sure if can be already.

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

For 360 awareness you can use something much simpler, just a distance check! You just want to get actors of class and do a vector length squared check with your AI unit :slight_smile:

Let me know if works!

Ah yes, that is on my list :slight_smile:

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 :slight_smile: 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?

:)