This commit is contained in:
Miloslav Ciz 2024-12-03 21:42:19 +01:00
parent bf75ed2381
commit 2bd9c6afed
20 changed files with 1899 additions and 1884 deletions

View file

@ -1,10 +1,10 @@
# 3D Model
In the world of [computers](computer.md) (above all in [computer graphics](graphics.md), but also in physics simulations, 3D printing etc.) 3D model is a representation of a [three dimensional](3d.md) object, for example of a [real life](irl.md) object such as a car, [tree](tree.md) or a [dog](dog.md), but also possibly something more abstract like a [fractal](fractal.md) or [function](function.md) plot surface. 3D models can be displayed using various [3D rendering](3d_rendering.md) techniques and are used mostly to simulate [real world](real_world.md) on computers (e.g. [games](game.md)), as real world is, as we know, three dimensional. 3D models can be created in several ways, e.g. manually with 3D modeling software (such as [Blender](blender.md)) by 3D [artists](art.md), by 3D scanning real world objects, or automatically by [procedural generation](procgen.md).
In the world of [computers](computer.md) and [programming](programming.md) (above all in [computer graphics](graphics.md), but also in physics simulations, 3D printing etc.) 3D model is a representation of a [three dimensional](3d.md) object, for example of a [real life](irl.md) object such as a car, [tree](tree.md) or a [dog](dog.md), but also possibly something more abstract like a [fractal](fractal.md) or [function](function.md) plot surface. It is [model](model.md) in [mathematical](math.md) sense, i.e. an [approximation](approximation.md) or idealization of a shape that usually exists in real world but in its infinite complexity couldn't be represented in the computer. A very common thing we'll want to do with a 3D models is to draw it on the screen -- we call this [3D rendering](3d_rendering.md) and can achieve it using various rendering techniques and [algorithms](algorithm.md), but much more can be done with 3D models: for example they're used to perform simulations of the [real world](real_world.md) (e.g. [games](game.md), architectural calculations, car crash simulations, ...), because real world is, as we know, three dimensional. 3D models can be created in various ways too, e.g. manually with 3D modeling software (such as [Blender](blender.md)) by 3D [artists](art.md), by 3D scanning real world objects, automatically using [procedural generation](procgen.md), [artificial intelligence](ai.md) etc. It is even possible to create 3D models without a computer, just with [pen and paper](pen_and_paper.md).
There is a plethora of different 3D model types, the topic is very large when viewed in its whole scope because 3D models can be used and represented in many ways (and everything is yet more complex by dealing with different methods of 3D rendering) -- the **mainstream "game" 3D models** that most people are used to seeing are polygonal (basically made of triangles) boundary-representation (recording only surface, not volume) [textured](texture.md) (with "pictures" on their surface) 3D models, but be aware that many different ways of representation are possible and in common use by the industry, for example various volume representations, [voxel](voxel.md) models, [point clouds](point_cloud.md), [implicit surfaces](implicit_surface.md), [spline](spline.md) surfaces, [constructive solid geometry](csg.md), [wireframe](wireframe.md) etc. Models may also bear additional extra information and features, e.g. material, bone rigs for animation, animation key frames, density information, [LODs](lod.md), even [scripts](scripting.md) and so on.
There is a plethora of different 3D model types, the topic is very wide spanning and volume of literature is enormous when examining it in the scope of all possible areas that 3D models are used in because 3D models can really be used and represented in many ways, each of which is a tradeoff of various attributes that have different weights in different areas and industries. Everything is yet more complex by dealing with different methods of 3D rendering that favor different representations of 3D models -- the universal, **mainstream "game" 3D models** that most people are used to seeing are polygonal (basically made of triangles) boundary-representation (recording only surface, not volume) [textured](texture.md) (with "pictures" on their surface) 3D models, but be aware that many different ways of representation are possible and in common use by the industry, for example various volume representations, [voxel](voxel.md) models, [point clouds](point_cloud.md), [implicit surfaces](implicit_surface.md), [spline](spline.md) surfaces, [constructive solid geometry](csg.md), [wireframe](wireframe.md), hybrid etc. Models may also bear additional extra information and features, e.g. material, mass, bone rigs for animation, animation key frames, density information, collision shapes, [LODs](lod.md), even [scripts](scripting.md) and so on.
**3D formats**: situation here is not as simple as it is with images or audio, but there are a few formats that in practice will suffice for most of your models. Firstly the most [KISS](kiss.md) one is (Wavefront) **obj** -- this is supported by almost every 3D software, it's a text format that's easy to parse and it's even human readable and editable; obj supports most things you will ever need like UV maps and normals, and you can [hack](hack.md) it even for a primitive keyframe animation. So if you can, use obj as your first choice. If you need something a little more advanced, use **COLLADA** (.dae extension) -- this is a bit more [bloated](bloat.md) than obj as it's an [XML](xml.md), but it's still human readable and has more features, for example skeletal animation, instancing, model hierarchy and so on. Another noteworthy format is let's say [STL](stl.md), seen a lot in 3D printing. For other than polygonal models you may have to search a bit or just represent your model in some sane way, for example heightmap is naturally saved as a grayscale image, voxel model may be saved in some dead simple text format and so on. Also be always sure to **distribute your model in universal format**, i.e. don't just share Blender's project file or anything like that, that's like sharing pictures in Photoshop format or sending someone a Word document, only retards do that -- yes, you should also share the project file if possible, but it's more important to release the model in a widely supported, [future proof](future_proof.md) and non discriminating format.
**3D formats**: situation here is not as simple as it is with images or audio, but there are a few formats that in practice will suffice for most of your models. Firstly the most [KISS](kiss.md) one is probably (wavefront) **obj** -- this is supported by almost every 3D software, it's a [text](text.md) format that's easy to parse and it's even human readable and editable; obj supports most things you will ever need like UV maps and normals, and you can [hack](hack.md) it even for a primitive keyframe animation. So if you can, use obj as your first choice. If you need something a little more advanced, use **COLLADA** (.dae extension) -- this is a bit more [bloated](bloat.md) than obj as it's an [XML](xml.md), but it's still human readable and has more features, for example skeletal animation, instancing, model hierarchy and so on. Another noteworthy format is let's say [STL](stl.md), seen a lot in 3D printing. For other than polygonal models you may have to search a bit or just represent your model in some sane way, for example a [heightmap](heightmap.md) is naturally saved as a grayscale image, voxel model may be saved in some dead simple text format and so on. Also be always sure to **distribute your model in universal format**, i.e. don't just share [Blender](blender.md)'s project file or anything like that, that's like sharing pictures in Photoshop format or sending someone a Word document, only retards do that -- yes, you should also share the project file if possible, but it's more important to release the model in a widely supported, [future proof](future_proof.md) and non discriminating format.
Let's now take a closer look at a basic classification of 3D models (we only mention the important categories, this is not an exhaustive list):