In RAD Studio XE3 and FireMonkey 2, a new context shader creates and defines FireMonkey filters, materials and context for 3D objects. The new FMX.Types3D.TTexture class replaces the use of bitmap textures. This class uses GPU memory to store real data. TTexture is a limited class, but offers support for textures with different pixel formats, behavior and styles. The new material system is based only on shaders, and allows an unlimited variation of lighting and materials in one application. The new material system can be found in the new FMX.Materials unit and at design time in Tool Palette under the Materials category. A material is linked to 3D objects through the TMaterialSource object that can be positioned anywhere in a form. Each FireMonkey 3D object has a MaterialSource property, which links a material source to the current object. Extruded objects have additional MaterialShaftSource and MaterialBackSource properties. Each is of type TMaterialSource. This quick video introduces you to the new MaterialSource components you can use in your Windows and Mac FireMonkey 3D applications.
For additional information about the new materials system, go to the Embarcadero DocWiki and look at the following documents:
- FMX.Materials unit - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials
- TCustomMaterial class - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TCustomMaterial
- TColorMaterial class - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TColorMaterial. The initial color of TColorMaterial is red (claRed). To change the color, set the Color property. A TColorMaterial is not influenced by rays of light. TColorMaterial is used as the default material for all FireMonkey 3D objects.
- TColorMaterialSource - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TColorMaterialSource. Use TColorMaterialSource to link a TColorMaterial to 3D objects. The link is made through the MaterialSource property of the 3D object. To change the color of the material, set the Color property.
- TLightMaterial class - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TLightMaterial. TLightMaterial describes a material that interacts with the light source. To set the behavior of the material under the light influence, set the following color properties: Ambient–provides a base color to surfaces so that they may be seen. Emissive–determines whether a surface emits its own light or glows. Diffuse–it interacts directly with light, including the angle of incidence.
- TlightMaterialSource - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TLightMaterialSource. By default, the color properties (Ambient, Emissive, Diffuse, Specular) are set to simulate the shadows added to the object by the source of light. The material’s texture is specified as a TBitmap. Specify the texture by setting the Texture property of the TLightMaterialSource.
- TextureMaterial class - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TTextureMaterial. Describes a material with a texture. The material’s texture is specified through the Texture property. A TTextureMaterial is not influenced by rays of light. To link this material to a 3D object, use a TTextureMaterialSource.
- TextureMaterialSource - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Materials.TTextureMaterialSource. Defines a source of TTextureMaterial. Use TTextureMaterialSource to link a TTextureMaterial to 3D objects. The link is made through the MaterialSource property of the 3D object. By default, TTextureMaterialSource has no texture specified. The object that links to an empty TTextureMaterialSource cannot be seen on the form. The material’s texture is specified as a TBitmap. Specify the texture by setting the Texture property of the TTextureMaterialSource.
- TMaterialBook object - http://docwiki.embarcadero.com/Libraries/XE3/en/FMX.Types3D.TMaterialBook - used to create and use a library of materials
October 18 - FireMonkey 2 new MaterialSource Components for your Windows and Mac 3D Applications
Download: http://cc.embarcadero.com/item/29084
Watch on YouTube: http://www.youtube.com/watch?v=YJ6Hfd7chlk
Duration: 4 minutes and 1 second
Size: 19.6mb
Format: MP4
For additional product information go to http://www.embarcadero.com/products/rad-studio.
Post a Comment