The last few months have been most exciting for us, and right now, many products improvements are on their way. Today, we’re taking a look at the new modular system in Sci-Fi Effects. To kick things off, we’ve added several new elements into play, including new Turrets, the Turret Editor, revamped Tracking Controller and the redesigned Pool Manager. We’re excited to share with you the significant changes occurring this update.
Bring me the turrets!
What is Sci-Fi Effects without it? Remember how it’s all started with that turret? That’s right, and we’re happy to fulfill all your requests going down the list!
It’s great to see parts are coming together so you can get a taste of trying out the new modular system. The following components can be used on both Desktop and Mobile devices, through several LOD groups and PBR/Mobile materials:
- Heads: Single, Double
- Mounts: Single, Double
- Breeches: Common, Heavy, Ballistic, Energy
- Barrels: Flack, Flamer, Gatling, Gauss, Laser, Mortar, Repeater, Electric, MLRS, Heavy Missile Launcher
New PBR textures
All the replaceable turret parts supplied with unified texture sets with maximum texture resolution up to 4K:
LOD0, PBR textures, Linear color space, Deferred rendering, HDR, Cinematic Effects
LOD Groups and Mobile
In this update, we are wrapping up high-end and low-end platforms support for Turrets with new shared LOD. The overall workflow is designed to do away from separating the mobile but rather taking care of both as a whole as much as possible.
It’s never easy moving a whole asset over to a different platform, and there were a few reasons why we did this:
- It allowed further extension with additional sets while it nicely fits with the existing system
- While developing for a particular platform, the user can toggle between various sets, or avoid using extra parts on low-end devices
At this point we’ve established the polycount grading according to:
- LOD0 – up to 5000 polygons per assembled turret
- LOD1 – up to 2500 polygons (is also used in mobile version)
LOD1, DiffuseSpecular textures, Gamma color space, Forward rendering
New Mobile textures
The new Substance Painter workflow has completely redefined how we approach things in many ways. In extension to the base set and unified workflow, turrets now have a Bump-Specular mobile set, enabling them to retain the same look on the devices, with highest texture resolution up to 2048×2048:
We have made numerous changes to reduce the entire asset difficulty and the amount of time required for turret parts swapping by introducing the modular approach we’ve been working on during the last summer!
Let’s check out one of the most useful tools on the list: the Turret Editor window. It’s in the Forge3D menu located in the upper center of your screen.
Turret Editor can be accessed from the Forge3D/Turrets/Turret Editor menu
It will take you to a new window dedicated to turret assembly and general setup. This is where things start to get interesting.
The first and the leftmost column lets you create, manage and keep turret templates, which are shared across the entire project in a ScriptableObject database.
Name – This returns a template name you can modify
Add to a scene – One can create a new turret instance in the scene from a particular template. It will also position new turret transformation regarding the current selection in the hierarchy.
Add – This adds an empty turret template into database
Duplicate – One can create a duplicate for any template by selecting an existing template and clicking ‘Duplicate’.
Remove – This option deletes a selected template from the database. Please note, removing a template will unlink all the relevant turrets in the scene.
Templates – This lists all the Turret templates available in the ScriptableObject database. Selecting any item from the list will update the Turret setup column. You can also delete a template by clicking the ‘X’ button next to an element in the list.
Once the new turret template is confirmed, the editor will pick up all the available parts, and the user can then use them to build the turret.
When the user makes a change such as swapping parts or toggling a checkbox, the Turret Constructor component starts the reconstruction process immediately.
The general technique is the same for any platform with one exception: the mobile platforms should be limited to LOD1 prefabs only, and the LODGroup checkbox should be disabled.
Turrets under the hood
Much of this system happens automatically. And if you’re going to add new parts why not do it in style?
From the perspective of the modular asset, the easiest way to take care of dynamic editing of the content was establishing an entirely covered rig with interchangeable parts. With that in mind, we introduced the unified skeleton with a few requirements so that a turret section requires a special socket to plug in.
The frame is based on a parent game object with various parts distributed across the turret rack. Depending on a role in the rig, certain parts require a socket in its prefab.
The socket defines an attachment point describing how the parts stack together. Further customization is possible by nesting multiple sockets within a prefab.
Depending on the part, a particular type of socket is required to determine the component group it belongs to:
Socket search options define a strict pattern in finding a socket object within a prefab. For example, the existing socket name can be described such as:
- *SOCKET_ Visual identifier of a socket object in the hierarchy
- #GROUP# Component group this particular socket belongs to
- #NAME# Unique socket name
In addition to that, the socket name can be fully customized
Adding new parts
The last rightmost section of the editor is where you can add new turret parts and modify socket names.
That’s all it takes. But before we can make anything move, we need to unlink the new turret from the editor. We’re going to select the turret in the scene and check out the Turret Constructor component.
One of the greatest thing about Turrets is the ability to sculpt any turret design no matter what type you’re trying to build. In the very same way, we also allowed the automatic parts assembly on a turret skeleton using the utility component.
The concept is simple. Turret Constructor ensures a turret is always updated with the latest changes and once the template is confirmed, the parts of the turret skeleton are replaced in the process. The Turret Constructor component is added automatically upon building up a turret.
In addition to that, a particular turret can also be toggled between the templates using a popup.
The key thing to remember is that a Turret Constructor will overwrite any user changes through a skeleton reconstruction during the editor updates.
Unlink from turret template
Now that we’ve looked at how to setup a turret from scratch, we’ll now disconnect our instance from the Turret editor to prevent any further changes to its state.
You can unlink a turret by clicking ‘Unlink from turret template’ button located at the very bottom of a Turret Constructor.
That’s it! When you’re happy with the changes, you can now create a new prefab and toss it into the action!
Perfect for any kind games, the redesigned turret controller is now highly customizable including the arc of fire handles and several aiming algorithms.
Before a turret will target anything, you must setup a few things and specify a transform of an object to aim. Let’s have a look at the new options we’ve added to the turret controller with this update:
Debug Target – A transform of an object the turret will aim at
Mount – Specifies the transform of the horizontal tracking component along the heading plane
Swivel – Specifies the transform of the vertical tracking component along the elevation plane
Heading tracking speed – The rate at which the turret can rotate towards target on the horizontal plane
Elevation tracking speed – The rate at which the turret can pivot towards target in the vertical plane
Heading limit – The arc of fire along the horizontal plane. The editor gizmo marked with red
Elevation limit – The arc of fire along the vertical plane. The editor gizmo marked with blue
Smooth controlling – Enables the interpolated tracking algorithm and variable tracking speed. If disabled, the fixed angle rotation is applied
Debug draw – Whether to draw a debug line between the swivel center and the far end point
Animators – Barrel animator list. A subject to improve over the course of the next update
The last item that we’d like to confirm is a redesigned pool manager. The updated version allows you to toggle between a collection of pools and contains a lot of useful innovations such as load balancer, a scriptableObject database and separate settings for each pool.
It’s highly suggested to switch to the optimized despawn in code:
Despawn(Transform obj, Transform objTemplate) – it will significantly increase the despawn productivity. Moreover, the more prefabs, the greater the gain.
For example, if there were about 300 prefabs, 200 objects each – than a regular despawn would have taken a significant time to skim through all spawned objects. But thanks to the advanced despawn it will only go through the ones of the same type as objTemplate. So, the total gain is getting close to about 300 times faster!
Below, is a comprehensive PoolManager overview we have wrapped for you:
Database – the changes are serialized within a database under the “Assets/Resources/F3DPoolManagerCache/” path; hence a separate set of pools per level, as well as a project, is possible by design. Creating a database is easy: type the database name and click “Create Database”
Next to the Database is a popup list which will toggle between the available pools. Click the “Create Pool” button to add one beforehand. Each pool contains the options affecting the designated prefab set, hence allowing as much of abstraction and control:
Initial parenting – Will parent all prefab instances to the Pool game object upon initialization
Runtime sorting – Will parent a particular prefab instance to the Pool game object upon despawn to ensure its returned to its original parent to prevent the direct use of the SetParent which affects performance significantly
Broadcasting – Calls the specified method name for every spawn and despawn event on the certain game object or any of its children.
By the default, the Pool will instantiate all prefabs in the first frame, but you can change this behavior referring to the following options:
Load control – The pool will limit the number of objects instantiated according to the maximum amount specified per frame
Load balancer – Toggling the option will try to keep the target FPS through limiting the quantity of instantiated objects per frame dynamically
Debug – Shows details about the results of running internal commands. It can be especially useful when a verbose console output is required.
Prefab items – total quantity of prefabs in the pool
Base – The minimum number of a particular instances created during the initialization
Max – The maximum amount of a particular instances allowed in the scene. The pool will ignore any further spawn requests above this value.
Sci-Fi Effects 2.0b Unity Engine version requirements changes to 5.4.0+
As we bring you some exciting new developments to the existing framework, we’ll be narrowing the engine support to the latest at the moment of an update release.
While our hands are full with various tasks, we’d like to focus on the upcoming features before bringing the extended version support and therefore strict to the Unity Engine version including 5.4.0 and higher.
It was a busy schedule to tie up loose ends with rolling new features, working hard, and making new bugs to smash! We’re officially in the beta now, and ready to impress you with the progress covering even more over the course of upcoming updates.
Hope this overview gives you a good sense of what this update is all about, and please feel free to contact us with any questions and comments. We look forward to your valuable feedback and suggestions regarding the quality of our products.
Your most unhappy customers are your greatest source of learning.– Bill Gates