Devlog: Mesh to Actor Swapping

by | Devlog, Featured

Hey all,

This time, I’ve got something special to share—a mesh to actor swapping system inspired by a few of our amazing Patreon community members. We were able to expand upon their base functionality and it’s been super helpful for making our open world more dynamic and optimized, and I’m excited to walk you through it.

Swapping Meshes in a Radius

Let’s start with how we handle swapping static meshes within a radius around the player. Normally, you don’t want to convert every tree, rock, or interactive object into an actor right away—especially if you’re building a large world. So, what we’ve done is create a system where static meshes are swapped to actors only when the player is close enough. This keeps performance high and makes sure interactions (like picking up items or cutting down trees) feel responsive when you need them.

Swapping on Hit (For Trees, Rocks, and More!)

We’ve taken this a step further for objects like trees and rocks. Swapping every tree in a dense forest at once could kill performance, so we’ve made it so trees only swap from static meshes to actors when they’re hit by the player. For example, when a tree is struck with an axe, it transforms into a destructible actor, letting you chop it down in real-time. We’re using the same logic for mineable rocks, where you swing a pickaxe, and the rock swaps into a breakable actor. It’s a seamless transition and gives us a lot of flexibility for expanding interactions later.

ISMs, HISMs, and Chaos Meshes

To keep things efficient, we use Instanced Static Meshes (ISMs) and Hierarchical Instanced Static Meshes (HISMs). These allow us to manage large numbers of objects, like trees and rocks, in a way that’s highly performant. When the player interacts with an object, we dynamically break it out of the instance pool and convert it into an individual actor. This also works with Chaos Destruction. When you smash a rock, it spawns a Chaos mesh that breaks apart realistically and even spawns pickup items like stone or metal ore.

What’s Next?

We’re always looking for feedback to make this system even better so please reach out to us. Lastly, a huge thanks to our Patreon supporters! Your support and joint cooperation continue to make Games By Hyper better than ever! 

With kind regards,


Eric Ruts

Eric Ruts

Eric Ruts

Related Posts

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *