Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » ECBCameraFeedView
Behavior adding support to display a camera feed view.
Feed view adds a component resource attached to a bone in the owner collider. The component is oriented to face along the Z axis pointing towards the user. The view can be enabled independent of the owner element. If the owner element is hidden during capturing the feed view stays visible. The size of the view adjusts with the distance to the viewer to make the view always cover an equal amount of screen space. The feed view is oriented to always face the user similar to a decal.
This behavior can be used only once on an element.
Element class properties have the prefix cameraFeedView.
.
Size in pixels of the image produced by the camera feed.
cameraFeedView.feedSize
(512, 320)
(16:10 ratio)<point name='cameraFeedView.feedSize' x='512' y='320'/>
View angle in degrees of the camera feed.
cameraFeedView.viewAngle
45
10
and at most 110
<float name='cameraFeedView.viewAngle'>45</float>
Set path of model resource to use.
cameraFeedView.model
or cameraFeedView({id}).model
/content/models/videocamera/camerafeedview.demodel
*.demodel
<string name='cameraFeedView.model'>box.demodel</string>
Set path of skin resource to use.
cameraFeedView.skin
or cameraFeedView({id}).skin
/content/models/videocamera/camerafeedview.deskin
*.deskin
<string name='cameraFeedView.skin'>box.deskin</string>
Set path of rig resource to use.
cameraFeedView.rig
or cameraFeedView({id}).rig
*.derig
<string name='cameraFeedView.rig'>box.derig</string>
Set path of occlusion mesh resource to use.
cameraFeedView.occlusionMesh
or cameraFeedView({id}).occlusionMesh
*.deoccmesh
<string name='cameraFeedView.occlusionMesh'>box.deoccmesh</string>
Set path of audio model resource to use.
cameraFeedView.audioModel
or cameraFeedView({id}).audioModel
*.demodel
<string name='cameraFeedView.audioModel'>box.demodel</string>
Set if component is rendered in environment maps.
cameraFeedView.renderEnvMap
or cameraFeedView({id}).renderEnvMap
true
<boolean name='cameraFeedView.renderEnvMap'>false</boolean>
Set if component is affecting audio.
cameraFeedView.affectsAudio
or cameraFeedView({id}).affectsAudio
false
<boolean name='cameraFeedView.affectsAudio'>false</boolean>
Set movement hint.
cameraFeedView.hintMovement
or cameraFeedView({id}).hintMovement
Allowed Values:
Value | Description |
---|---|
stationary | Component remains static for the entire lifetime. |
jittering | Component remains mostly static jittering in a small area. |
dynamic | Component moves around freely. |
dynamic
<string name='cameraFeedView.hintMovement'>dynamic</string>
Set enable GI in graphic module if supported.
cameraFeedView.enableGI
or cameraFeedView({id}).enableGI
false
<boolean name='cameraFeedView.enableGI'>false</boolean>
Set GI important hint. Value is in the range from 0
(very unimportant) to 4
(very important). This hint can be used by the graphic module to improve performance by excluding components with a GI important below a user chosen threashold.
cameraFeedView.hintGIImportance
or cameraFeedView({id}).hintGIImportance
4
0
and at most 4
<integer name='cameraFeedView.hintGIImportance'>3</integer>
Set texture replacements.
cameraFeedView.textureReplacements
or cameraFeedView({id}).textureReplacements
4
0
and at most 4
Example (*.deeclass)
<map name='component.textureReplacements'> <!-- define texture replacement with unique identifier 'material' --> <map key='material'> <!-- optional: path to skin to replace texture with --> <string key='skin'>different_material.deskin</string> <!-- optional: apply tinting to material. requires color type renderable named 'tint' --> <color key='tint' r='0.5' g='0.8' b='1'/> <!-- optional: transform texture coordinates --> <map key='transform'> <!-- optional: texture coordinate scaling with center of texture as origin --> <vector2 key='scale' x='2' y='2'/> <!-- optional: texture coordinate rotation with center of texture as pivot point --> <float key='rotate'>90</float> <!-- optional: texture coordinate translation --> <vector2 key='translate' x='0.5' y='0'/> </map> </map> </map>
This behavior has no events.
This behavior adds no conversation commands.
This behavior adds no conversation conditions.
This behavior adds no behavior tree actions.
This behavior adds no behavior tree conditions.
This behavior does not support optional behaviors.
Since DEMoCap Version 1.3
class MyElement extends BehaviorElementClass public var ECBehaviorCollider collider public var ECBehaviorCamera camera public var ECBCameraFeedView feedView func new() collider = ECBehaviorCollider.new(this) camera = ECBehaviorCamera.new(this, collider) camera.getAttach().getPosition().setVector(Vector.new(0, 0, 0.1)) camera.getViewDistance().setValue(300) camera.getPathParameters().setValue("/content/camera/videocamera.decamera") feedView = ECBCameraFeedView.new(this, camera) end end
Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):
<?xml version='1.0' encoding='UTF-8'?> <elementClass name='MyClass' class='GenericBehaviorElement'> <behavior type='ECBehaviorCollider'/> <behavior type='ECBehaviorCamera'> <string name='.pathParameters'>/content/camera/videocamera.decamera</string> </behavior> <behavior type='ECBCameraFeedView'> <!-- optional: use camera with id instead of empty string --> <string name='camera'>second</string> <!-- set element properties. omit property prefix if used inside behavior tag --> <string name='.model'>cameraFinder.demodel</string> </behavior> </elementClass>