46
\$\begingroup\$

I have recently started working with Unity and was looking for textures for the background (castle walls and such pieces) on a game that I am thinking about eventually building. I noticed that the textures are often represented as ball shaped, such as for example in this sample image here:

a bunch of spheres with various stone, brick, dirt, and grass textures

For example, why are the texture patterns not shown as simply flat squares? I guess there is a reason behind this that has to do with mapping to 3d surfaces but I was not sure so I wanted to check here.

Why are textures often represented in spherical shapes in examples and previews?

\$\endgroup\$
  • 31
    \$\begingroup\$ It's probably to see the effect of the light depending on the orientation of the surface (and thus its normal). \$\endgroup\$ – Alexandre Vaillancourt May 24 '17 at 14:40
  • 1
    \$\begingroup\$ I think that sphere shape allows you to see a texture in different angles and lighting conditions - you can place a light to get a highlight somewhere on the surface and you get a gradient from fully lit to unlit pixels. When I'm looking at some material in Unity preview I feel (personally) that I get the most info using sphere shape. \$\endgroup\$ – kolenda May 24 '17 at 14:42
  • 2
    \$\begingroup\$ kolenda that sounds like a good answer \$\endgroup\$ – jhocking May 24 '17 at 15:07
  • 3
    \$\begingroup\$ I can think of several materials where displaying them on a cube would render nothing, but using a sphere, it would. And it has everything to do with the rate of change in the surface normals as well as the view direction and occasionally lighting or other geometry considerations. \$\endgroup\$ – Draco18s May 24 '17 at 18:01
  • 1
    \$\begingroup\$ Similar question on CG.SE for raytracing the reason is the same. \$\endgroup\$ – joojaa May 25 '17 at 6:06
83
\$\begingroup\$

Because these are not textures. Textures should really be displayed as simple images, exactly as you suggest.

These are called materials, which are the texture, a shader, and a whole mess of other inputs such as a normal map.

These materials react differently based on the direction and intensity of light, so you need different angles and a directional light to get an impression of what the material looks like. Spheres do this better than other trivial shapes.

An example where this is useful (notice the massive difference in the specular highlight):

A possible reason to display simple textures as materials is if you want to show what the textures look like, without actually providing the textures. This is useful if you want people to pay for the textures.

\$\endgroup\$
13
\$\begingroup\$

Spheres are a reasonable combination of various factors.

They're simple enough to generate and draw that they aren't going to cause a significant performance impact when rendering many of them, but they not so simple as to eliminate all complexity from the model. This lets them suggest how the visual elements being previewed (textures, as you asked about, but also shaders) interact with non-planar surfaces and in a variety of orientations relative to the view and to light sources. In particular this can be useful for previewing anything with a reflective component; a sphere will have normals in effectively every direction.

Often one can switch the model being used as a preview: cubes and tori are also common, depending on the tool. But spheres have become the de facto standard since they work pretty well in most cases.

\$\endgroup\$
  • 3
    \$\begingroup\$ "a sphere will have normals in effectively every direction"...this would make sense as to why it's a sphere and not e.g. just a flat square showing the texture pattern. Thank you Josh Petrie. \$\endgroup\$ – SherlockEinstein May 24 '17 at 15:49
  • 13
    \$\begingroup\$ @SherlockEinstein reminds me of the features of the Utah teapot. The sphere doesn't allows us to see the texture under negative curvature or on self shadow. Yet, using the teapot would have raised more questions among those that didn't know about it. I would say it is more "profesional" to use spheres. \$\endgroup\$ – Theraot May 24 '17 at 16:00
1
\$\begingroup\$

Spheres provide the ability to view a material, normal and parallax mapped, from many different angles at a glance, which is good for a consumer to see the quality, and viability of the material.

Cubes are far less viable for this, as they only show a limited number of possible viewing angles, and are always flat surfaces. Spheres on the other hand, are curved surfaces, which, in a "real" game, are something you probably want to see(think changing exterior terrain, instead of an interior corridor).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.