<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 ' >
<head>
<meta name='titlecontent=' LocalFogEffectsTest.x3d '/>
<meta name='creatorcontent='Sungmin Kwon and Don Brutzman'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch23/23fig02b.htm '/>
<meta name='createdcontent='8 July 2018'/>
<meta name='modifiedcontent='29 October 2023'/>
<meta name=' warning content=' under development, LocalFog specification functionality review in progress on x3d-public@web3D.org '/>
<meta name='Imagecontent='LocalFogEffectsTestViewFarInstantReality.png' />
<meta name='Imagecontent='LocalFogEffectsTestViewGroundInstantReality.png' />
<meta name='Imagecontent='LocalFogEffectsTestViewNearInstantReality.png' />
<meta name='referencecontent=' LocalFogEffectsPresentation.pdf '/>
<meta name='referencecontent=' LocalFogEffectsPresentation.pptx '/>
<meta name='descriptioncontent='Test Scene of LocalFog Node: Moving LocalFog having visibilityRange=40 and Linear attenuation. Attenuation should be vary depending on LocalFog center.'/>
<meta name='referencecontent=' https://www.web3d.org/x3d/tooltips/X3dTooltips.html#LocalFog '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter23Fog/Figure23_2bLinearFogVisibility40.x3d '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsTest.x3d '/>
<meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='LocalFogEffectsTest.x3d'/>
<Background groundColor='0.5 0.5 0skyColor='0.8 0.8 1'/>
<Group DEF='StationaryObjects'>
<Viewpoint description='Far View of LocalFogorientation='1 0 0 -1.57position='0 115 0'/>
<Viewpoint description='Top View of LocalFogorientation='1 0 0 -1.57position='0 35 0'/>
<Viewpoint centerOfRotation='0 3 0description='Front View of LocalFogposition='0 3 60'/>
<Viewpoint centerOfRotation='0 3 0description='Close1 View of LocalFogposition='0 3 35'/>
<Viewpoint centerOfRotation='0 3 0description='Close2 View of LocalFogposition='0 3 27'/>
<Viewpoint centerOfRotation='0 3 0description='Close3 View of LocalFogposition='0 3 19'/>
<Viewpoint centerOfRotation='0 3 0description='Close4 View of LocalFogposition='0 3 11'/>
<Viewpoint centerOfRotation='0 3 0description='Close5 View of LocalFogposition='0 3 3'/>
<Viewpoint centerOfRotation='0 3 0description='Close6 View of LocalFogposition='0 3 -5'/>
<Viewpoint centerOfRotation='0 3 0description='Close7 View of LocalFogposition='0 3 -13'/>
<Viewpoint centerOfRotation='0 3 0description='Left View of LocalFogorientation='0 1 0 -1.57position='-40 3 0'/>
<Viewpoint centerOfRotation='0 3 0description='Right View of LocalFogorientation='0 1 0 1.57position='40 3 0'/>
<Transform DEF='TextForNoLocalFogAreatranslation='8 8 30'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<!-- TODO adjust Text string and Box size, then set Material transparency='1' -->
<Text string='"Columns" "Outside" "LocalFog"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"size='2style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
<Shape>
<!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. -->
<Box size='9 6 .001'/>
<Appearance>
<Material transparency='0.8'/>
</Appearance>
</Shape>
<!-- Author TODO: for interactive scenes, the TouchSensor output is easily applied as an animation trigger by adding a DEF name and a connecting ROUTE. -->
<TouchSensor description='These columns are normal, because they are outside LocalFog.'/>
</Billboard>
</Transform>
<Transform DEF='TextofLocalFogtranslation='-8 8 30'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<!-- TODO adjust Text string and Box size, then set Material transparency='1' -->
<Text string='"Columns" "Inside" "LocalFog"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"size='2style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
<Shape>
<!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. -->
<Box size='9 6 .001'/>
<Appearance>
<Material transparency='0.8'/>
</Appearance>
</Shape>
<!-- Author TODO: for interactive scenes, the TouchSensor output is easily applied as an animation trigger by adding a DEF name and a connecting ROUTE. -->
<TouchSensor description='LocalFog of these columns should vary depending on center of LocalFog.'/>
</Billboard>
</Transform>
<Transform DEF='ColumnsOfLocalFogAreatranslation='8 -0.1 0'> </Transform>
<Transform DEF='GreenBaseGroundOutLinetranslation='0 -0.4 0'>
<Shape>
<Box size='100 0.3 100'/>
<Appearance>
<Material ambientIntensity='0.5emissiveColor='0.2 0.8 0.2'/>
</Appearance>
</Shape>
</Transform>
</Group>
<Group DEF='MovingObjectsWithLocalFog'>
<!-- Transform of Local Fog: Moving back and forth along z axis -->
<!-- ROUTE information for BackandForthTransform node:  [from BackandForthPosition.value_changed to translation ] -->
<Transform DEF='BackandForthTransform'>
<!-- Moving Local Fog -->
<LocalFog visibilityRange='40containerField='children'/>
<!-- Columns inside Local Fog -->
<Transform DEF='ColumnsGroundAndTextInLocalFogtranslation='-8 -0.1 0'>
<!-- ROUTE information for ForthandBackTransform node:  [from ForthandBackPosition.value_changed to translation ] -->
<Transform DEF='ForthandBackTransform'>
<Inline USE=' Columns'/>
<Transform DEF='GreenBaseGroundtranslation='8 -0.1 0'>
<Shape>
<Box size='90 0.3 90'/>
<Appearance>
<Material ambientIntensity='0.5emissiveColor='0.2 0.8 0.2'/>
</Appearance>
</Shape>
</Transform>
</Transform>
</Transform>
</Transform>

