1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='LocalFogEffectsTest.x3d'/> |
6 | <meta name='creator' content='Sungmin Kwon and Don Brutzman'/> |
7 | <meta name='reference' content='http://www.wiley.com/legacy/compbooks/vrml2sbk/ch23/23fig02b.htm'/> |
8 | <meta name='created' content='8 July 2018'/> |
9 | <meta name='modified' content='29 October 2023'/> |
10 | <meta name=' warning ' content=' under development, LocalFog specification functionality review in progress on x3d-public@web3D.org '/> |
11 | <meta name='Image' content='LocalFogEffectsTestViewFarInstantReality.png'/> |
12 | <meta name='Image' content='LocalFogEffectsTestViewGroundInstantReality.png'/> |
13 | <meta name='Image' content='LocalFogEffectsTestViewNearInstantReality.png'/> |
14 | <meta name='reference' content='LocalFogEffectsPresentation.pdf'/> |
15 | <meta name='reference' content='LocalFogEffectsPresentation.pptx'/> |
16 | <meta name='description' content='Test Scene of LocalFog Node: Moving LocalFog having visibilityRange=40 and Linear attenuation. Attenuation should be vary depending on LocalFog center.'/> |
17 | <meta name='reference' content='https://www.web3d.org/x3d/tooltips/X3dTooltips.html#LocalFog'/> |
18 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter23Fog/Figure23_2bLinearFogVisibility40.x3d'/> |
19 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsTest.x3d'/> |
20 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
21 | <meta name='license' content='../../license.html'/> |
22 | </head> |
23 | <Scene> |
24 | <WorldInfo title='LocalFogEffectsTest.x3d'/> |
25 | <Background groundColor='0.5 0.5 0' skyColor='0.8 0.8 1'/> |
26 | <Group DEF='StationaryObjects'> |
27 | <Viewpoint description='Far View of LocalFog' orientation='1 0 0 -1.57' position='0 115 0'/> |
28 | <Viewpoint description='Top View of LocalFog' orientation='1 0 0 -1.57' position='0 35 0'/> |
29 | <Viewpoint centerOfRotation='0 3 0' description='Front View of LocalFog' position='0 3 60'/> |
30 | <Viewpoint centerOfRotation='0 3 0' description='Close1 View of LocalFog' position='0 3 35'/> |
31 | <Viewpoint centerOfRotation='0 3 0' description='Close2 View of LocalFog' position='0 3 27'/> |
32 | <Viewpoint centerOfRotation='0 3 0' description='Close3 View of LocalFog' position='0 3 19'/> |
33 | <Viewpoint centerOfRotation='0 3 0' description='Close4 View of LocalFog' position='0 3 11'/> |
34 | <Viewpoint centerOfRotation='0 3 0' description='Close5 View of LocalFog' position='0 3 3'/> |
35 | <Viewpoint centerOfRotation='0 3 0' description='Close6 View of LocalFog' position='0 3 -5'/> |
36 | <Viewpoint centerOfRotation='0 3 0' description='Close7 View of LocalFog' position='0 3 -13'/> |
37 | <Viewpoint centerOfRotation='0 3 0' description='Left View of LocalFog' orientation='0 1 0 -1.57' position='-40 3 0'/> |
38 | <Viewpoint centerOfRotation='0 3 0' description='Right View of LocalFog' orientation='0 1 0 1.57' position='40 3 0'/> |
39 | <Transform DEF='TextForNoLocalFogArea' translation='8 8 30'> |
40 | <Billboard axisOfRotation='0 0 0'> |
41 | <Shape> |
42 | <!-- TODO adjust Text string and Box size, then set Material transparency='1' --> |
43 | <Text string='"Columns" "Outside" "LocalFog"'> |
44 | <FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' size='2' style='BOLD'/> |
45 | </Text> |
46 | <Appearance> |
47 | <Material diffuseColor='0.9 0.9 0.9'/> |
48 | </Appearance> |
49 | </Shape> |
50 | <Shape> |
51 | <!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. --> |
52 | <Box size='9 6 .001'/> |
53 | <Appearance> |
54 | <Material transparency='0.8'/> |
55 | </Appearance> |
56 | </Shape> |
57 | <!-- Author TODO: for interactive scenes, the TouchSensor output is easily applied as an animation trigger by adding a DEF name and a connecting ROUTE. --> |
58 | <TouchSensor description='These columns are normal, because they are outside LocalFog.'/> |
59 | </Billboard> |
60 | </Transform> |
61 | <Transform DEF='TextofLocalFog' translation='-8 8 30'> |
62 | <Billboard axisOfRotation='0 0 0'> |
63 | <Shape> |
64 | <!-- TODO adjust Text string and Box size, then set Material transparency='1' --> |
65 | <Text string='"Columns" "Inside" "LocalFog"'> |
66 | <FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' size='2' style='BOLD'/> |
67 | </Text> |
68 | <Appearance> |
69 | <Material diffuseColor='0.9 0.9 0.9'/> |
70 | </Appearance> |
71 | </Shape> |
72 | <Shape> |
73 | <!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. --> |
74 | <Box size='9 6 .001'/> |
75 | <Appearance> |
76 | <Material transparency='0.8'/> |
77 | </Appearance> |
78 | </Shape> |
79 | <!-- Author TODO: for interactive scenes, the TouchSensor output is easily applied as an animation trigger by adding a DEF name and a connecting ROUTE. --> |
80 | <TouchSensor description='LocalFog of these columns should vary depending on center of LocalFog.'/> |
81 | </Billboard> |
82 | </Transform> |
83 | <Transform DEF='ColumnsOfLocalFogArea' translation='8 -0.1 0'> |
84 | <!-- Columns outside LocalFog subtree --> |
85 |
<!-- Inline
Columns is a DEF node that has 1 USE node: USE_1 --> <Inline DEF='Columns' url=' "../../../Vrml2Sourcebook/Chapter23Fog/Figure23_1FogTestWorld.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter23Fog/Figure23_1FogTestWorld.x3d" "../../../Vrml2Sourcebook/Chapter23Fog/Figure23_1FogTestWorld.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter23Fog/Figure23_1FogTestWorld.wrl" '/> |
86 | </Transform> |
87 | <Transform DEF='GreenBaseGroundOutLine' translation='0 -0.4 0'> |
88 | <Shape> |
89 | <Box size='100 0.3 100'/> |
90 | <Appearance> |
91 | <Material ambientIntensity='0.5' emissiveColor='0.2 0.8 0.2'/> |
92 | </Appearance> |
93 | </Shape> |
94 | </Transform> |
95 | </Group> |
96 | <Group DEF='MovingObjectsWithLocalFog'> |
97 | <!-- Transform of Local Fog: Moving back and forth along z axis --> |
98 |
<!-- ROUTE information for BackandForthTransform node:
[from BackandForthPosition.value_changed to translation
]
-->
<Transform DEF='BackandForthTransform'> |
99 | <!-- Moving Local Fog --> |
100 | <LocalFog visibilityRange='40' containerField='children'/> |
101 | <!-- Columns inside Local Fog --> |
102 | <Transform DEF='ColumnsGroundAndTextInLocalFog' translation='-8 -0.1 0'> |
103 |
<!-- ROUTE information for ForthandBackTransform node:
[from ForthandBackPosition.value_changed to translation
]
-->
<Transform DEF='ForthandBackTransform'> |
104 | <Inline USE='Columns'/> |
105 | <Transform DEF='GreenBaseGround' translation='8 -0.1 0'> |
106 | <Shape> |
107 | <Box size='90 0.3 90'/> |
108 | <Appearance> |
109 | <Material ambientIntensity='0.5' emissiveColor='0.2 0.8 0.2'/> |
110 | </Appearance> |
111 | </Shape> |
112 | </Transform> |
113 | </Transform> |
114 | </Transform> |
115 | </Transform> |
116 |
<!-- ROUTE information for BackandForthTimeInterval node:
[from PauseButtonSensor.touchTime to pauseTime
]
[from ResumeButtonSensor.touchTime to resumeTime
]
[from fraction_changed to BackandForthPosition.set_fraction
]
[from fraction_changed to ForthandBackPosition.set_fraction
]
-->
<TimeSensor DEF='BackandForthTimeInterval' cycleInterval='8' loop='true'/> |
117 | <!-- Moving z axis --> |
118 |
<!-- ROUTE information for BackandForthPosition node:
[from BackandForthTimeInterval.fraction_changed to set_fraction
]
[from value_changed to BackandForthTransform.translation
]
[from value_changed to BackandForthTransform2.translation
]
-->
<PositionInterpolator DEF='BackandForthPosition' key='0 0.25 0.5 0.75 1' keyValue='0 0 30 0 0 0 0 0 -30 0 0 0 0 0 30'/> |
119 |
<!-- ROUTE information for ForthandBackPosition node:
[from BackandForthTimeInterval.fraction_changed to set_fraction
]
[from value_changed to ForthandBackTransform.translation
]
-->
<PositionInterpolator DEF='ForthandBackPosition' key='0 0.25 0.5 0.75 1' keyValue='0 0 -30 0 0 0 0 0 30 0 0 0 0 0 -30'/> |
120 | < ROUTE fromNode='BackandForthTimeInterval' fromField='fraction_changed' toNode='BackandForthPosition' toField='set_fraction'/> |
121 | < ROUTE fromNode='BackandForthTimeInterval' fromField='fraction_changed' toNode='ForthandBackPosition' toField='set_fraction'/> |
122 | < ROUTE fromNode='BackandForthPosition' fromField='value_changed' toNode='BackandForthTransform' toField='translation'/> |
123 | < ROUTE fromNode='ForthandBackPosition' fromField='value_changed' toNode='ForthandBackTransform' toField='translation'/> |
124 | </Group> |
125 | <Group DEF='MovingObjectsNoFog'> |
126 | <!-- Transform of Local Fog: Moving back and forth along z axis --> |
127 |
<!-- ROUTE information for BackandForthTransform2 node:
[from BackandForthPosition.value_changed to translation
]
-->
<Transform DEF='BackandForthTransform2'> |
128 | <!-- Center of Local Fog --> |
129 | <Transform DEF='TextofLocalFogCenter' rotation='1 0 0 0' translation='0 2 2'> |
130 | <Billboard axisOfRotation='0 0 0'> |
131 | <Shape> |
132 | <Appearance> |
133 | <Material diffuseColor='0.8 0.8 0'/> |
134 | </Appearance> |
135 | <Text string='"LocalFog" "Center"'> |
136 |
<!-- FontStyle
CenterFontStyle is a DEF node that has 1 USE node: USE_1 --> <FontStyle DEF='CenterFontStyle' justify='"MIDDLE" "MIDDLE"' style='BOLD'/> |
137 | </Text> |
138 | </Shape> |
139 | </Billboard> |
140 | </Transform> |
141 | <Shape DEF='LocalFogCenter'> |
142 | <Appearance> |
143 | <Material diffuseColor='1 1 0'/> |
144 | </Appearance> |
145 | <Sphere radius='0.5'/> |
146 | </Shape> |
147 | <!-- 3D Boundary of Local Fog --> |
148 | <Transform DEF='LocalFog3dBoundary' scale='40 40 40' translation='0 0.1 0'> |
149 |
<!-- Group
SphereMeshHorizontal is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Group DEF='SphereMeshHorizontal'> |
150 | <Shape> |
151 | |
152 |
<!-- Material
BoundaryLineMaterial is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <Material DEF='BoundaryLineMaterial' emissiveColor='0.1 0.1 0.5'/> |
153 | </Appearance> |
154 | <Circle2D/> |
155 | </Shape> |
156 | <Transform translation='0 0 0.25'> |
157 | <Shape> |
158 | <Appearance USE='BoundaryAppearance'/> |
159 | <Circle2D radius='0.97'/> |
160 | </Shape> |
161 | </Transform> |
162 | <Transform translation='0 0 0.5'> |
163 | <Shape> |
164 | <Appearance USE='BoundaryAppearance'/> |
165 | <Circle2D radius='0.87'/> |
166 | </Shape> |
167 | </Transform> |
168 | <Transform translation='0 0 0.75'> |
169 | <Shape> |
170 | <Appearance USE='BoundaryAppearance'/> |
171 | <Circle2D radius='0.66'/> |
172 | </Shape> |
173 | </Transform> |
174 | <Transform translation='0 0 -0.25'> |
175 | <Shape> |
176 | <Appearance USE='BoundaryAppearance'/> |
177 | <Circle2D radius='0.97'/> |
178 | </Shape> |
179 | </Transform> |
180 | <Transform translation='0 0 -0.5'> |
181 | <Shape> |
182 | <Appearance USE='BoundaryAppearance'/> |
183 | <Circle2D radius='0.87'/> |
184 | </Shape> |
185 | </Transform> |
186 | <Transform translation='0 0 -0.75'> |
187 | <Shape> |
188 | <Appearance USE='BoundaryAppearance'/> |
189 | <Circle2D radius='0.66'/> |
190 | </Shape> |
191 | </Transform> |
192 | </Group> |
193 | <Transform rotation='1 0 0 1.57'> |
194 | <Group USE='SphereMeshHorizontal'/> |
195 | </Transform> |
196 | <Transform rotation='0 1 0 1.57'> |
197 | <Group USE='SphereMeshHorizontal'/> |
198 | </Transform> |
199 | </Transform> |
200 | <!-- 2D Boundary of Local Fog --> |
201 | <Transform DEF='LocalFogBoundary' rotation='1 0 0 1.57' translation='0 0.1 0'> |
202 | <Shape> |
203 | <Appearance> |
204 | <Material USE='BoundaryLineMaterial'/> |
205 | <LineProperties linewidthScaleFactor='3' containerField='lineProperties'/> |
206 | </Appearance> |
207 | <Circle2D radius='40'/> |
208 | </Shape> |
209 | <Transform DEF='CrossHatchRotation' rotation='0 0 1 0.785'> |
210 | <Shape> |
211 | <Appearance> |
212 | <Material USE='BoundaryLineMaterial'/> |
213 | </Appearance> |
214 | <LineSet vertexCount='2 2 2 2 2 2' containerField='geometry'> |
215 | <Coordinate point='40 0 0 -40 0 0 0 40 0 0 -40 0 20 34.599998 0 20 -34.599998 0 -20 34.599998 0 -20 -34.599998 0 34.599998 20 0 -34.599998 20 0 34.599998 -20 0 -34.599998 -20 0'/> |
216 | </LineSet> |
217 | </Shape> |
218 | </Transform> |
219 | </Transform> |
220 | <Transform DEF='TextofLocalFogBoundary' rotation='1 0 0 0' translation='0 0.5 40'> |
221 | <Billboard axisOfRotation='0 0 0'> |
222 | <Shape> |
223 | <Appearance> |
224 | <Material diffuseColor='0.2 0.2 1'/> |
225 | </Appearance> |
226 | <Text string='"Visibility Range of LocalFog"'> |
227 | <FontStyle USE='CenterFontStyle'/> |
228 | </Text> |
229 | </Shape> |
230 | </Billboard> |
231 | </Transform> |
232 | </Transform> |
233 | < ROUTE fromNode='BackandForthPosition' fromField='value_changed' toNode='BackandForthTransform2' toField='translation'/> |
234 | </Group> |
235 | <Group DEF='ControlButtons'> |
236 | <!-- HUD : Colormap Part --> |
237 | <!-- Simple Heads-Up Display (HUD) Prototype Manages the display of a HUD and maintains its position on the screen. Changes to fieldOfView (in Viewpoint node) will change screen position Fields: hudSize Size of HUD (initializeOnly - SFVec3f) default="1 1 .01" hudColor Color of HUD (inputOutput - SFColor) default="1 1 1" screenOffset Offset of HUD. This field positions the HUD on the display screen (inputOutput - SFVec3f) default="0 0 0" hudGeometry Geometry to be placed on the HUD. Origin is center of HUD. (inputOutput - MFNode) default = [] position_changed Current viewer location (outputOnly - SFVec3f) orientation_changed Current viewer orientation (outputOnly - SFRotation) --> |
238 | <ExternProtoDeclare name='HeadsUpDisplay' appinfo='Heads-up display (HUD) keeps child geometry aligned on screen in a consistent location' url=' "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay" "../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay" '> |
239 |
<field name='screenOffset' type='SFVec3f' accessType='inputOutput'
appinfo='offset position for HUD relative to current view location, default 0 0 -5'/> |
240 |
<field name='children' type='MFNode' accessType='inputOutput'
appinfo='X3D content positioned at HUD offset'/> |
241 |
<field name='position_changed' type='SFVec3f' accessType='outputOnly'
appinfo='HUD position update (in world coordinates) relative to original location'/> |
242 |
<field name='orientation_changed' type='SFRotation' accessType='outputOnly'
appinfo='HUD orientation update relative to original location'/> |
243 | </ExternProtoDeclare> |
244 | <ProtoInstance name='HeadsUpDisplay' DEF='HeadsUpDisplayInstance'> |
245 | <!-- example: upper left-hand corner of screen (x=-2, y=1) and set back z=-5 from user view --> |
246 | <fieldValue name='screenOffset' value='0 0 -5'/> |
247 | <fieldValue name='children'> |
248 | <Transform DEF='PauseButton' translation='1.13 1.7 0'> |
249 | <Shape> |
250 | <!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. --> |
251 | <Box size='0.4 0.25 .001'/> |
252 | <Appearance> |
253 | <Material diffuseColor='1 0.5 0.5'/> |
254 | </Appearance> |
255 | </Shape> |
256 | <Transform translation='-0.06 -0.06 0.2'> |
257 | <Shape> |
258 | <Text string='"Pause"'> |
259 | <FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' size='0.12' style='BOLD'/> |
260 | </Text> |
261 | <Appearance> |
262 | <Material emissiveColor='0.894118 0.819608 1'/> |
263 | </Appearance> |
264 | </Shape> |
265 | </Transform> |
266 |
<!-- ROUTE information for PauseButtonSensor node:
[from touchTime to BackandForthTimeInterval.pauseTime
]
-->
<TouchSensor DEF='PauseButtonSensor' description='Pause'/> |
267 | < ROUTE fromNode='PauseButtonSensor' fromField='touchTime' toNode='BackandForthTimeInterval' toField='pauseTime'/> |
268 | </Transform> |
269 | <Transform DEF='ResumeButton' translation='1.6 1.7 0'> |
270 | <Shape> |
271 | <Box size='0.45 0.25 .001'/> |
272 | <Appearance> |
273 | <Material diffuseColor='0.5 1 0.5'/> |
274 | </Appearance> |
275 | </Shape> |
276 | <Transform translation='-0.06 -0.06 0.2'> |
277 | <Shape> |
278 | <Text string='"Resume"'> |
279 | <FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' size='0.12' style='BOLD'/> |
280 | </Text> |
281 | <Appearance> |
282 | <Material emissiveColor='0.894118 0.819608 1'/> |
283 | </Appearance> |
284 | </Shape> |
285 | </Transform> |
286 |
<!-- ROUTE information for ResumeButtonSensor node:
[from touchTime to BackandForthTimeInterval.resumeTime
]
-->
<TouchSensor DEF='ResumeButtonSensor' description='Resume'/> |
287 | < ROUTE fromNode='ResumeButtonSensor' fromField='touchTime' toNode='BackandForthTimeInterval' toField='resumeTime'/> |
288 | </Transform> |
289 | </fieldValue> |
290 | </ProtoInstance> |
291 | </Group> |
292 | </Scene> |
293 | </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.
TouchSensor |
description='These columns are normal, because they are outside LocalFog.' User-interaction hint for this node.(TouchSensor description is providing a tooltip) |
TouchSensor |
description='LocalFog of these columns should vary depending on center of LocalFog.' User-interaction hint for this node.(TouchSensor description is providing a tooltip) |
PauseButtonSensor
TouchSensor touchTime SFTime |
BackandForthTimeInterval
TimeSensor pauseTime SFTime |
then
|
BackandForthTimeInterval
TimeSensor fraction_changed SFFloat |
BackandForthPosition
PositionInterpolator set_fraction SFFloat |
then
|
BackandForthPosition
PositionInterpolator value_changed SFVec3f |
BackandForthTransform
Transform translation SFVec3f |
|||
then
|
BackandForthPosition
PositionInterpolator value_changed SFVec3f |
BackandForthTransform2
Transform translation SFVec3f |
||||||||
then
|
BackandForthTimeInterval
TimeSensor fraction_changed SFFloat |
ForthandBackPosition
PositionInterpolator set_fraction SFFloat |
then
|
ForthandBackPosition
PositionInterpolator value_changed SFVec3f |
ForthandBackTransform
Transform translation SFVec3f |
ResumeButtonSensor
TouchSensor touchTime SFTime |
BackandForthTimeInterval
TimeSensor resumeTime SFTime |
then
|
BackandForthTimeInterval
TimeSensor fraction_changed SFFloat |
BackandForthPosition
PositionInterpolator set_fraction SFFloat |
then
|
BackandForthPosition
PositionInterpolator value_changed SFVec3f |
BackandForthTransform
Transform translation SFVec3f |
|||
then
|
BackandForthPosition
PositionInterpolator value_changed SFVec3f |
BackandForthTransform2
Transform translation SFVec3f |
||||||||
then
|
BackandForthTimeInterval
TimeSensor fraction_changed SFFloat |
ForthandBackPosition
PositionInterpolator set_fraction SFFloat |
then
|
ForthandBackPosition
PositionInterpolator value_changed SFVec3f |
ForthandBackTransform
Transform translation SFVec3f |
HeadsUpDisplayInstance
ProtoInstance HeadsUpDisplay |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->