1

I have two modes to continue programming a hexagonal map in this moment, and I don't know what way is better. Maybe you can help me :)

I used a texture to represent the "grid", so the squad with this texture is static and don't move or edit in runtime.

In the first hand, I have a texture with 7700x6736 pixles, however, his size it's only 3.131KB, when I run in a random engine (Unity in this case) the frame rate it's nice (constants 60fps with VSynk and +100 without VSynk)

This texture is associated in one transparent material to the squad (2 triangles)

With the second mode, I have a 14 textures to 550x496 pixels and 21KB. But with this mode, I need 14 squads (28 triangles against 2) and 14 materials with differents textures, against 1 in the other way.

Too, with this second mode, I need asking the distance of every squad to hide or not hide (a simple occlusion culling)

What is the better way in your opinion?

tshepang
  • 12,111
  • 21
  • 91
  • 136

1 Answers1

0

While your 7k texture works on your dev machine it may be not supported in some of the platforms you'll target. I'd use a 2048^2 as a safe maximum, or even a 1024^2.

The second problem is that it may use 3MB as a JPG/PNG compressed file, but in your video memory it will be as an uncompressed one (unless you use some texture-specific compression, but you may have problems with platform support again).

Additionally - you should consider if you really need the Non Power Of Two textures, officially they should be supported ATM, but you can still get into problems on some older hardware.

In general your solution depends on the platforms that you want to target, and especially if you plan to target mobile devices (and which ones).

kolenda
  • 2,741
  • 2
  • 19
  • 30
  • Thanks for reply. I need Non Power of Two textures or the hexagonal map don't works. The platform target is Windows. I guess that the best solution is various entities with differents textures, no? – user3041700 Feb 10 '14 at 15:05
  • I'd go for a few smaller textures, this way is a bit harder to code but you can avoid future problems with HW support. Besides, I still don't see the need for NPOT textures - could you give us some screenshots:)? – kolenda Feb 10 '14 at 15:53
  • I need a NPOT texture because I create a Map texture (of hexagons) in runtime, and I get the width and hight of each hexagon, reading in a base hexagon texture that I used :) I can't upload images because I don't have range, but I can link other forum with the same question with images :) http://forum.unity3d.com/threads/227467-Many-or-few-textures-(performance) – user3041700 Feb 10 '14 at 23:14