<!-- Moving z axis -->
<!-- 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='BackandForthPositionkey='0 0.25 0.5 0.75 1keyValue='0 0 30 0 0 0 0 0 -30 0 0 0 0 0 30'/>

<!-- ROUTE information for ForthandBackPosition node:  [from BackandForthTimeInterval.fraction_changed to set_fraction ] [from value_changed to ForthandBackTransform.translation ] -->
<PositionInterpolator DEF='ForthandBackPositionkey='0 0.25 0.5 0.75 1keyValue='0 0 -30 0 0 0 0 0 30 0 0 0 0 0 -30'/>

< ROUTE  fromNode=' BackandForthTimeInterval' fromField='fraction_changed' toNode=' BackandForthPosition' toField='set_fraction'/>
< ROUTE  fromNode=' BackandForthTimeInterval' fromField='fraction_changed' toNode=' ForthandBackPosition' toField='set_fraction'/>
< ROUTE  fromNode=' BackandForthPosition' fromField='value_changed' toNode=' BackandForthTransform' toField='translation'/>
< ROUTE  fromNode=' ForthandBackPosition' fromField='value_changed' toNode=' ForthandBackTransform' toField='translation'/>
</Group>
<Group DEF='MovingObjectsNoFog'>
<!-- Transform of Local Fog: Moving back and forth along z axis -->
<!-- ROUTE information for BackandForthTransform2 node:  [from BackandForthPosition.value_changed to translation ] -->
<Transform DEF='BackandForthTransform2'>
<!-- Center of Local Fog -->
<Transform DEF='TextofLocalFogCenterrotation='1 0 0 0translation='0 2 2'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.8 0.8 0'/>
</Appearance>
<Text string='"LocalFog" "Center"'>
<FontStyle DEF='CenterFontStylejustify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
</Shape>
</Billboard>
</Transform>
<Shape DEF='LocalFogCenter'>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Sphere radius='0.5'/>
</Shape>
<!-- 3D Boundary of Local Fog -->
<Transform DEF='LocalFog3dBoundaryscale='40 40 40translation='0 0.1 0'>
<Group DEF='SphereMeshHorizontal'>
<Shape>
<Appearance DEF='BoundaryAppearance'>
<Material DEF='BoundaryLineMaterialemissiveColor='0.1 0.1 0.5'/>
</Appearance>
<Circle2D/>
</Shape>
<Transform translation='0 0 0.25'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.97'/>
</Shape>
</Transform>
<Transform translation='0 0 0.5'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.87'/>
</Shape>
</Transform>
<Transform translation='0 0 0.75'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.66'/>
</Shape>
</Transform>
<Transform translation='0 0 -0.25'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.97'/>
</Shape>
</Transform>
<Transform translation='0 0 -0.5'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.87'/>
</Shape>
</Transform>
<Transform translation='0 0 -0.75'>
<Shape>
<Appearance USE=' BoundaryAppearance'/>
<Circle2D radius='0.66'/>
</Shape>
</Transform>
</Group>
<Transform rotation='1 0 0 1.57'>
<Group USE=' SphereMeshHorizontal'/>
</Transform>
<Transform rotation='0 1 0 1.57'>
<Group USE=' SphereMeshHorizontal'/>
</Transform>
</Transform>
<!-- 2D Boundary of Local Fog -->
<Transform DEF='LocalFogBoundaryrotation='1 0 0 1.57translation='0 0.1 0'>
<Shape>
<Appearance>
<Material USE=' BoundaryLineMaterial'/>
<LineProperties linewidthScaleFactor='3containerField='lineProperties'/>
</Appearance>
<Circle2D radius='40'/>
</Shape>
<Transform DEF='CrossHatchRotationrotation='0 0 1 0.785'>
<Shape>
<Appearance>
<Material USE=' BoundaryLineMaterial'/>
</Appearance>
<LineSet vertexCount='2 2 2 2 2 2containerField='geometry'>
<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'/>
</LineSet>
</Shape>
</Transform>
</Transform>
<Transform DEF='TextofLocalFogBoundaryrotation='1 0 0 0translation='0 0.5 40'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 0.2 1'/>
</Appearance>
<Text string='"Visibility Range of LocalFog"'>
<FontStyle USE=' CenterFontStyle'/>
</Text>
</Shape>
</Billboard>
</Transform>
</Transform>
< ROUTE  fromNode=' BackandForthPosition' fromField='value_changed' toNode=' BackandForthTransform2' toField='translation'/>
</Group>
<Group DEF='ControlButtons'>
<!-- HUD : Colormap Part -->
<!-- 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) -->

