![]() |
KudanAR - iOS
1.6.0
|
#import <ARLightMaterial.h>
Inherits ARMaterial.
Properties | |
ARMaterialProperty * | colour |
ARTexture * | blendTexture |
ARMaterialProperty * | diffuse |
ARMaterialProperty * | ambient |
ARMaterialProperty * | specular |
ARMaterialPropertyReflection * | reflection |
ARMaterialProperty * | normal |
float | shininess |
float | alpha |
float | blendParameter |
float | refractivityRatio |
int | maxLights |
BOOL | perPixelShader |
![]() | |
NSString * | name |
BOOL | isTranslucent |
ARBlendMode | blendMode |
BOOL | depthTest |
BOOL | depthWrite |
BOOL | colourWrite |
ARFaceCullMode | cullMode |
ARShaderProgram * | shaderProgram [implementation] |
Additional Inherited Members | |
![]() | |
(void) | - postRender |
(BOOL) | - prepareRendererWithNode: [implementation] |
An ARLightMaterial is a material for shading using dynamic lighting. This is most commonly used with 3D models.
Example of use:
|
readwritenonatomicassign |
Transparency of the material. 1.0 for fully opaque objects. 0.0 for fully transparent objects.
Default is 1.0.
|
readwritenonatomicassign |
The ambient component of lighting applied to the material. Represents a solid colour unaffected by other lighting in the scene.
Can be set as a constant value or as a texture. When set as a constant value using an ARVector3, this acts as an emission factor, which causes the material to effectively light itself with the given colour of light. When set using an ARTexture, it behaves as an Occlusion Map, where white areas of the map are areas of the texture are those that should have ambient light and dark areas of the map are areas of the texture that shouldn't have ambient light. Setting it with a texture is useful for objects with creases or folds, as light wouldn't naturally reach the entire object. A hood is a good example of such an object.
|
readwritenonatomicassign |
The blend parameter. Mixes blendTexture with the colour texture based on value. The range is 0..1, where 0 is only the colour texture and 1 is only the blend texture.
Default is 0.0.
|
readwritenonatomicassign |
The blend texture is a secondary texture with an inverted alpha value. It blends with the colour texture based on the blend parameter. The level of transparency for both the main and blend textures depends on the blend parameter. If the blend parameter is 0, the renderer will draw only the main texture. If the blend parameter is 1, the renderer will draw only the blend texture. Anything in between displays both textures at varying degrees of transparency.
Only used when colour.texture is set.
|
readwritenonatomicassign |
The base colour of the material, settable via either a vector or with a texture.
|
readwritenonatomicassign |
The diffuse component of lighting applied to the material. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on this angle, and does not change as objects move around.
Can be set as a constant value or as a texture.
|
readwritenonatomicassign |
Maximum number of dynamic lights the material can be lit by in the scene. More lights will cause more intensive calculations and produce lower framerates.
Default is 1.
|
readwritenonatomicassign |
The map used to calculate surface normals for high-quality lighting.
Can be set as a texture only.
|
readwritenonatomicassign |
Whether the lighting calculations should occur on a per-vertex or a per-pixel basis. Per-pixel lighting calculations produce better visual results at the expense of performance. Some lighting functions, such as normal maps and accurate dynamic lighting, are unavailable in the per-vertex case.
|
readwritenonatomicassign |
This property contains two properties of its own, an environment map and a reflectivity factor. These are used for image-based reflections and refractions.
Reflectivity is set in the range of 0..1.
The Environment map variable is a texture cube that simulates the environment surrounding the material. It must be assigned a cube map for reflection to occur.
|
readwritenonatomicassign |
Ratio between the refractive indices of the mediums the light enters and exits during refraction.
Default is 1.0.
For example: Air has a refractive index of 1.0003 Glass has a refractive index of 1.517
The correct ratio of light that is entering a glass material from air is:
refractivityRatio = r(Air) / r(Glass) = 1.0003 / 1.517 = 0.66
|
readwritenonatomicassign |
The shininess factor affects the amount of specular light emitted by the material. A lower value makes the material appear duller. A higher value makes the material appear shinier.
|
readwritenonatomicassign |
The specular component of lighting applied to the material. A specular highlight is dependent on the surface angle, light angle, and viewing angle. The highlight is actually just a realtime-suitable way to simulate blurred reflections of a light source. The level of blur for the highlight is controlled with the shininess property. Represents the reflection of light at the reflection angle from an incident light source.
Can be set as a constant value or as a texture.