|
|
Questions and answers for Graphics and Multimedia 3D Graphics.
|
29. Graphics and Multimedia 3D Graphics
|
| 29.1 What
are the properties that reduce the performance of a 3D graphics ?
|
| 29.2 How
lights are useful in 3D graphics ?
|
| 29.3 How
do I change the location of a model ?
|
29.1 What are the properties that reduce the performance of a 3D graphics ?
|
|
The following are some of the properties when used in a 3D graphics, reduce the
performance of a 3D graphics.
-
Brushes.
-
ClipToBounds property is set to true.
-
IsHitTestVisible property is set to True.
-
More models of Geometry3D are created.
-
Live text is added in a 3D scene.
-
BitmapEffect is applied.
When all these properties are handled efficiently, the performance of a 3D
scene can be increased.
|
29.2 How lights are useful in 3D graphics ?
|
|
Lights are similar to lights in real life. Light objects are used to illuminate
a part of a scene. Lights can be used to create shadow effects. In a 3D scene
at least one light has to be added to make the scene visible. WPF has four
different types of lights with unique functionalities.
The following are the types of light available in WPF.
-
Ambient Light - provides uniform lighting to all the objects in a 3D scene.
-
DirectionalLight - It is like a distant light source. It does not have a
location but has a direction.
-
PointLight - It illuminates like a nearby light source. It has a location and
provides light effect from the location and objects in the scene are
illuminated based on the location and position of the point light.
-
SpotLight - It is similar to a pointlight. It provides illumination in a cone
shape. The "InnerConeAngle" and "OuterConeAngle" properties determine the
illumination of the objects in the 3D scene.
|
29.3 How do I change the location of a model ?
|
|
Each model has a particular location in the scene. In order to move the model
around the scene, rotate the model or to change it's size, it is not practical
to change the vertices of a model like the 2D objects. Instead 3D models have
the "Transform" property with which you can move the models, change their sizes
or rotate them.
|
|