1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
|
3 | <X3D profile='Immersive' version='3.2' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'> |
4 | <head> |
5 | <meta name='title' content='CameraPrototypes.x3d'/> |
6 | <meta name='description' content='Camera, CameraShot and CameraMovement prototypes that demonstrate storyboard capabilities and precise camera operation. This is a developmental effort for potential X3D Specification improvement.'/> |
7 | <meta name='creator' content='Don Brutzman and Jeff Weekley'/> |
8 | <meta name='created' content='16 March 2009'/> |
9 | <meta name='modified' content='20 January 2020'/> |
10 | <meta name=' TODO ' content=' Schematron rules, backed up by initialize() checks '/> |
11 | <meta name='reference' content='BeyondViewpointCameraNodesWeb3D2009.pdf'/> |
12 | <meta name='reference' content='https://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/navigation.html'/> |
13 | <meta name='subject' content='Camera nodes for Viewpoint navigation control'/> |
14 | <meta name='reference' content='CameraExamples.x3d'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d'/> |
16 | <meta name='reference' content='http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d'/> |
17 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
18 | <meta name='license' content='../license.html'/> |
19 | </head> |
20 | <Scene> |
21 | <!-- =============== Camera ============== --> |
22 | <WorldInfo title='CameraPrototypes.x3d'/> |
23 | <ProtoDeclare name='Camera' appinfo='Camera node provides direct control of scene view to enable cinematic camera animation shot by shot and move by move along with still digital-photography settings for offline rendering of camera images.'> |
24 | <!-- Viewpoint-related fields, NavigationInfo-related fields and Camera-unique fields --> |
25 | <ProtoInterface> |
26 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this Camera'/> |
27 |
<field name='position' type='SFVec3f' value='0 0 10' accessType='inputOutput'
appinfo='Camera position in local transformation frame, which is default prior to first CameraShot initialPosition getting activated'/> |
28 |
<field name='orientation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'
appinfo='Camera rotation in local transformation frame, which is default prior to first CameraShot initialPosition getting activated'/> |
29 |
<field name='fieldOfView' type='SFFloat' value='0.7854' accessType='inputOutput'
appinfo='pi/4'/> |
30 |
<field name='set_fraction' type='SFFloat' accessType='inputOnly'
appinfo='input fraction drives interpolators'/> |
31 |
<field name='set_bind' type='SFBool' accessType='inputOnly'
appinfo='input event binds or unbinds this Camera'/> |
32 |
<field name='bindTime' type='SFTime' accessType='outputOnly'
appinfo='output event indicates when this Camera is bound'/> |
33 |
<field name='isBound' type='SFBool' accessType='outputOnly'
appinfo='output event indicates whether this Camera is bound or unbound'/> |
34 |
<field name='nearClipPlane' type='SFFloat' value='0.25' accessType='inputOutput'
appinfo='Vector distance to near clipping plane corresponds to NavigationInfo.avatarSize[0]'/> |
35 |
<field name='farClipPlane' type='SFFloat' value='0.0' accessType='inputOutput'
appinfo='Vector distance to far clipping plane corresponds to NavigationInfo.visibilityLimit'/> |
36 |
<field name='shots' type='MFNode' accessType='inputOutput'
appinfo='Array of CameraShot nodes which in turn contain CameraMovement nodes'> |
37 | <!-- initialization nodes (if any) go here --> |
38 | </field> |
39 |
<field name='headlight' type='SFBool' value='true' accessType='inputOutput'
appinfo='Whether camera headlight is on or off'/> |
40 |
<field name='headlightColor' type='SFColor' value='1 1 1' accessType='inputOutput'
appinfo='Camera headlight color'/> |
41 |
<field name='headlightIntensity' type='SFFloat' value='1' accessType='inputOutput'
appinfo='Camera headlight intensity'/> |
42 |
<field name='filterColor' type='SFColor' value='1 1 1' accessType='inputOutput'
appinfo='Camera filter color that modifies virtual lens capture'/> |
43 |
<field name='filterTransparency' type='SFFloat' value='1' accessType='inputOutput'
appinfo='Camera filter transparency that modifies virtual lens capture'/> |
44 |
<field name='upVector' type='SFVec3f' value='0 1 0' accessType='inputOutput'
appinfo='upVector changes modify camera orientation (and possibly vice versa)'/> |
45 |
<field name='fStop' type='SFFloat' value='5.6' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
46 |
<field name='focusDistance' type='SFFloat' value='10' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
47 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
48 |
<field name='totalDuration' type='SFTime' accessType='outputOnly'
appinfo='Total duration of contained enabled CameraShot (and thus CameraMovement) move durations'/> |
49 |
<field name='offlineRender' type='SFNode' accessType='inputOutput'
appinfo='OfflineRender node'> |
50 | <!-- initialization node (if any) goes here --> |
51 | </field> |
52 |
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
53 | </ProtoInterface> |
54 | <ProtoBody> |
55 |
<!-- Viewpoint
CameraViewpoint is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for CameraViewpoint node: [from CameraPositionInterpolator.value_changed to position ] [from CameraOrientationInterpolator.value_changed to orientation ] [from CameraScript.position to position ] [from CameraScript.orientation to orientation ] [from CameraScript.isActive to set_bind ] --> <Viewpoint DEF='CameraViewpoint'> |
56 | <IS> |
57 | <connect nodeField='description' protoField='description'/> |
58 | <connect nodeField='position' protoField='position'/> |
59 | <connect nodeField='orientation' protoField='orientation'/> |
60 | <connect nodeField='fieldOfView' protoField='fieldOfView'/> |
61 | <connect nodeField='set_bind' protoField='set_bind'/> |
62 | <connect nodeField='bindTime' protoField='bindTime'/> |
63 | <connect nodeField='isBound' protoField='isBound'/> |
64 | </IS> |
65 | </Viewpoint> |
66 | <!-- NavInfo EXAMINE used since some browsers (InstantReality) try to lock view to vertical when flying to avoid disorientation --> |
67 |
<!-- NavigationInfo
CameraNavInfo is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for CameraNavInfo node: [from CameraScript.isActive to set_bind ] --> <NavigationInfo DEF='CameraNavInfo' type='"EXAMINE" "FLY" "ANY"'> |
68 | <IS> |
69 | <connect nodeField='set_bind' protoField='set_bind'/> |
70 | <!-- No need to bind outputs bindTime, isBound from NavigationInfo since Viewpoint outputs will suffice. TODO inform BitManagement that bindTime field is missing. --> |
71 | <connect nodeField='headlight' protoField='headlight'/> |
72 | <connect nodeField='visibilityLimit' protoField='farClipPlane'/> |
73 | </IS> |
74 | </NavigationInfo> |
75 | <!-- this DirectionalLight replaces NavigationInfo headlight in order to add color capability --> |
76 |
<!-- ROUTE information for CameraDirectionalLight node:
[from CameraScript.isActive to on
]
-->
<DirectionalLight DEF='CameraDirectionalLight' global='true'> |
77 | <IS> |
78 | <connect nodeField='on' protoField='headlight'/> |
79 | <connect nodeField='color' protoField='headlightColor'/> |
80 | <connect nodeField='intensity' protoField='headlightIntensity'/> |
81 | </IS> |
82 | <!-- TODO confirm other default field values match NavigationInfo spec --> |
83 | </DirectionalLight> |
84 |
<!-- PositionInterpolator
CameraPositionInterpolator is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for CameraPositionInterpolator node: [from value_changed to CameraViewpoint.position ] --> <PositionInterpolator DEF='CameraPositionInterpolator' key='0 1' keyValue='0 0 0 0 0 0'> |
85 | <IS> |
86 | <connect nodeField='set_fraction' protoField='set_fraction'/> |
87 | </IS> |
88 | </PositionInterpolator> |
89 |
<!-- OrientationInterpolator
CameraOrientationInterpolator is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for CameraOrientationInterpolator node: [from value_changed to CameraViewpoint.orientation ] --> <OrientationInterpolator DEF='CameraOrientationInterpolator' key='0 1' keyValue='0 1 0 0 0 1 0 0'> |
90 | <IS> |
91 | <connect nodeField='set_fraction' protoField='set_fraction'/> |
92 | </IS> |
93 | </OrientationInterpolator> |
94 | < ROUTE fromNode='CameraPositionInterpolator' fromField='value_changed' toNode='CameraViewpoint' toField='position'/> |
95 | < ROUTE fromNode='CameraOrientationInterpolator' fromField='value_changed' toNode='CameraViewpoint' toField='orientation'/> |
96 |
<!-- ROUTE information for CameraScript node:
[from position to CameraViewpoint.position
]
[from orientation to CameraViewpoint.orientation
]
[from isActive to CameraViewpoint.set_bind
]
[from isActive to CameraNavInfo.set_bind
]
[from isActive to CameraDirectionalLight.on
]
-->
<Script DEF='CameraScript' directOutput='true' mustEvaluate='true'> |
97 | <!-- binding is controlled externally, all camera operations proceed the same regardless of whether bound or not --> |
98 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this Camera'/> |
99 |
<field name='position' type='SFVec3f' accessType='inputOutput'
appinfo='Camera position in local transformation frame'/> |
100 |
<field name='orientation' type='SFRotation' accessType='inputOutput'
appinfo='Camera rotation in local transformation frame'/> |
101 |
<field name='set_fraction' type='SFFloat' accessType='inputOnly'
appinfo='input fraction drives interpolators'/> |
102 |
<field name='set_bind' type='SFBool' accessType='inputOnly'
appinfo='input event binds or unbinds this Camera'/> |
103 |
<field name='fieldOfView' type='SFFloat' accessType='inputOutput'
appinfo='pi/4'/> |
104 |
<field name='nearClipPlane' type='SFFloat' accessType='inputOutput'
appinfo='Vector distance to near clipping plane'/> |
105 |
<field name='farClipPlane' type='SFFloat' accessType='inputOutput'
appinfo='Vector distance to far clipping plane'/> |
106 |
<field name='shots' type='MFNode' accessType='inputOutput'
appinfo='Array of CameraShot nodes which in turn contain CameraMovement nodes'> |
107 | <!-- initialization nodes (if any) go here --> |
108 | </field> |
109 |
<field name='filterColor' type='SFColor' accessType='inputOutput'
appinfo='Camera filter color that modifies virtual lens capture'/> |
110 |
<field name='filterTransparency' type='SFFloat' accessType='inputOutput'
appinfo='Camera filter transparency that modifies virtual lens capture'/> |
111 |
<field name='upVector' type='SFVec3f' accessType='inputOutput'
appinfo='upVector changes modify camera orientation (and possibly vice versa)'/> |
112 |
<field name='fStop' type='SFFloat' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
113 |
<field name='focusDistance' type='SFFloat' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
114 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
115 |
<field name='totalDuration' type='SFTime' accessType='outputOnly'
appinfo='Total duration of contained enabled CameraShot (and thus CameraMovement) move durations'/> |
116 |
<field name='offlineRender' type='SFNode' accessType='inputOutput'
appinfo='OfflineRender node'> |
117 | <!-- initialization node (if any) goes here --> |
118 | </field> |
119 |
<field name='ViewpointNode' type='SFNode' accessType='initializeOnly'
appinfo='node reference to permit getting setting fields from within Script'> |
120 | <Viewpoint USE='CameraViewpoint'/> |
121 | </field> |
122 |
<field name='NavInfoNode' type='SFNode' accessType='initializeOnly'
appinfo='node reference to permit getting setting fields from within Script'> |
123 | <NavigationInfo USE='CameraNavInfo'/> |
124 | </field> |
125 |
<field name='CameraPI' type='SFNode' accessType='initializeOnly'
appinfo='node reference to permit getting setting fields from within Script'> |
126 | <PositionInterpolator USE='CameraPositionInterpolator'/> |
127 | </field> |
128 |
<field name='CameraOI' type='SFNode' accessType='initializeOnly'
appinfo='node reference to permit getting setting fields from within Script'> |
129 | <OrientationInterpolator USE='CameraOrientationInterpolator'/> |
130 | </field> |
131 |
<field name='key' type='MFFloat' accessType='inputOutput'
appinfo='key array for interpolators'/> |
132 |
<field name='keyValuePosition' type='MFVec3f' accessType='inputOutput'
appinfo='keyValue array for PositionInterpolator'/> |
133 |
<field name='keyValueOrientation' type='MFRotation' accessType='inputOutput'
appinfo='keyValue array for OrientationInterpolator'/> |
134 |
<field name='animated' type='SFBool' value='false' accessType='inputOutput'
appinfo='whether internal CameraShot and CameraMove nodes are tracking or changed via ROUTE events'/> |
135 |
<field name='initialized' type='SFBool' value='false' accessType='initializeOnly'
appinfo='perform checkShots() function once immediately after initialization'/> |
136 |
<field name='shotCount' type='SFInt32' value='0' accessType='initializeOnly'
appinfo='how many CameraShot nodes are contained in shots array'/> |
137 |
<field name='movesCount' type='SFInt32' value='0' accessType='initializeOnly'
appinfo='how many CameraMove nodes are contained in moves array'/> |
138 |
<field name='frameCount' type='SFFloat' value='0' accessType='initializeOnly'
appinfo='how many frames were created in current loop'/> |
139 |
<field name='startTime' type='SFTime' value='0' accessType='initializeOnly'
appinfo='holding variable'/> |
140 |
<field name='priorTraceTime' type='SFTime' value='0' accessType='initializeOnly'
appinfo='holding variable'/> |
141 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
142 | <IS> |
143 | <connect nodeField='description' protoField='description'/> |
144 | <connect nodeField='position' protoField='position'/> |
145 | <connect nodeField='orientation' protoField='orientation'/> |
146 | <connect nodeField='set_fraction' protoField='set_fraction'/> |
147 | <connect nodeField='set_bind' protoField='set_bind'/> |
148 | <connect nodeField='fieldOfView' protoField='fieldOfView'/> |
149 | <connect nodeField='nearClipPlane' protoField='nearClipPlane'/> |
150 | <connect nodeField='farClipPlane' protoField='farClipPlane'/> |
151 | <connect nodeField='shots' protoField='shots'/> |
152 | <connect nodeField='filterColor' protoField='filterColor'/> |
153 | <connect nodeField='filterTransparency' protoField='filterTransparency'/> |
154 | <connect nodeField='upVector' protoField='upVector'/> |
155 | <connect nodeField='fStop' protoField='fStop'/> |
156 | <connect nodeField='focusDistance' protoField='focusDistance'/> |
157 | <connect nodeField='isActive' protoField='isActive'/> |
158 | <connect nodeField='totalDuration' protoField='totalDuration'/> |
159 | <connect nodeField='offlineRender' protoField='offlineRender'/> |
160 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
161 | </IS> |
163 | </Script> |
164 | < ROUTE fromNode='CameraScript' fromField='position' toNode='CameraViewpoint' toField='position'/> |
165 | < ROUTE fromNode='CameraScript' fromField='orientation' toNode='CameraViewpoint' toField='orientation'/> |
166 | < ROUTE fromNode='CameraScript' fromField='isActive' toNode='CameraViewpoint' toField='set_bind'/> |
167 | < ROUTE fromNode='CameraScript' fromField='isActive' toNode='CameraNavInfo' toField='set_bind'/> |
168 | < ROUTE fromNode='CameraScript' fromField='isActive' toNode='CameraDirectionalLight' toField='on'/> |
169 | </ProtoBody> |
170 | </ProtoDeclare> |
171 | <!-- =============== CameraShot ============== --> |
172 | <ProtoDeclare name='CameraShot' appinfo='CameraShot collects a specific set of CameraMovement animations that make up an individual shot.'> |
173 | <ProtoInterface> |
174 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this CameraShot'/> |
175 |
<field name='enabled' type='SFBool' value='true' accessType='inputOutput'
appinfo='Whether this CameraShot can be activated'/> |
176 |
<field name='moves' type='MFNode' accessType='inputOutput'
appinfo='Set of CameraMovement nodes'> |
177 | <!-- initializing CameraMovement nodes are inserted here by scene author using ProtoInstance --> |
178 | </field> |
179 |
<field name='initialPosition' type='SFVec3f' value='0 0 10' accessType='inputOutput'
appinfo='Setup to reinitialize camera position for this shot'/> |
180 |
<field name='initialOrientation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'
appinfo='Setup to reinitialize camera rotation for this shot'/> |
181 |
<field name='initialAimPoint' type='SFVec3f' value='0 0 0' accessType='inputOutput'
appinfo='Setup to reinitialize aimpoint (relative location for camera direction) for this shot'/> |
182 |
<field name='initialFieldOfView' type='SFFloat' value='0.7854' accessType='inputOutput'
appinfo='pi/4'/> |
183 |
<field name='initialFStop' type='SFFloat' value='5.6' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
184 |
<field name='initialFocusDistance' type='SFFloat' value='10' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
185 |
<field name='shotDuration' type='SFTime' accessType='outputOnly'
appinfo='Subtotal duration of contained CameraMovement move durations'/> |
186 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
187 |
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
188 | </ProtoInterface> |
189 | <ProtoBody> |
190 | <Script DEF='CameraShotScript' directOutput='true' mustEvaluate='true'> |
191 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this CameraShot'/> |
192 |
<field name='enabled' type='SFBool' accessType='inputOutput'
appinfo='Whether this CameraShot can be activated'/> |
193 |
<field name='moves' type='MFNode' accessType='inputOutput'
appinfo='Set of CameraMovement nodes'> |
194 | <!-- initialization nodes (if any) go here --> |
195 | </field> |
196 |
<field name='initialPosition' type='SFVec3f' accessType='inputOutput'
appinfo='Setup to reinitialize camera position for this shot'/> |
197 |
<field name='initialOrientation' type='SFRotation' accessType='inputOutput'
appinfo='Setup to reinitialize camera rotation for this shot'/> |
198 |
<field name='initialAimPoint' type='SFVec3f' accessType='inputOutput'
appinfo='Setup to reinitialize aimpoint (relative location for camera direction) for this shot'/> |
199 |
<field name='initialFieldOfView' type='SFFloat' accessType='inputOutput'
appinfo='pi/4'/> |
200 |
<field name='initialFStop' type='SFFloat' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
201 |
<field name='initialFocusDistance' type='SFFloat' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
202 |
<field name='shotDuration' type='SFTime' accessType='outputOnly'
appinfo='Subtotal duration of contained CameraMovement move durations'/> |
203 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
204 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
205 |
<field name='key' type='MFFloat' accessType='inputOutput'
appinfo='key array for interpolators'/> |
206 |
<field name='keyValuePosition' type='MFVec3f' accessType='inputOutput'
appinfo='keyValue array for PositionInterpolator'/> |
207 |
<field name='keyValueOrientation' type='MFRotation' accessType='inputOutput'
appinfo='keyValue array for OrientationInterpolator'/> |
208 | <IS> |
209 | <connect nodeField='description' protoField='description'/> |
210 | <connect nodeField='enabled' protoField='enabled'/> |
211 | <connect nodeField='moves' protoField='moves'/> |
212 | <connect nodeField='initialPosition' protoField='initialPosition'/> |
213 | <connect nodeField='initialOrientation' protoField='initialOrientation'/> |
214 | <connect nodeField='initialAimPoint' protoField='initialAimPoint'/> |
215 | <connect nodeField='initialFieldOfView' protoField='initialFieldOfView'/> |
216 | <connect nodeField='initialFStop' protoField='initialFStop'/> |
217 | <connect nodeField='initialFocusDistance' protoField='initialFocusDistance'/> |
218 | <connect nodeField='shotDuration' protoField='shotDuration'/> |
219 | <connect nodeField='isActive' protoField='isActive'/> |
220 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
221 | </IS> |
223 | </Script> |
224 | <!-- Add any ROUTEs here, going from Script to other nodes within ProtoBody --> |
225 | </ProtoBody> |
226 | </ProtoDeclare> |
227 | <!-- =============== CameraMovement ============== --> |
228 | <ProtoDeclare name='CameraMovement' appinfo='CameraMovement node defines a single camera movement animation including goalPosition, goalOrientation, goalAimPoint and goalFieldOfView.'> |
229 | <ProtoInterface> |
230 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this CameraMovement'/> |
231 |
<field name='enabled' type='SFBool' value='true' accessType='inputOutput'
appinfo='Whether this CameraMovement can be activated'/> |
232 |
<field name='duration' type='SFFloat' value='0' accessType='inputOutput'
appinfo='Duration in seconds for this move'/> |
233 |
<field name='goalPosition' type='SFVec3f' value='0 0 10' accessType='inputOutput'
appinfo='Goal camera position for this move'/> |
234 |
<field name='goalOrientation' type='SFRotation' value='0 0 1 0' accessType='inputOutput'
appinfo='Goal camera rotation for this move'/> |
235 |
<field name='tracking' type='SFBool' value='false' accessType='inputOutput'
appinfo='Whether or not camera direction is tracking towards the aimPoint'/> |
236 |
<field name='goalAimPoint' type='SFVec3f' value='0 0 0' accessType='inputOutput'
appinfo='Goal aimPoint for this move, ignored if tracking=false'/> |
237 |
<field name='goalFieldOfView' type='SFFloat' value='0.7854' accessType='inputOutput'
appinfo='Goal fieldOfView for this move'/> |
238 |
<field name='goalFStop' type='SFFloat' value='5.6' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
239 |
<field name='goalFocusDistance' type='SFFloat' value='10' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
240 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
241 |
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
242 | </ProtoInterface> |
243 | <ProtoBody> |
244 | <!-- First node determines node type of this prototype --> |
245 | <!-- Subsequent nodes do not render, but still must be a valid X3D subgraph --> |
246 | <!-- Script holds CameraMovement initialization values for query by parent CameraShot, and also permits changing values via events --> |
247 | <Script DEF='CameraMovementScript' directOutput='true' mustEvaluate='true'> |
248 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this CameraMovement'/> |
249 |
<field name='enabled' type='SFBool' accessType='inputOutput'
appinfo='Whether this CameraMovement can be activated'/> |
250 |
<field name='duration' type='SFFloat' accessType='inputOutput'
appinfo='Duration in seconds for this move'/> |
251 |
<field name='goalPosition' type='SFVec3f' accessType='inputOutput'
appinfo='Goal camera position for this move'/> |
252 |
<field name='goalOrientation' type='SFRotation' accessType='inputOutput'
appinfo='Goal camera rotation for this move'/> |
253 |
<field name='tracking' type='SFBool' accessType='inputOutput'
appinfo='Whether or not camera direction is tracking towards the aimPoint'/> |
254 |
<field name='goalAimPoint' type='SFVec3f' accessType='inputOutput'
appinfo='Goal aimPoint for this move, ignored if tracking=false'/> |
255 |
<field name='goalFieldOfView' type='SFFloat' accessType='inputOutput'
appinfo='Goal fieldOfView for this move'/> |
256 |
<field name='goalFStop' type='SFFloat' accessType='inputOutput'
appinfo='Focal length divided effective aperture diameter indicating width of focal plane'/> |
257 |
<field name='goalFocusDistance' type='SFFloat' accessType='inputOutput'
appinfo='Distance to focal plane of sharpest focus'/> |
258 |
<field name='isActive' type='SFBool' accessType='outputOnly'
appinfo='Mark start/stop with true/false output respectively useful to trigger external animations'/> |
259 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
260 | <IS> |
261 | <connect nodeField='description' protoField='description'/> |
262 | <connect nodeField='enabled' protoField='enabled'/> |
263 | <connect nodeField='duration' protoField='duration'/> |
264 | <connect nodeField='goalPosition' protoField='goalPosition'/> |
265 | <connect nodeField='goalOrientation' protoField='goalOrientation'/> |
266 | <connect nodeField='tracking' protoField='tracking'/> |
267 | <connect nodeField='goalAimPoint' protoField='goalAimPoint'/> |
268 | <connect nodeField='goalFieldOfView' protoField='goalFieldOfView'/> |
269 | <connect nodeField='goalFStop' protoField='goalFStop'/> |
270 | <connect nodeField='goalFocusDistance' protoField='goalFocusDistance'/> |
271 | <connect nodeField='isActive' protoField='isActive'/> |
272 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
273 | </IS> |
275 | </Script> |
276 | <!-- Add any ROUTEs here, going from Script to other nodes within ProtoBody --> |
277 | </ProtoBody> |
278 | </ProtoDeclare> |
279 | <!-- =============== OfflineRender ============== --> |
280 | <ProtoDeclare name='OfflineRender' appinfo='OfflineRender defines a parameters for offline rendering of Camera animation output to a movie file (or possibly a still shot).'> |
281 | <ProtoInterface> |
282 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this OfflineRender'/> |
283 |
<field name='enabled' type='SFBool' value='true' accessType='inputOutput'
appinfo='Whether this OfflineRender can be activated'/> |
284 |
<field name='frameRate' type='SFFloat' value='30' accessType='inputOutput'
appinfo='Frames per second recorded for this rendering'/> |
285 |
<field name='frameSize' type='SFVec2f' value='640 480' accessType='inputOutput'
appinfo='Size of frame in number of pixels width and height'/> |
286 |
<field name='pixelAspectRatio' type='SFFloat' value='1.33' accessType='inputOutput'
appinfo='Relative dimensions of pixel height/width typically 1.33 or 1'/> |
287 |
<field name='set_startTime' type='SFTime' accessType='inputOnly'
appinfo='Begin render operation'/> |
288 |
<field name='progress' type='SFFloat' accessType='outputOnly'
appinfo='Progress performing render operation (0..1)'/> |
289 |
<field name='renderCompleteTime' type='SFTime' accessType='outputOnly'
appinfo='Render operation complete'/> |
290 |
<field name='movieFormat' type='MFString' value='"mpeg"' accessType='initializeOnly'
appinfo='Format of rendered output movie (mpeg mp4 etc.), use first supported format'/> |
291 |
<field name='imageFormat' type='MFString' value='"png"' accessType='initializeOnly'
appinfo='Format of rendered output images (png jpeg gif tiff etc.) use first supported format'/> |
292 |
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
293 | <!-- TODO non-photorealistic rendering (NPR) parameters --> |
294 | </ProtoInterface> |
295 | <ProtoBody> |
296 | <!-- First node determines node type of this prototype --> |
297 | <!-- Subsequent nodes do not render, but still must be a valid X3D subgraph --> |
298 | <Script DEF='OfflineRenderScript' mustEvaluate='true'> |
299 |
<field name='description' type='SFString' accessType='inputOutput'
appinfo='Text description to be displayed for this OfflineRender'/> |
300 |
<field name='enabled' type='SFBool' accessType='inputOutput'
appinfo='Whether this OfflineRender can be activated'/> |
301 |
<field name='frameRate' type='SFFloat' accessType='inputOutput'
appinfo='Frames per second recorded for this rendering'/> |
302 |
<field name='frameSize' type='SFVec2f' accessType='inputOutput'
appinfo='Size of frame in number of pixels width and height'/> |
303 |
<field name='pixelAspectRatio' type='SFFloat' accessType='inputOutput'
appinfo='Relative dimensions of pixel height/width typically 1.33 or 1'/> |
304 |
<field name='set_startTime' type='SFTime' accessType='inputOnly'
appinfo='Begin render operation'/> |
305 |
<field name='progress' type='SFFloat' accessType='outputOnly'
appinfo='Progress performing render operation (0..1)'/> |
306 |
<field name='renderCompleteTime' type='SFTime' accessType='outputOnly'
appinfo='Render operation complete'/> |
307 |
<field name='movieFormat' type='MFString' accessType='initializeOnly'
appinfo='Format of rendered output movie (mpeg mp4 etc.)'/> |
308 |
<field name='imageFormat' type='MFString' accessType='initializeOnly'
appinfo='Format of rendered output images (png jpeg gif tiff etc.)'/> |
309 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='enable console output to trace script computations and prototype progress'/> |
310 | <IS> |
311 | <connect nodeField='description' protoField='description'/> |
312 | <connect nodeField='enabled' protoField='enabled'/> |
313 | <connect nodeField='frameRate' protoField='frameRate'/> |
314 | <connect nodeField='frameSize' protoField='frameSize'/> |
315 | <connect nodeField='pixelAspectRatio' protoField='pixelAspectRatio'/> |
316 | <connect nodeField='set_startTime' protoField='set_startTime'/> |
317 | <connect nodeField='progress' protoField='progress'/> |
318 | <connect nodeField='renderCompleteTime' protoField='renderCompleteTime'/> |
319 | <connect nodeField='movieFormat' protoField='movieFormat'/> |
320 | <connect nodeField='imageFormat' protoField='imageFormat'/> |
321 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
322 | </IS> |
324 | </Script> |
325 | <!-- Add any ROUTEs here, going from Script to other nodes within ProtoBody --> |
326 | </ProtoBody> |
327 | </ProtoDeclare> |
328 | <!-- =============== Launch Prototype Example ============== --> |
329 | <Background skyColor='0.282353 0.380392 0.470588'/> |
330 | <Anchor description='launch CameraExample scene' url=' "CameraExamples.x3d" "https://www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.x3d" "CameraExamples.wrl" "https://www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.wrl" '> |
331 | <Transform> |
332 | <Shape> |
333 | <Text string='"CameraPrototypes.x3d" "defines multiple prototype nodes" "" "Click on this text to see" "CameraExamples.x3d scene"'> |
334 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
335 | </Text> |
336 | <Appearance> |
337 | <Material diffuseColor='1 1 0.2'/> |
338 | </Appearance> |
339 | </Shape> |
340 | </Transform> |
341 | </Anchor> |
342 | </Scene> |
343 | </X3D> |
Event Graph ROUTE Table entries with 7 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
CameraMovementScript
Script |
No ROUTE connection found for output events from this node. This Script has no direct access to other nodes. |
CameraScript
Script position SFVec3f |
CameraViewpoint
Viewpoint position SFVec3f |
|
CameraScript
Script orientation SFRotation |
CameraViewpoint
Viewpoint orientation SFRotation |
|
CameraScript
Script isActive SFBool |
CameraViewpoint
Viewpoint set_bind SFBool |
|
CameraScript
Script isActive SFBool |
CameraNavInfo
NavigationInfo set_bind SFBool |
|
CameraScript
Script isActive SFBool |
CameraDirectionalLight
DirectionalLight on SFBool |
CameraShotScript
Script |
No ROUTE connection found for output events from this node. Contains MFNode field with direct access to another node. This Script has no direct access to other nodes. |
OfflineRenderScript
Script |
No ROUTE connection found for output events from this node. This Script has no direct access to other nodes. |
Anchor |
description='launch CameraExample scene' User-interaction hint for this node. |
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoDeclare
name='ProtoName'>
<field
name='fieldName'/> </ProtoDeclare>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->