Simple properties of the UNITY3D~~~3D model

Source: Internet
Author: User

Each 3D object is made up of vertices and polygons. This is called a grid (mesh). Each vertex has a normalized "normal" vector that represents the direction of the polygon connected to the vertex. This is important for calculating lighting. When calculating the illumination of diffuse and specular reflection, the normal vector is used to determine the angle between the light and the surface of the 3d object.

The following is an extreme simplification of a rough formula used to calculate the color of each point on an object surface to provide a relationship between all the values. These are not actually used equations. Distance_to_object is the distance between the light source and the object and the angle between the surface and the light source:

Diffuse = Object_diffuse * Light_diffuse/(Distance_to_object * angle);
Ambient = object_ambient * light_ambient;
emissive = object_emissive;
Specular = Object_specular * light_specular;
Final_color = (diffuse + ambient +emissive) * object_texture+specular;

As you can see, the final color of the object is actually a mixture of the effects produced by many different lights.

Brief introduction:

Diffuse: The most commonly used color component. The Light (shadow) of the distance to darken the point of the surface. If the falloff sets your light source, the diffuse reflection value will decrease when the object is away from the light. Diffusion is the main color value of the worries. For the diffuse color of the material to be visible, you must have at least one light with a non-black diffuse color image, and the light must be on the side of the object's camera. As with the ambient and spontaneous light colors, if there is a texture, this is multiplied by the texture color, otherwise this is because if it has a white texture.

Ambient: Create the same effect with light from all sides hitting your object. For the ambient color of the material is visible, you must have a non-black ambient color for the image in at least one light band. To make sure there are no black edges to your object, try setting a light source environment value (0.1,0.1,0.1) in the scene and your object's ambient value equals its diffuse value (set the "color" parameter for convenience). This is ideal for fast building, with only one light source in the scene. such as diffuse and spontaneous light color, if there is a texture, this will be multiplied by the texture color, otherwise this is because if it has a white texture.

Emissive: If you want to, even if there is no light, or if you just want a little luster to add to your object, set this value to the visible object. This has the same effect as the environment really just because it does not require light in a scene that emits ambient light. such as diffuse and ambient color, if there is a texture, this is multiplied by the texture color. The glowing color does not actually emit light to other purposes, otherwise this is because if it has a white texture.

Specular: Setting this value will make your object more or less shiny. For a purpose that has specular reflection, the object and the light (multiple) must have this value set to non-black. The object also has a specular reflection of the power component, which affects the width of the gloss. Lower values produce small specular reflections, while larger values broaden the reflection. A very beautiful effect is that there are 4 or 5 lights in the scene randomly placed around each of the different color mirrors, and your object's highlight is set to White (1.0,1.0,1.0). Try to get the full effect of the power value in 5?100, you should have your object around. The material has no effect on specular highlights.

Texture: Textures map images to the surface of your object. For each pixel of the image represented by the object, on each color component (red, green, blue), we first calculate the color using diffuse, ambient and spontaneous brightness, and then multiply the texture in that pixel. The specular height, if any, is then added to the resulting color value. If there is texture, you usually want to set the diffuse reflection and the environment to be white. If you want the texture to show as it is, without any shading, set the diffuse and ambient to black, and set the glow to white.

Alpha: Alpha determines the transparency of the final color of the object. It is a value of 0.0 (transparent) to 1.0 (opaque). If the material has a texture, the alpha channel of the texture overrides the material's alpha value.

