What is the difference between Image, Sprite and Texture?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KijeviGombooc
:bust_in_silhouette: Reply From: johnygames

An image is an umbrella term denoting any picture file used either as a texture or a sprite. A Sprite is the image used as the visual part of a moving object. In other words, an object has its logic that defines how it interacts with the world and it also has a Sprite which is what is being displayed on screen for us to see.
The term texture is frequently used to refer to the image that is “wrapped around” a 3D object. It is the colour map that a 3D object uses in order to display its colour. Textures can also be used to create complex shaders and they are not restricted to colour maps.

In Godot there is little difference between an Image and a Texture. Call it however you like, so long as you know what an Image can be used for. You can import image files into Godot and turn them into either Sprites (via the Sprite node) or Textures (by using them with shaders).

Thanks for the answer, but I still don’t understand the difference between texture and image. There are separate classes for them in Godot, so I believe they are different, and not interchangable, but I don’t know what the difference is

KijeviGombooc | 2020-01-03 00:00

:bust_in_silhouette: Reply From: aa

Here are each of the descriptions in the documentation:

Image
Native image datatype. Contains image data, which can be converted to a Texture, and several functions to interact with it.

Texture
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D Sprite or GUI Control.

Sprite
A node that displays a 2D texture.

The difference as far as I understand it is that an image is a raw data container. A texture is a container with particular flags attached to it that makes it compatible with processes that uses textures specifically. A sprite is a node that (most often) contains a texture, but has several other control functions.