Generate mesh yourself!

Let’s talk about meshes! Did you try to generate one yourself? Well, you are about to do that!

Meshes are used to display 3D models in a virtual environment. They are built from polygons which are covered with texture, based on the UV map. Its role is to give a player or a user impression of an object.

When an object has a lot of polygons, it’s called hi-poly. Usually, these are counted in hundreds of thousands or even in millions. Often, you can see them in movies or some AAA games.

On the other hand, there are objects with much fewer polygons, and they are called low-poly. Usually, low-poly models are a style choice, especially when you can see polygons on the model without any problem.
Low-poly models can also be used as an optimization technique, with baked textures from hi-poly models.

Continue reading “Generate mesh yourself!”

Multithreading with Job System in Unity

Writing multithreaded code was never something easy, but this might change with the introduction of Job System in Unity.

If you didn’t know, the code that you write in Unity is executed on the main thread. This makes everything much easier to build, but it also has some drawbacks, mainly in the performance department.

I mentioned in the beginning, Unity is introducing Job System to help you write multithreaded code much easier. And the best part is that you don’t have to worry about race conditions! ?

However, you still have to know what are you doing. ?

Continue reading “Multithreading with Job System in Unity”

Sprite rendering with ECS in Unity

Recently, I’ve encountered a problem with rendering sprites with ECS in Unity. And yes, I know, ECS is still in preview but why wouldn’t share some of my experience with it? ?

ECS is a new way of programming in Unity, and I made a post with the introduction to it recently. You can check it here if you didn’t see it already. ?

Back to today’s subject! You might ask, what is the problem with sprites in ECS?

Well… There is nothing like SpriteRenderer which we have now in Unity. This reminds me of the old days when we didn’t have any 2D components… Yeah, it was long ago… ?

Continue reading “Sprite rendering with ECS in Unity”