Color This is both the diffuse and ambient color of your object. It is merely a convenient to setting both at the same time. See diffuse and ambient below for more detail.
Diffuse The diffuse float_color value for a material on your object. This parameter can is set to 3 floats (red, green, blue) or 3 floats and an integer (red, green, Blue, material_index). Objects can has multiple materials, one for each part of the object (cubes has six materials, one for each face). If you don ' t specify a material_index, you'll be setting the color of all materials in the object. You can set a entire cube to blue by setting it color to (0.0, 0.0, 1.0). Color component values (red, green and blue) should be between 0.0 and 1.0, though using the values greater than 1 can make th E object brighter in darkly lit scenes. When calculating the color and shading of a object, we take each light source within range and cumulatively multiply thei R diffuse and ambient colors by the diffuse and ambient colors of the object respectively. The diffuse light are adjusted for attenuation (distance to light) and the angle between the surface and the light (on a PE R Vertex basis using Vertex normals) While ambient light are not adjusted for distance or angle. Emissive is then added to the diffuse and ambient values. If there is a texture, it'll be adjusted by the sum of the lit diffuse, ambient and emissive values. So setting diffuse and ambient or emissive color values to (1, 0, 0) would eliminate all greens and blues from the Displaye D texture. Then the calculated lit specular value was added to produce, the final shading for the D3D picture part. Black is (0.0, 0.0, 0.0). White is (1.0, 1.0, 1.0).
ambient The ambient Float_color value for a material on your object. This parameter can is set to 3 floats (red, green, blue) or 3 floats and an integer (red, green, Blue, material_index). Color component values (red, green and blue) should be between 0.0 and 1.0, though using the values greater than 1 can make th E object brighter in darkly lit scenes. When calculating the color and shading of a object, we take each light source within range and cumulatively multiply thei R diffuse and ambient colors by the diffuse and ambient colors of the object respectively. The diffuse light are adjusted for attenuation (distance to light) and the angle between the surface and the light (on a PE R vertex basis using vertex normals) while ambient light are not adjusted for distance or angle. Emissive is then added to the diffuse and ambient values. If there is a texture, it'll be adjusted by the sum of the lit diffuse, ambient and emissive values. So setting diffuse and ambient or emissive color values tO (1, 0, 0) would eliminate all greens and blues from the displayed texture. Then the calculated lit specular value was added to produce, the final shading for the D3D picture part. Black is (0.0, 0.0, 0.0). White is (1.0, 1.0, 1.0).
Emissive The emissive float_color value for a material on your object. Emissive color is similar to ambient color, except this it does not require, this any light being in the picture. An object with a emissive color of white and no texture would appear pure white in your picture. This parameter can is set to 3 floats (red, green, blue) or 3 floats and an integer (red, green, Blue, material_index). Color component values (red, green and blue) should be between 0.0 and 1.0. Black is (0.0, 0.0, 0.0). White is (1.0, 1.0, 1.0).
Specular The specular Float_color value and power for a material on your object. Specular is made up of a float_color (red, green, blue) and a Power component. The Power component of specularity adjusts the sharpness of the highlights. A larger power value creates sharper specular highlights, making the surface appear to be quite shiny. Smaller values increase the area of the effect, creating a dull reflection that makes the surface look frosty. To make a object truly matte, set the power member to zero and the color in specular to black. Powers usually range between 0 and. Specular highlights is affected by attenuation. Specular is independent from diffuse, ambient and emissive, and requires the light has a non-zero specular value. The specular highlights is added to the lit diffuse, ambient and emissive values to get the final displayed color. Specular is a independent system this can be either 4 floats (red, green, blue, power) or 4 floats and 1 int (red, green, BLue, Power, Material_index). Setting specular to anything other than black would incur a slight performance hit for each call to Picture.present ().
Alpha this is the alpha value for a material on your object. Alpha is a float which should be between 0.0 (transparent) and 1.0 (opaque). A value of 0.5 would be half transparent, meaning that whatever was behind this object (given, which is behind B Efore this object) would contribute to 50% of the final color.
Transparent_color The Transparent_color color is used by the Load_texture () method in SDL. It is 3 ints (red, green, blue). Any texture loaded by the Load_texture () method in PCL would has this color set to transparent (an alpha of 0). When loading a mesh, the textures loaded during that process would has this transparent_color applied to them. To conserve video memory, we recommended the Create Texture objects and apply them to your D3D picture Parts manually In order to reuse the same texture in multiple places.
Mesh_texture Texture to apply to the object. The Material_index is optional. Create a named Texture object in SDL above the D3D picture part definition and then apply it to objects by setting this VA Lue.
Mesh_scale scale modifier. Takes three floats (x, Y, z). Would scale an object along three axes. A scale of anything other than (1.0, 1.0, 1.0) would incur a slight performance penalty when rendering. If you object was one of the built in D3D picture Parts (i.e. cone, cuboid, cylinder, mesh, plane, sphere), it's better to Size your object beforehand to the desired size. If you were loading an 3d object from a file using the mesh picture part, it was better to use Scale_factor, which applies a One time scaling to the mesh upon loading. If you plan to frequently scale your D3D picture part during animation, Mesh_scale and the Set_scale () method would be mor e appropriate since the Scale_mesh () method can incur a slight one time hit to performance.
Description Description of this object.

Simple properties of the UNITY3D~~~3D model

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.