<ExternProtoDeclare name='HeadsUpDisplayappinfo='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" ' >
<field name='screenOffsettype='SFVec3faccessType='inputOutput'
 appinfo='offset position for HUD relative to current view location, default 0 0 -5' />

<field name='childrentype='MFNodeaccessType='inputOutput'
 appinfo='X3D content positioned at HUD offset' />

<field name='position_changedtype='SFVec3faccessType='outputOnly'
 appinfo='HUD position update (in world coordinates) relative to original location' />

<field name='orientation_changedtype='SFRotationaccessType='outputOnly'
 appinfo='HUD orientation update relative to original location' />
</ExternProtoDeclare>
<ProtoInstance name='HeadsUpDisplayDEF='HeadsUpDisplayInstance'>
<!-- example: upper left-hand corner of screen (x=-2, y=1) and set back z=-5 from user view -->
<fieldValue name='screenOffsetvalue='0 0 -5'/>
<fieldValue name='children'>
<Transform DEF='PauseButtontranslation='1.13 1.7 0'>
<Shape>
<!-- Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. -->
<Box size='0.4 0.25 .001'/>
<Appearance>
<Material diffuseColor='1 0.5 0.5'/>
</Appearance>
</Shape>
<Transform translation='-0.06 -0.06 0.2'>
<Shape>
<Text string='"Pause"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"size='0.12style='BOLD'/>
</Text>
<Appearance>
<Material emissiveColor='0.894118 0.819608 1'/>
</Appearance>
</Shape>
</Transform>
<!-- ROUTE information for PauseButtonSensor node:  [from touchTime to BackandForthTimeInterval.pauseTime ] -->
<TouchSensor DEF='PauseButtonSensordescription='Pause'/>

