Download

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

New Video About My Instanced Static Mesh Editor! <3 Rama

Dear Community,

Make sure to check out my new video about how my Instanced Static Mesh Editor now works in packaged games!

Yay!

New Video I Filmed Today!

You can download my Vertex Snap and Instanced Static Mesh Editor Plugin ehre!

Epic Wiki Download Link

:slight_smile:

Rama

Looks very awesome! Can I use it in runtime?

I want to be able to use it in my mapbuilder so after building a level out of a lot of cubes, the user can merge them and get better performances.

Hi, thanks for this plugin, its nice. It would be great if you could state which unreal versions are supported for each version of the plugin. I now had to manually try a few until it did build for 4.8.3

I am only one person, I can’t manage everything myself, how about you help out and tell us what’s the latest version that runs 4.8.3 so others know too?

I only maintain the latest version on my media fire, but older versions can be found on the wiki pages, but I can’t easily leave notes with each file download directly on the wiki, there’s no option to do so that I’ve been able to figure out.

Yes you can, in my Victory BP Library I have made nodes to create VictoryISM actors from an array of static mesh actors!

See my post of it here:

:wink:

Rama

Runtime Instanced Static Mesh Tools by Rama

Dear Community,

Hi everyone!

So I have an immediate solution for the issues people are having with instanced static mesh actors working in packaged games!

I’ve created two BP nodes that let you easily specify which actors you want to convert to Instanced Static Mesh Actors at runtime!

This means that while in the editor, the actors are independent and can be moved around normally (the main advantage I sought to achieve with my ISM editor mode).

But once runtime starts, you can run my BP node to convert all the actors of a specified blueprint/class to instanced static mesh actors!

The other node lets you quickly and easily iterate over all Victory Instanced Static Mesh Actors (VictoryISM) that have been created during runtime!


**Make Dynamic Level Generation Super-Efficient!**

When dynamically generating levels your level unit size has to get smaller the more detailed and varied you want the levels to be. This means that for detailed dynamically generated levels, you usually end up with a very high actor count!

**Well using my two new BP nodes, you can make dynamic level generation super-efficient** by turning 100s of actors sharing the same static mesh asset into a single static mesh!

Remember, the scaling, rotation, and translation of the static meshes can be anything you want!

Two New Advantages For You

The two new advantages of this new system are:

a. You can use my BP nodes with actors that you have created yourself at runtime, such as for dynamically generated levels, MAZES, and such

b. This system will work with packaged games, since the instanced static mesh components do not need to serialize properly (as they currently dont seem to be doing). The serialization/cooking process becomes irrelevant since the actors are only converted to Instanced Static Mesh Actors at level start!


**Use of TMap, One Instanced Static Mesh Per Static Mesh Asset**

I use a C++ TMap to group all the actors of the class you specify, and create as many instanced static mesh actors as are required.

Each Instanced Static Mesh Actor can only represent actors that **share the same static mesh asset**, so I group all the found actors by their static mesh asset!

Here's the code where I do this!



```


**//I want one array of actors for each unique static mesh asset!  -Rama**
TMap< UStaticMesh*,TArray<AActor*> > VictoryISMMap;

**//Note the ActorClass filter on the Actor Iterator! -Rama**
for (TActorIterator<AActor> Itr(World, ActorClass); Itr; ++Itr)
{
	**//Get Static Mesh Component!**
	UStaticMeshComponent* Comp = Itr->FindComponentByClass<UStaticMeshComponent>();
	if(!Comp) continue; 
	if(!Comp->IsValidLowLevel()) continue;
	//~~~~~~~~~
	
	**//Add Key if not present!**
	if(!VictoryISMMap.Contains(Comp->StaticMesh))
	{
		VictoryISMMap.Add(Comp->StaticMesh);
		VictoryISMMap[Comp->StaticMesh].Empty(); //ensure array is properly initialized
	}
	
	**//Add the actor!**
	VictoryISMMap[Comp->StaticMesh].Add(*Itr);
}


```



Then, I loop over the TMap, and access the Array of actors that I created that all share the same Static Mesh asset, and then turn the whole lot of them into a single Instanced Static Mesh Actor!



```


**//For each Static Mesh Asset in the Victory ISM Map**
for (TMap< UStaticMesh*,TArray<AActor*> >::TIterator It(VictoryISMMap); It; ++It)
{
	**//Get the Actor Array for this particular Static Mesh Asset!**
	TArray<AActor*>& ActorArray = It.Value();
	
	**//No entries?**
	if(ActorArray.Num() < 1) continue;
	//~~~~~~~~~~~~~~~~~~
	  
	**//Get the Root**
	UStaticMeshComponent* RootSMC = ActorArray[0]->FindComponentByClass<UStaticMeshComponent>();
	if(!RootSMC) continue;
	//~~~~~~~~~~
	
	**//Gather transforms!**
	TArray<FTransform> WorldTransforms;
	for(AActor* Each : ActorArray)
	{
		WorldTransforms.Add(Each->GetTransform());
		 
		//Destroy original?
		if(DestroyOriginalActors)
		{
			Each->Destroy();
		}
	}
	  
	**//Create Victory ISM**
	FActorSpawnParameters SpawnInfo;
	SpawnInfo.bNoCollisionFail 		= true; //always create!
	SpawnInfo.bDeferConstruction 	= false;
	 
	AVictoryISM* NewISM = World->SpawnActor<AVictoryISM>(
		AVictoryISM::StaticClass(), 
		RootSMC->GetComponentLocation() ,
		RootSMC->GetComponentRotation(), 
		SpawnInfo 
	);
	
	if(!NewISM) continue;
	//~~~~~~~~~~
	
	**//Mesh**
	NewISM->Mesh->SetStaticMesh(RootSMC->StaticMesh);

	**//Materials**
	const int32 MatTotal = RootSMC->GetNumMaterials();
	for(int32 v = 0; v < MatTotal; v++)
	{
		NewISM->Mesh->SetMaterial(v,RootSMC->GetMaterial(v));
	}
	 
	**//Set Transforms!**
	for(const FTransform& Each : WorldTransforms)
	{
		NewISM->Mesh->AddInstanceWorldSpace(Each);
	}
	
	**//Add new ISM!**
	CreatedISMActors.Add(NewISM);
}

**//Clear memory**
VictoryISMMap.Empty();


```



Easy to Edit, High Performance at Runtime!

The result of using my BP nodes to turn all actors of a certain class to instanced static mesh actors is that you can now maintain easy editing of the actors while in the editor, and during game-time still gain the performance advantages of converting a large number of actors that share the same static mesh asset into a single actor!

You can also now convert the large quantity of actors in dynamically generated levels into high performance instanced static mesh actors!

[FONT=Comic Sans MS]:heart:
Rama

Vertex Snap Editor and Instanced Static Mesh Editor

Dear Community,

My Vertex Snap Editor Plugin is now a separate plugin, called VictoryEdEngine!

Download Link (145kb)

This is a plugin that does not package with your game as it is only designed to modify Unreal Engine 4 to add support for vertex snapping while in the Level Editor Viewport.

More Details about my Vertex Snapping Editor Feature

Installation Steps

Enjoy!

Rama

Fatal crash caused by get IP node

Hi Rama,

I’m finding your BP library very useful for the most part. However I noticed that when calling this node without an internet connection, it not only fails, but crashes the entire game (and editor!).

Is there a way to check for a live internet connection before sending the HTTP request, perhaps by changing the C++ source?

Thanks!

Hi Rama,

I don’t get you VictoryEdEngine to work. (UE 4.9.2)

I copied the folder from the zip to MyProject/Plugins and it is listed and enabled in the editor plugin window.
I closed the editor, added the line as suggested (UnrealEdEngine=/Script/VictoryBPLibrary.VictoryEdEngine) to the DefaultEngine.ini and restarted.
It crashes at 79% with the following message:


[2015.10.28-14.40.30:872]  0]LogUObjectGlobals:Warning: Failed to find object 'Class /Script/VictoryBPLibrary.VictoryEdEngine'

Just an update on this. I’ve found that the following change to the source is a good solution:



// Original function
// Crashes engine with fatal error when offline
void AVictoryPC::HTTPOnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
{
	this->VictoryPC_GetMyIP_DataReceived(Response->GetContentAsString());
}

// Fixed function 
// Returns empty string when offline
void AVictoryPC_Fixed::HTTPOnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful) {
    FString response = "";
    if (bWasSuccessful)
        response = Response->GetContentAsString();

    this->VictoryPC_GetMyIP_DataReceived(response);
}


