Yo, Here’s Some Free Stuff

Yo, Here’s Some Free Stuff

Free Procedural HISM Placers


Download Here

Hey guys, I got a lot of positive response from my last two posts ( 1 & 2  ) about using HISMs to improve performance, so I thought I’d give you guys a couple of the utility classes I’m using in my game UFO Rodeo to procedurally place the meshes and save myself some time and performance. There’s currently 4 HISM placers and they are all built on the actor class with no references to external code, so just copy them into your Unreal project and UE4 should pick up on the changes when you boot it.

On each of these actors you’ll find a hierarchical instanced static mesh component. Set the mesh on that component to the one you want to use, fill out the parameters under the “Stats” section and you should be good to go. Some of the actors have a section of parameters marked “Stamp”. Turning on Stamp will stamp your meshes to whatever is under them. so for instance if the floor is uneven in the level you are working on just put this actor hovering over the ground and turn stamp on and it will stamp to the floor, wherever that is. Note that it will even work in conjunction with vertical offset parameters. Feel free to go through the code and let me know of anything you think I could improve. I’ll go over some of the specifics of each class below.

Edit: These plugins are only compatible from 4.17 onward.

Warning: As of the writing of this post UE4 17.0 is acting finicky about anything done in the construction script from what I can tell.  Instances now wait to spawn till the game is either started or you run simulate. Also I’m getting some crashes when I try to move the root. But these problems only seem to exist in 17.0 and epic is usually good about putting out fixes for this kind of stuff quickly.

Manual Placement

The manual placement HISM actor works by creating an array of transform gizmos, that can be moved around and placed by hand.  The Blueprint then spawns an instance at each transform.  This is a good catch-all actor that allows you to place HISMs by hand.  The pillars in the above image are all part of a manual placement actor.

 

Spline Placement

This class contains a spline component that can be shaped in the editor. It then spawns instances along the path. This includes the stamping functionality, so you don’t need to be precise with your height.

 

 

Circle Placement

This class spawns instances in a circle around the center of the actor. You can change the number of meshes and the radius of the circle.

 

Scatter Placement

The scatter placer takes a radius and a number of meshes similarly to the circle placer, but this one spawns anywhere within the circle, not just the outer edge.

 

Anyways go ahead and try these out and let me know what you think of them.

 


2 thoughts on “Yo, Here’s Some Free Stuff”

  • 1
    Anonymous on August 16, 2017 Reply

    Help. Only one is loaded in Unreal Editor. Are there any other settings I should have? I am using the 4.16 custom version of the engine.

    • 2
      The Undead Dev on August 17, 2017 Reply

      Looks like there are compatibility issues. I built these in 4.17 and some don’t seem to want to work in 4.16. I’m looking into possible work-arounds. Thanks for bringing this to my attention.

Comment on this post!