Hello. I want to make my own Minecraft parody in Unreal Engine 5. But I ran into a problem: many blocks on the scene create lags, so I can’t even make a world, since it consists of many blocks. Every block is a Blueprint. How can I optimize all this? Thanks.
HISMs might be enough for something small. You still need to separate it into chunks. Doing it in BPs will be sluggish one way or another.
Minecraft parody
Note that advanced solutions exist:
Perhaps you’d rather focus on creating fun gameplay instead. Consider it seriously as, depending on your experience, it may take considerable time to cobble together a system that can support the features you need.
Okay, but can I combine blueprints this way?
Not sure what you mean by combine?
Instanced Static Mesh is only used for static meshes, right? Then can I use this for blueprints?
Sadly, I do not really understand the question. Yes, (H)ISM can be used in blueprints. You will need to develop your own method of storing blocks’ data yourself; this is partially made efficient with:
A map is a fine addition, depending on your needs:
However, there are numerous caveats you will need to address.
Ok, Thanks. I’ll try it.
Hey, I’ve done quite a few projects now with HISMC / ISMC mostly working in BPs. I think its possible to create something similar to Minecraft, but there is definitely a lot to know to set things up. I have a very basic example project I’ve used in the past to showcase setting up a texture atlas with a material, and using a ISMC to generate meshes in a scene. Tho it is far from being an efficient setup.
You can check it out here if you’d like!
To follow that up, I’ll share with you some of the issues I’ve ran into in the past that have made these projects particularly difficult for me.
-
Mesh size, proper UV unwrapping, texture padding, texture export settings, and texture import settings, mipmap settings and anti aliasing settings all matter more than you think! The idea with ISMC is that you have a single mesh (cube) with a single texture, and you can adjust the texture dynamically per instance with custom data attributes as Everynone had mentioned above. The problem with this is that its very mathematically precise, involving the full pipeline to ensure the portion of texture you’re selecting per instance is properly spread across your object. If you want more details about this process, I can definitely give you some guidance on a process that I’ve found to work.
-
For texturing and materials specifically, I haven’t found a great solution other than managing multiple materials on my object to properly create something like the grass block in minecraft, where the top face is a grass texture, bottom face is a dirt texture, and side faces are a mix of both. There are a couple ways to approach this, I think. But I’ve found it difficult to wrap my head around.
-
Engine version matters! I’ve been using ISMC with 4.27, 5.2, and 5.5, and they all tend to handle these components a bit differently. Specifically, some versions are more buggy than others. I’ve found 5.2 is the most stable with proper culling support, which is also an important settings to be aware of on the component itself!
-
Managing the data structure and creating an extensible structure will likely be the bulk of your time. Here is an example layout doc I made that kind of describes how I designed a ISMC based tile editor.
Excuse the font, but it describes the idea I think. At the end of the day, you’ll have to create a manager of some sort that can efficiently and effectively manage the general CRUD operations of your instances and your data. This kind of thing is aware that there is a split between the physical actor itself (ISMC) with its instances on the map and the data representing each block. The difficulty with managing this kind of thing increases if your world is big enough to justify chunking, or if you need to handle multiplayer or any kind of world transitions, as well as random generation and saving / persisting existing generated data and player placed or created data. When you’re working with data on this scale, it also becomes important to try to limit your data types as much as you can so you can find ways to represent your data with as little memory usage as possible.
I hope that kind of helps. Of course if you have any questions you’re welcome to reach out. The last thing I can add is everything I’ve done in the past has been entirely possible in BPs!
When you say proper culling support, are you referring to HISMs index shuffling when instances go off screen or something else all together?
Great post btw! Thank you.
Hey thanks!
I was talking about this setting which exposed on the component. I’m not sure the exact technical details of it, other than yes it stops drawing outside of a specified range.