eulerwang / MagicUtilities

A collection of peculiar C++ and Blueprints utilities for Unreal Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MagicUtilities

A plugin for Unreal Engine 4 containing a variety of utilities as C++ code, Blueprints, Materials or a combination of them.

Getting Started

Engine Version

This plugin is currently under development under Unreal Engine 4.19 (UE 4.19), on Windows 10. Using the plugin with a different version of Unreal may work, possibly also under Linux or Mac (definitely to be tested).

Installing

In order to use this plugin, just download it from GitLab and put it in your project's Plugin folder. This should result in a folder structure like the following: MyAmbitiousProject/Plugins/MagicUtilities.

At this stage this plugin does not have dependencies.

Your project needs to be a C++ project. If that's not the case, you can go inside your project main folder, right click on your project file (MyAmbitiousProject.uproject) and select the Generate Visual Studio Project Files option (yes, Visual Studio - Windows only for now :) ). This will allow you to compile Uffmpeg and use it in your project. If you want to try the same under Mac OS, there is going to be a similar option to generate an XCode project.

Some of the Utilities

ARScreen

(Materials + Material Functions + Blueprints) Check the ARScreen_Demo map, located in the folder MyAmbitiousProject/Plugins/MagicUtilities/Content/ARScreen/Maps. The ARScreen allows you to display 3D objects as seen through a window (ideally through a 3D plane). The objects will be shown only when looked at through this window. The purpose of the ARScreen is to create an AR experience inside another 3D environment.

Usage:

  • You can use the provided AR_StaticMeshActor to start creating your own ARObjects.
  • Note: ARObjects need to use the masked blend mode (this setting can be found among the settings for your materials). You can have optimized or non-optimized materials for your ARObjects. Optimized ARObjects materials use a less complex/redundant Material Function to generate their opacity mask, but won't work within UE4 in-editor simulation mode. This may be cumbersome during development. Non-optimized materials overcome this limitation at the cost of moving some code from the AR_VideoScreen to each ARObject material instance.
  • Optimized and non-optimized Material Functions can be found in the MyAmbitiousProject/Plugins/MagicUtilities/Content/ARScreen/MaterialFunctions folder.
  • A working AR_VideoScreen Actor is available. From the actor's settings you need to specify whether you are currently using optimized ARObjects materials or not. Once this Actor is in your environment, add some AR_StaticMeshActors behind it, and start playing/simulating your scene to look at ARObjects through it.
  • If for any reason you need non-AR objects to be located between the AR_VideoScreen and any of your ARObjects, you can use the provided NonAR_StaticMeshActor and their dedicated NonARObject materials. These materials work exactly as the ARObject materials, but the opacity mask is inverted.

UGeometryUtilities

(C++, Blueprint Function Library)

C++ Geometry-related utilities: will grow as needed. You can use these functions also from within your Blueprints.

SimplifiedTimeline

Sometimes you just want to use timelines on the fly, even on ActorComponents. This UObject derived class helps you doing just that!

Usage:

In one of your Blueprints, construct a new object of type SimplifiedTimeline (it can be in your ConstructionScript, if you have one, or on BeginPlay). Remember to set the curve for your timeline, and the update rate, in Hz. Then, all you need to do is to call the Play function on the SimplifiedTimeline. By calling the Reverse function, you will reverse the SimplifiedTimeline. Then, you can bind some event to the OnTimerUpdate and OnTimerFinished delegates of the SimplifiedTimeline.


This utility is developed and maintained by Dario Mazzanti.
This README file was last updated on 2019-01-24 by Dario Mazzanti.

About

A collection of peculiar C++ and Blueprints utilities for Unreal Engine

License:MIT License


Languages

Language:C++ 88.8%Language:C# 11.2%