Thanks for pointing this out, I’ve made the fix and it will be in my next release of the Victory Plugin!

:slight_smile:

Rama

You have to use



UnrealEdEngine=/Script/**VictoryEdEngine**.VictoryEdEngine


and then it will work :slight_smile:

I’ve already updated the wiki, where did you see the old version?

Have fun today!

Rama

Thanks, it works.
Looks like I copied it from the wiki a few lines below the correct version without noticing it to be different! ^^

Oooh sorry about that, I’ve now corrected the other lines in the wiki!

:slight_smile:

Rama

30+ Additional BP Math and Geometric Analysis Nodes!

Live as of May 1st, 2015

Dear Community,

I have the May Celebration node release for you today!

Community member TK-Master has gifted us with over 30 new BP nodes for Math, Physics, and 3D Geometry calculations!

I highlighted my personal favorite nodes in green!


**UMG Anchor Conversion**
Please note you can now convert UMG Anchor coordinates to other coordinate spaces!

Snap To 3D Grid
You can use the Snap Node to snap any 3D space Vector to a grid size of your choosing!

So you could use this node to to regulate the position of an in-game 3D positioning tool (like for RTS Games!) to a grid of your choosing, while still accounting for rolling hills of landscapes and big vertical differences!


**Convert Physics Linear Velocity**

Ever wonder how fast in **Km/hr** an in-game Unreal Engine physics ball was hurling through the air?

Ever want to know the **meters/second** speed of a falling physics-simulating box?

Or how about the **miles/hour** of your UE4 Physics Vehicle?

Well thanks to TK-Master's new node you can now easily convert the value that you get from GetPhysicsLinearVelocity of any physics-simulating body to a speed in the units of your choosing!

Here's is TK-Master's current list of available conversions!



```


/* Speed Units Enum. */
UENUM()
enum ESpeedUnit
{
	/* Centimeter / second (cm/s). This is default unreal velocity unit. */
	CentimeterPerSecond,

	/* Foot / second (ft/s). */
	FootPerSecond,

	/* Meter / second (m/s). */
	MeterPerSecond,

	/* Meter / minute (m/min). */
	MeterPerMinute,

	/* Kilometer / second (km/s). */
	KilometerPerSecond,

	/* Kilometer / minute (km/min). */
	KilometerPerMinute,

	/*Kilometer / hour (km/h). */
	KilometerPerHour,

	/* Mile / hour (mph). */
	MilePerHour,

	/* Knot (kn). Nautical mile per hour. */
	Knot,

	/* Mach (speed of sound) (M) at standard atm. */
	Mach,

	/* Speed of light. */
	SpeedOfLight,

	/* Yard / second. */
	YardPerSecond
};


```



BP Nodes for 3D Geometric Analysis!

Here are pics showing the complete list of the new 3D Geometry Nodes!

To see the full list, get the latest version of my plugin and type in “TK” and you will see all the 30+ new nodes available to you!

3347099af001a575814d73a9d38845c3ad7ceef1.jpeg


**Thank You!**

**Thank you TK-Master for your contribution!**

These nodes are going to be extremely useful for a lot of people !

Most Recent Plugin Download From UE4 Wiki

:slight_smile:

Rama

How can i load external sound at runtime? thanks!

How can i load external sound at runtime? thanks!

Hey Rama,

I’ve run into an other issue.
I’m trying to use you instanced static meshes.
However pressing i doesn’t work when static meshes are selected… well it does work but only when the level viewport is active (moving around with rightmouse pressed).
Also when the instanced mesh is created, I save and reload the map, the combined meshes are gone but the ISM class is still there. Shift-i in this case does nothing.
The same issue is achieved when converting to instanced mesh, then renaming the actor → all combined meshes gone.
I’m using a custom ISM class created and setup as you described in the setup video.

Edit:
Adding the victory plugin and then using VictoryISM works fine…

Hello Rama,
I have been trying to get a hold of you. Is there an email I can contact you with?
Thanks - Mike W

Thats so odd that the wiki is only showing the october 14th version.

You need it to be in *.ogg format ( not wave! ) and then you can access it via the node provided by the plugin.

Thanks for helping out with answers Sahkan!

:slight_smile:

Rama