< ROUTE  fromNode=' PauseButtonSensor' fromField='touchTime' toNode=' BackandForthTimeInterval' toField='pauseTime'/>
</Transform>
<Transform DEF='ResumeButtontranslation='1.6 1.7 0'>
<Shape>
<Box size='0.45 0.25 .001'/>
<Appearance>
<Material diffuseColor='0.5 1 0.5'/>
</Appearance>
</Shape>
<Transform translation='-0.06 -0.06 0.2'>
<Shape>
<Text string='"Resume"'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"size='0.12style='BOLD'/>
</Text>
<Appearance>
<Material emissiveColor='0.894118 0.819608 1'/>
</Appearance>
</Shape>
</Transform>
<!-- ROUTE information for ResumeButtonSensor node:  [from touchTime to BackandForthTimeInterval.resumeTime ] -->
<TouchSensor DEF='ResumeButtonSensordescription='Resume'/>

< ROUTE  fromNode=' ResumeButtonSensor' fromField='touchTime' toNode=' BackandForthTimeInterval' toField='resumeTime'/>
</Transform>
</fieldValue>
</ProtoInstance>
</Group>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: BackandForthPosition, BackandForthTimeInterval, BackandForthTransform, BackandForthTransform2, BoundaryAppearance, BoundaryLineMaterial, CenterFontStyle, Columns, ColumnsGroundAndTextInLocalFog, ColumnsOfLocalFogArea, ControlButtons, CrossHatchRotation, ForthandBackPosition, ForthandBackTransform, GreenBaseGround, GreenBaseGroundOutLine, HeadsUpDisplayInstance, LocalFog3dBoundary, LocalFogBoundary, LocalFogCenter, MovingObjectsNoFog, MovingObjectsWithLocalFog, PauseButton, PauseButtonSensor, ResumeButton, ResumeButtonSensor, SphereMeshHorizontal, StationaryObjects, TextForNoLocalFogArea, TextofLocalFog, TextofLocalFogBoundary, TextofLocalFogCenter

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8, Viewpoint_9, Viewpoint_10, Viewpoint_11, Viewpoint_12 Index for ExternProtoDeclare definition: HeadsUpDisplay
-->

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.

PauseButtonSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
BackandForthTimeInterval
TimeSensor
pauseTime
SFTime

 
 
then
BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
BackandForthPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
BackandForthTransform
Transform
translation
SFVec3f
 
 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
BackandForthTransform2
Transform
translation
SFVec3f
 
 
 
then
BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
ForthandBackPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
ForthandBackPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
ForthandBackTransform
Transform
translation
SFVec3f


ResumeButtonSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
BackandForthTimeInterval
TimeSensor
resumeTime
SFTime

 
 
then
BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
BackandForthPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
BackandForthTransform
Transform
translation
SFVec3f
 
 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
BackandForthTransform2
Transform
translation
SFVec3f
 
 
 
then
BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
ForthandBackPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
ForthandBackPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
ForthandBackTransform
Transform
translation
SFVec3f


BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
BackandForthPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
BackandForthTransform
Transform
translation
SFVec3f
 
 
 
then
BackandForthPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
BackandForthTransform2
Transform
translation
SFVec3f
BackandForthTimeInterval
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
ForthandBackPosition
PositionInterpolator
set_fraction
SFFloat

 
 
then
ForthandBackPosition
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
ForthandBackTransform
Transform
translation
SFVec3f


HeadsUpDisplayInstance
ProtoInstance
HeadsUpDisplay
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsTestIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsTest.x3d -->

<!-- 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> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->