Namespace Tizen.NUI.Scene3D

Description

Classes

BlendShapeIndex

Specialized MotionIndex to control blend shape. We can control the blend shape by index (when we set BlendShapeId as IndexKey), or by name (when we set BlendShapeId as StringKey).

Camera

Camera class controls a camera in 3D space.

Camera can be added on the SceneView and displays SceneView's virtual 3D world to the screen. Camera can be translated and rotated in the space.

Light

This class is to define 3D Light source. Currently this Light class supports Directional Light that lights every position from the same direction. (e.g, Sun light) If a Light object is added on SceneView, the 3D objects in the SceneView are shined the Light. NUI Scene3D limits the maximum enabled light count per each SceneView. Currently the maximum number is set to 5, and it can be retrieved by using MaximumActivatedLightCount. If more than 5 enabled Light objects are added on SceneView, SceneView turns on only 5 lights in the order the lights were added. This Light can be added to SceneView directly but also it can be added on other View. When a parent actor is added to a SceneView, its Light behaves in the SceneView the same as if it were added directly to the SceneView.

Material

Class for setting Material properties of 3D models.

Model

Model is a Class to show 3D mesh objects. Model supports glTF 2.0 and DLI model formats. Physically Based Rendering with Image Based Lighting is also supported.

ModelNode

ModelNode is a class for representing the Node of Model in Scene3D.

ModelPrimitive

Class for Model Primitives for 3D Geometry and Material.

MotionData

List of model motion definitions. Each motion has pair of MotionIndex and MotionValue. MotionIndex is abstract class that specify the target of motion. MotionValue is destination value of target for the motion. It can be expressed with PropertyValue or KeyFrames.

MotionIndex

Index of motion value. It will be used to specify the target of motion applied. There are three kinds of MotionIndex : MotionPropertyIndex, MotionTransformIndex and BlendShapeIndex. MotionPropertyIndex will be used for control all kind of properties. The MotionData loaded from files / buffer will have this kind of MotionIndex. MotionTransformIndex will be used for control the ModelNode's Position / Orientation / Scale, or each components. BlendShapeIndex will be used for control some blend shape animation.

MotionPropertyIndex

Basic MotionIndex to control Property. It can control more general case.

MotionTransformIndex

Specialized MotionIndex to control transform. It will be used when app developer doesn't care about Property index list, but want to change the transform properties anyway fast enough.

MotionValue

This MotionValue will be used for target value of each MotionIndex. We can get and set MotionValue as 2 types : PropertyValue and KeyFrames.

SceneView

SceneView is a Class to show multiple 3D objects in a single 2D screen. Each SceneView has its own 3D space, and 3D objects added to SceneView are positioned in the space. SceneView uses left-handed coordinate system same as NUI. X as right, Y as down, and Z as forward.

SceneView has internal root container to control inner rendering process like depth test. When a View is added to the SceneView with Add(View) method, it is actually added on the root container. Therefore, the added Views exist in the sub tree of SceneView, but are not direct children. The sub tree of Views will be rendered with the SceneView's own Camera.

SceneView has one built-in camera by default. The default Camera is not removed by using RemoveCamera(Camera) method. GetCamera(UInt32) method with index "0" returns the default camera, and the minimum value returned by GetCameraCount() method is 1.

SceneView also provides multiple Camera and one of them can be used to render multiple objects. AddCamera(Camera), RemoveCamera(Camera), GetCamera(UInt32), and SelectCamera(UInt32) are methods to manage Cameras of the SceneView. User can place multiple cameras in a scene to display the entire scene or to display individual objects. User can use the SelectCamera(UInt32) method to select the currently required camera.

When the SceneView's size changes, some camera properties that depend on its size may also change. The changing properties are as follows: AspectRatio, LeftPlaneDistance, RightPlaneDistance, TopPlaneDistance, and BottomPlaneDistance. The Camera's FieldOfView is vertical fov. The horizontal fov is updated internally according to the SceneView size.

The SetImageBasedLightSource(String, String, Single) method sets the same IBL to all Model objects added to the SceneView. For the IBL, two cube map textures(diffuse and specular) are required. SceneView supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported. If a model already has an IBL, it is batch overridden with the IBL of the SceneView. If the SceneView has IBL, the IBL of newly added models is also overridden.

The IBL textures start to be loaded asynchronously when SetImageBasedLightSource(String, String, Single) method is called. ResourcesLoaded signal notifies that the loading of the IBL resources have been completed.

If FBO is used, the rendering result of SceneView is drawn on the FBO and it is mapped on the plane of the SceneView. It could decreases performance slightly, but it is useful to show SceneView according to the rendering order with other Views.

And since SceneView is a View, it can be placed together with other 2D UI components in the NUI window.

Enums

Camera.ProjectionDirectionType

Enumeration for the projectionDirection.

Camera.ProjectionModeType

Enumeration for the projectionMode. ProjectionMode defines how the camera shows 3D objects or scene on a 2D plane with projection.

MaterialAlphaModeType

MaterialAlphaModeType is enum for Material's AlphaMode type

MaterialTextureType

MaterialTextureType is enum for Material's Texture type

MotionTransformIndex.TransformTypes

The list of transform property types what this MotionTransformIndex can control.

MotionValue.ValueType

Determine whether current stored value is PropertyValue, or KeyFrames.