Author Topic: Game performance  (Read 595 times)

Hi,

I have a question about performance in Unity through SP:

I attach a photo of the same Cracked substance from Substance Source in Unity Quads with 3 different sizes just for testing: 1x1m, 5x5m, 10x10m. The three Quads have a Resolution of 256, as specified in the Target Settings specifications.




Obviously the smallest 1x1 meters has the best resolution because it is the same texture spread in a smaller Quad, but I have the problem of having to use thousands and thousands of Quads to fill the floor the level withouth loosing quality.

So taking into account that my game has to run in mobile devices...My question is as follow: what setting do you recommend me using (size of texture and size of quads) to fill a level floor keeping the texture quality and a good performance?

I hope you can help,

Regards,

Rafa

*Please keep this awesome Allegorithmic team despite you have a new owner

Last Edit: February 11, 2019, 04:42:26 pm

Last Edit: February 07, 2019, 08:12:12 pm

Allegorithmic Team used to reply fast to his user's questions!

Why no one reply??

*I WROTE THIS QUESTION ONE WEEK AGO AND NO ONE OF THE STAFF REPLY SO I WILL TRY AGAIN

Hi,

I have a question about performance in Unity through SP:

I attach a photo of the same Cracked substance from Substance Source in Unity Quads with 3 different sizes just for testing: 1x1m, 5x5m, 10x10m. The three Quads have a Resolution of 256, as specified in the Target Settings specifications.




Obviously the smallest 1x1 meters has the best resolution because it is the same texture spread in a smaller Quad, but I have the problem of having to use thousands and thousands of Quads to fill the floor the level withouth loosing quality.

So taking into account that my game has to run in mobile devices...My question is as follow: what setting do you recommend me using (size of texture and size of quads) to fill a level floor keeping the texture quality and a good performance?

I hope you can help,

Regards,

Rafa

*Please keep this awesome Allegorithmic team despite you have a new owner

*I WROTE THIS QUESTION ONE WEEK AGO AND NO ONE OF THE STAFF REPLY SO I WILL TRY AGAIN

Hi,

I have a question about performance in Unity through SP:

I attach a photo of the same Cracked substance from Substance Source in Unity Quads with 3 different sizes just for testing: 1x1m, 5x5m, 10x10m. The three Quads have a Resolution of 256, as specified in the Target Settings specifications.




Obviously the smallest 1x1 meters has the best resolution because it is the same texture spread in a smaller Quad, but I have the problem of having to use thousands and thousands of Quads to fill the floor the level withouth loosing quality.

So taking into account that my game has to run in mobile devices...My question is as follow: what setting do you recommend me using (size of texture and size of quads) to fill a level floor keeping the texture quality and a good performance?

I hope you can help,

Regards,

Rafa

*Please keep this awesome Allegorithmic team despite you have a new owner


@Rafartist ,

I would say that this depends on multiple factors:

- personal preference (and look of the game)
- what devices you are targeting (and how powerful they are)
- if these Substances are static, or they change at runtime

This would be your personal preference. You could create multiple scenes with the quads + Substances attached and test the performance yourself. Obviously, the lower the texture resolution, the better the performance. But this would be on the Unity side, if they are not dynamically updated Substances (i.e. changing the parameters at runtime).
Integrations QA Analyst

Is there a reason you need to specifically use small Quads for this? Keep in mind that each quad is composed of a mesh collider with a fairly large number of triangles. If you're literally creating thousands of them, I might expect performance issues merely from the colliders alone at some point. Nevermind that having thousands of objects in your scene would be a nightmare to maintain. Maybe you're generating everything procedurally? In that case, I'm sure there are better approaches.

Anyway, I recommend you look at ProBuilder. It's free in the package manager. It handles the tiling/repeat of textures on large surfaces. So, you could create a single large surface as big as you want, and repeat the material texture over it without stretching the material.

Is there a reason you need to specifically use small Quads for this? Keep in mind that each quad is composed of a mesh collider with a fairly large number of triangles. If you're literally creating thousands of them, I might expect performance issues merely from the colliders alone at some point. Nevermind that having thousands of objects in your scene would be a nightmare to maintain. Maybe you're generating everything procedurally? In that case, I'm sure there are better approaches.

Anyway, I recommend you look at ProBuilder. It's free in the package manager. It handles the tiling/repeat of textures on large surfaces. So, you could create a single large surface as big as you want, and repeat the material texture over it without stretching the material.

Thanks by responding. I ask you about ProBuilder: the function you mention is not already included in materials setting in Unity by default? I mean, you can tile your materials in Unity choosing with and height of the tiles.

That's true, but since the tiling is on the material, instead of on the mesh renderer, it means you can't easily create objects of arbitrary sizes. So, if one of you planes is 10x10, but another should be 8x8, or 10x5, the textures wouldn't line up properly if they were all using the same material. You'd either end up creating lots of materials that share the texture (where each material has different tiling), or you'd want to programmatically change the tiling settings of the materials at runtime. Either is fairly cumbersome. Compare that to the ease of using ProBuilder.

I started using ProBuilder a couple of years ago at just about the same time I started using Unity. Trying to create rooms using just Unity planes and cubes was a nightmare.

@Rafartist

Very sorry for the late reply on this : ) I think you should look at using your plane as a 1x1 quad. As you said, you are getting the best texel density in that  1x1 quad. Also, if you have them as separated quad mesh tiles, you can then use occlusion culling to keep performance in check. I don't use pro builder so perhaps this has a more automated approach.

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

@Rafartist

Very sorry for the late reply on this : ) I think you should look at using your plane as a 1x1 quad. As you said, you are getting the best texel density in that  1x1 quad. Also, if you have them as separated quad mesh tiles, you can then use occlusion culling to keep performance in check. I don't use pro builder so perhaps this has a more automated approach.

Cheers,
Wes

Thanks Wes

That's true, but since the tiling is on the material, instead of on the mesh renderer, it means you can't easily create objects of arbitrary sizes. So, if one of you planes is 10x10, but another should be 8x8, or 10x5, the textures wouldn't line up properly if they were all using the same material. You'd either end up creating lots of materials that share the texture (where each material has different tiling), or you'd want to programmatically change the tiling settings of the materials at runtime. Either is fairly cumbersome. Compare that to the ease of using ProBuilder.

I started using ProBuilder a couple of years ago at just about the same time I started using Unity. Trying to create rooms using just Unity planes and cubes was a nightmare.

I dowloaded ProBuilder and I am giving it a try. Also I discovered ProGrid, that it seems similar to perform games where you create a a town by grid, like the one that I am creaing in Unity. Thanks by the advice!