Alternativa3d 8 Basic Concepts

Source: Internet
Author: User

1. 3D objects

Object3d

Object3d is the basic class of all 3D objects and the simplest 3D object. It defines the basic attributes and methods of a 3D object.
Object3d can be used as a container to contain other 3D objects, similarDisplayobjectcontainer.

All 3D objects are inherited from object3d. 3D objects can be divided into visual objects and non-visual objects in general:
Non-Visual Object
● Camera3d (3D camera)
● Light3d (3D lighting)
● Ambientlight (ambient light)
● Directionallight (directional light source)
● Omnilight (Point Light Source)
● Spotlight)
● Joint (Bone and Joint)
Visual Object
● Axisalignedsprite (plane object of a single axial positive pair camera)
● Sprite3d (all plane objects with axial orientation facing the camera)
● Animsprite (sprite3d animated by constantly changing materials)
● Mesh (space grid)
● Decal (pattern)
● Plane (plane)
● Box (cube)
● Geosphere)
● Skybox)
● Skin (bone animation)
● Wireframe)

3D objects in alternativa3d 8

■ Mesh

MeshIt can be understood as a space grid, which is a place where geometry is displayed. Geometry contains vertex and triangle surface information describing the ry.
The display form of the ry in the mesh is surface, which is composed of a series of triangular surfaces that are displayed through the surface material. It may be easier to understand the surface as a skin.
The relationships among mesh, geometry, and surface are: geometry provides vertex and triangle information for the mesh. The mesh creates a surface based on the information to display the 3D object described by geometry.

All the space ry to be displayed inherits from the mesh class. Both the built-in basic ry and the custom ry (code creation or external import model) are displayed through the mesh.
Alternativa3d provides usDecal,Plane,Box,Geosphere,SkyboxAnd other basic ry.

Surface

Surface can be understood as a surface or skin. It consists of a series of triangular surfaces and has a separate material.
Each mesh can be divided into multiple surfaces. When you need to assign a separate material to some triangular surfaces in the mesh, you can create a continuous triangular surface with serial numbers as a surface.
For example, if the mesh has 10 triangular surfaces, you must assign the material M0 to the triangle surface 0, 1, 2, 5, and 6, and assign the material M1 to the other triangular surfaces, you can divide the triangle into four sequences: [0, 1, 2], [3, 4], [5, 6], [7, 8, 9], and create four surfaces: S0, S1, S2, and S3, s0 and S2 give material M0, S1 and S3 give material M1.

Skin

To put it simply,SkinIt is a mesh with a skeleton animation. Use joint to bind the vertex to connect to the skeleton.

■ Joint

JointIt can be understood as a joint, a part of skin, used for bone animation.

2. Material

■ Material

Material is a very important part of 3D objects. 3D objects without materials are just a pile of data describing the shape and appearance of the ry, and nothing can be seen. All the wonderful space ry we can see is displayed by material, which makes virtual 3D objects visible.

Materials are divided into fillmaterial and texturematerial ).
MaterialIt is the base class of all materials and defines the basic attributes and methods of materials.
FillmaterialFill the surface with a single color.
TexturematerialIt is a texture and fills the surface with a bitmap. To correctly display the texture effect, it is very important to set the UV coordinates of the vertex of the ry.
ParsermaterialTo store material information of the *. Dae or *. a3d model loaded externally, you need to use textureloader to load the external texture.

Lightmapmaterial, standardmaterial, and vertexlighttexturematerial are inherited fromTexturematerial.
StandardmaterialSupports Diffuse maps, normal maps, highlight maps, gloss maps, and gloss settings.
LightmapmaterialSupports light textures.
VertexlighttexturematerialSupports dynamic lighting.

Fill Material
● Fillmaterial (fill material)
Texture
● Parsermaterial (resolution material)
● Texturematerial (texture)
● Standardmaterial (standard material)
● Lightmapmaterial (light texture)
● Vertexlighttexturematerial (dynamic light texture)

Material in alternativa3d 8

3. Resources

■ Resource

ResourceIs the basis class of GPU resources. It defines the attributes and methods related to resource upload and release.
There are two types of GPU resources: ry resources and texture resources.
The ry resources are uploaded using vertexbufferresource and indexbufferresource.
Texture resources include bitmaptextureresource and atftextureresource ).

Ry Resources
● Geometry (ry resources)
Texture Resources
● Textureresource (texture Resource)
● Atftextureresource (compressing texture resources)
● Bitmaptextureresource (Bitmap Resource)
● Externaltextureresource (external texture Resource)

Resources in alternativa3d 8

■ Geometry

GeometryStores the geometric data of 3D objects and records the information of each vertex. The information is divided into multiple vertex caches and uploaded to the GPU.
Vertex information includes 3D coordinates (position), texture coordinates (texcoords), normal, tangent (tangent4), and joints.

■ Textureresource

TextureresourceIs the base class of the texture resource.
Texture resources include bitmap texture resources (Bitmaptextureresource) And compress texture resources (Atftextureresource).
The bitmap resource is uploaded as bitmapdata, while the ATF compresses the texture resource to upload as binary data (bytearray.
ExternaltextureresourceUsed to load external texture resources. Combined with textureloader, you can easily load the texture of an external model.

4. External Model

Alternativa3d supports loading and parsing external models. The supported model file formats include: *. Dae, *. A3d, *. 3DS.
*. Dae is an XML-based Collada model file. *. a3d is a specialized alternativa3d model file, and *. 3Ds is the format used by 3DS MAX.
Alternativa3d provides related 3DS MAX plug-ins to export models in *. Dae and *. a3d formats.

Through the model parser, you can easily parse the loaded model and obtain information about the ry object, texture, animation, and lighting in the model.
Parsercollada: *. Dae format model parser, which can obtain the geometric objects, Texture Materials, animations, and lights in the model.
Parsera3d: *. A3d model parser, which can obtain the ry object and texture in the model.
Parser3ds: *. 3DS model parser, which can obtain the ry object and texture in the model.

In addition, alternativa3d providesExportera3dClass to export and save a 3D object as a model file in *. a3d format.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.