Surface definition?
Blitz3D Forums/Blitz3D Beginners Area/Surface definition?
| ||
From the help: "Surfaces are sections of mesh. A mesh may contain only one section, or very many" Does this refer to 'non-connected' mesh elements inside a single mesh file? Like if I load a .b3d mesh that contains 3 teapots that are not connected to each other in any way. Would that mesh have 3 surfaces? I tested with CountSurfaces and it seems the answer is no to this because I get a count of 1. Does 'surface' relate to textures in some way? Like multiple texture maps on a given mesh maybe? If it is defined better somewhere in the help, I have not come across it yet. Thanks, |
| ||
Surfaces really just group vertices/triangles in a manner which suits you. It's best to keep the number of surfaces to a minimum for speed purposes. Texturing is one aspect, in that you can create 'brushes' (a brush being a collection of texture plus properties such as shininess, alpha level, etc) and then apply different brushes to different surfaces on the same mesh depending on your needs (eg. a 'solid' surface for the body of your amazing fighter plane, and a separate transparent surface for the cockpit windshield), but surfaces can also be used to separate parts of a mesh for things like collisions (eg. creating separate surfaces for the wings and fuselage of a plane, and using CollisionSurface to detect whether a shot has hit the wings or the fuselage, etc)... Ultimately, you decide what warrants being a separate surface in your model depending on your requirements, but you should try to combine things into the minimum number of surfaces where possible. Also, you can indeed have completely 'non-connected' surfaces (and polygons) in the same mesh. |