The Hydraulic Press - Not safe for use around explosives.

Published April 01, 2019
Advertisement

Hi everyone!

It's been a good couple of weeks since I last posted a blog entry. With the help of @Rutin and his 3D model making expertise, i've now implemented the hydraulic press mechanics within the game, and also finished the appearance of the laser tripwires. These were required to implement level 12 of Mr Boom's Firework Factory, the first level to use electricity mechanics.

The Completed Laser Tripwire

Starting with the laser tripwires, i selected some free to use models, and some cheap paid models and kitbashed them to end up with something visually appealing, with some help from @Rutin converting 3D studio files into FBX. Using a CCTV camera model, an SLR camera tripod, and some weird electrical gadget, this was the end result, connecting the set using a UE4 Cable Component:

image.png.80c07b37b52a5e1c089c3c055034d36e.png

There are two arrow components in this model, the one in the lens of the camera dictates where the laser beam originates from, and in which direction, and the one on the control box is a connection point for the cable actor which connects it to the object it powers. With this complete, i could move on to the hydraulic press itself.

Hydraulic Press Development

For the actual hydraulic press that connects to this laser tripwire, I'd started out with a basic primitive prototype, made of some textured boxes which i sent to @Rutin for a sense of scale so he could get started on something better:

image.thumb.png.3d27e66daf88a3986b9dfda9422802d4.png

I then left @Rutin to do his thing, and after lots of to-ing and fro-ing, talking about how it needed to look, he finally came back with the finished product, which i turned into an actor within the game proper...

The Hydraulic Press - The final model

image.png.2e0fe7b9f90d0692fe7ec65ed8eecbb4.png

Animated Parts

I also decided to add some extra parts to the model to allow for connection to a cable (the pylon at the top of the model) and to allow for animation of the display screen. The display screen uses a simple texture atlas to animate its text when it is powered up:

image.png.3d248a2b3184e34a90033781b3cf46a9.png

The end result looks like this, and has some emissive applied to make it look more like an oldschool green phospor screen. It only appears when the machine is powered on:

image.gif.02006844f478acf279a0addd69d6a6a9.gif

Hydraulic Press Blueprint Events

This needed to be connected to the existing power system by deriving the class from my "Powered Object" class, which implements the base interface, and a set of related events added, one for powering it up and one for powering it down, plus a timer to animate the model.

Power on event

The power on event is called when the device receives power, it changes the materials of the screen and power button to 'lit' ones with texture atlases and emissives.

image.png.123e8d135c284029a979d11e6765f9d7.png

Power off event

The power off event reverses the behaviour of the power on event, reverting the glowing textures and texture atlases back to plain boring non-animated and non-emissive ones.

image.png.952b0c51cb59de097d861f2b75dea92e.png

Animation event

The animation event is powered by two timelines, one to quickly descend the crusher to the ground, detecting any collisions with crates as it sweeps and registers collisions. Any crates it collides with are set to explode as soon as possible.

The second timeline runs eight times slower, and ascends the crusher back to maximum height. Each of these timelines has a sound attached after it has finished executing, one for a loud slamming sound, and one for a hissing of hydraulics and steam engines.

Both of these events only operate while the object is powered, and if power is removed, the animation always completes, leaving the crusher part at its highest position allowing crates to pass through.

image.thumb.png.bbadf97d3b61d6a9c886a7c2d1105295.png

Once these are all rigged up, the whole thing can be tied together, which produces some wonderful and destructive machines:

Crusher-Lighting-Beautiful.thumb.jpg.5cecfbcf46f8b131ccffbddf7ff6611b.jpg

Crusher-Operating.thumb.jpg.01d0dacd27c2e79d50fa21203ccd9a84.jpg

Videos!

The videos below show the hydraulic press in all its glory. Note that the first video does not show the camera shake effect, as I had de-posessed the player pawn to reposition the camera in a better position. It appears that in UE4, a de-posessed free floating camera does not receive camera shakes.

The view from the other side of the machine better demonstrates the camera shake effects used to add polish to the machine:

 

As always, feedback is more than welcome! Please feel free to comment below, and let me know if i missed anything! ?

4 likes 0 comments

Comments

Awoken

That is awesome Brain

April 02, 2019 01:58 AM
ARF Initiative

Very nice post, Brain. Your game dev is getting really interesting.

April 02, 2019 09:08 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement