Thanks Rama, I really appreciate your time. I know how it goes when many people ask questions. I will let you know how it goes. For now I just commented the if (Target.Type == TargetRules.TargetType.Server) statement in UElibPNG.Build.cs and see where that gets me. I'm not too worried about performance at this point.
Announcement
Collapse
No announcement yet.
(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!
Collapse
X
-
-
Originally posted by Hyperloop View PostRama, I'm updating a project to 4.7.3 and I snagged your March 25th build, but it says
[ATTACH=CONFIG]32473[/ATTACH] and than fails to build.
Any thoughts?
Comment
-
Hello Rama,
first I want to say thank you for sharing your tools with us !
I think, the vertices snapping function is my favorite function in all UE4 now.
But I have found 2 issues if I am not wrong about it.
First issue : I create an ISM of the testlevels walls and ground, which have all dynamic shadows disabled. but if I create an ISM of them, I get this message, which tells me, that the ISM still creates dynamic shadows, and I can't change it.
Second thing is about ISMs too, I created an ISM containing all the walkways meshes of the map, but
they get not all contained just inside the ISM they also seem to be seperate objects aswell. If i select the ISM I
visually only select one mesh of the walkway, but can move the complete ISM until I move one of the still seperate looking
(but marked as part of the ISM while I created the ISM) meshes. After that, the ISM contains only the one mesh of the walkway,
which is named by the ISM tag. Obviously the ISM can't always be created out of all selected meshes.
I hope this info is useful.
Edit :
btw. how does that vertice rezising work in detail, if I select one vertice with v and press + nothing happens.Last edited by Mloki; 03-30-2015, 12:29 AM.
Comment
-
Originally posted by Parvan View PostDo you have visual studio community installed? Someone in my group had a problem with VS Community and switching to Express worked for him. I had a problem with Express and switched to community. In both cases I imagine a simple re-installation may have fixed our problems.
Edit: looks like it may have been a corrupt file in my project unrelated to this plugin. I reverted to a previous save and it plays nicely again.Last edited by Hyperloop; 03-29-2015, 01:34 PM.Trevor Lee
Comment
-
@Hyperloop
I had that happen with VS studio somehow. I don't think it's a problem with the plugins but more a problem with the editor. Can you try a different plugin and see if it compiles? I use VaRest which works fine for me on 4.7.2 (I imagine it works fine on 4.7.3) Maybe you can use that to test? If VaRest doesn't work I'd say try reinstalling VS. But that's all I have experienced. Maybe someone else will know more.
Comment
-
Originally posted by Rama View Post[ATTACH=CONFIG]26386[/ATTACH]
Three New Nodes From Kris!
Save Image To Disk From Capture Component 2D
Save Image To Disk From Capture Actor
Load Image By Extension
~~~
Note on Using the Save Image Nodes
For the Save Capture Component 2D Image to Disk node, make sure to specify the image format you want by including the appropriate extension, such such as .bmp, .jpg, .png
If you are having trouble getting the image to save, try a different extension
~~~
Save Thumbnails / Snapshots from Capture Components!
Quoting Kris:
"You can see the result in the following picture.
Each of the thumnails are generated via a custom scene capture component, saved and loaded as required:
[ATTACH=CONFIG]26387[/ATTACH]
(Picture is from Kris's project called Ground Branch, http://www.groundbranch.com/ )
I'm passing them into a material to remove the background (green screening) and then using set brush material.
Should save people some time."
~~~
Thanks for the new nodes Kris!
Being able to save screenshots from a CaptureComponent2D in Blueprints is so very useful!
UE4 Wiki, Plugin Download Page
https://wiki.unrealengine.com/File:VictoryPlugin.zip
♥
Rama
this is the crashed I m getting:
Exception was "SIGSEGV: invalid attempt to access memory at address 0x15852a000"
Source context from ""
<SOURCE START>
<SOURCE END>
<CALLSTACK START>
UVictoryBPFunctionLibrary::CaptureComponent2D_SaveImage(USceneCaptureComponent2D*, FString) Address = 0x105981ec6 (filename not found) [in UITest]
UVictoryBPFunctionLibrary::Capture2D_SaveImage(ASceneCapture2D*, FString) Address = 0x105982780 (filename not found) [in UITest]
UVictoryBPFunctionLibrary::execCapture2D_SaveImage(FFrame&, void*) Address = 0x1059bc476 (filename not found) [in UITest]
UFunction::Invoke(UObject*, FFrame&, void*) Address = 0x10301f272 (filename not found) [in UITest]
Is there something that I have add to make it work?
Thanks,
Comment
-
Rama Needs Answering Help
Hi lots of great questions!
I'm going to need help answering them all, I have a full UE4 work week ahead of me!
Just letting you all know I'm not ignoring you!
I just have to prioritize stuff I am getting paid for so I can, you know, eat and stuff
♥
Rama100+ 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
-
Improved Get Vertex Locations of Static Mesh
Now works in Packaged Games
I have re-written my Get Vertex Positions BP node so that it works in packaged games!
~~~
My C++ Code For You
See my PhysX wiki for the basic build.cs setup:
https://wiki.unrealengine.com/PhysX,...o_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!
Code://~~~ 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!
Rama100+ 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
-
Rama's Instanced Static Mesh Creator, as BP Nodes!
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!
Code://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); }
Code://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!
♥
RamaLast edited by Rama; 04-01-2015, 08:08 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
-
The new node looks great!
I tested it out though, and while I see the number of Victory ISM objects in the world outliner that I would expect, I am not seeing any change in performance whatsoever(from what used to be 30K instances down to ~4). I already PM'ed Rama about it, but I would be interested to see what other people are experiencing.
Comment
-
Originally posted by Zeustiak View PostThe new node looks great!
I tested it out though, and while I see the number of Victory ISM objects in the world outliner that I would expect, I am not seeing any change in performance whatsoever(from what used to be 30K instances down to ~4). I already PM'ed Rama about it, but I would be interested to see what other people are experiencing.
Rama100+ 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 kaitou View PostOh that's great! Going to test it now. Is this in the March 25th download? Also does it make sense to just point it at all static mesh actors, or should a new actor subclass be made just for the ones to turn into instances?
Thank you as always!
https://wiki.unrealengine.com/File:VictoryPlugin.zip
That's the build that has the latest addition!
Also yes you do want to make a subclass / Blueprint just for the actors that you plan to merge together, that is how you control which actors my BP node iterates over!
Have fun!
Rama100+ 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
Comment