LocalFog
LocalFog simulates atmospheric effects by blending distant objects with fog color. LocalFog effects occur around the local transformation center, rather than bound to the viewer. The nearest LocalFog node within range takes precedence over other LocalFog and Fog nodes.
The LocalFog node belongs to the EnvironmentalEffects component and its container field is children. It is available since X3D version 3.0 or later.
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.
SFBool [in, out] enabled TRUE
Enables/disables node operation.
SFString [in, out] fogType "LINEAR" ["LINEAR"|"EXPONENTIAL"]
Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.
Hint
EXPONENTIAL is more natural but also more computationally expensive.
Warning
Do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
SFColor [in, out] color 1 1 1 [0,1]
Fog color.
Hint
Match Background color to make objects fade away.
See Also
SFFloat [in, out] visibilityRange [0,-∞)
Distance in meters where objects are totally obscured by the fog, using local coordinate system.
Hint
VisibilityRange 0 disables Fog.
Example
XML Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://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='http://www.web3d.org/specifications/x3d-3.3.xsd'> <head> <meta name='comment' content='World of Titania'/> <meta name='created' content='Sun, 26 Nov 2017 02:16:06 GMT'/> <meta name='creator' content='Holger Seelig'/> <meta name='generator' content='Titania V4.0.2, http://titania.create3000.de'/> <meta name='identifier' content='file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/EnvironmentalEffects/LocalFog/LocalFog.x3d'/> <meta name='modified' content='Sun, 26 Nov 2017 02:33:08 GMT'/> </head> <Scene> <Viewpoint description='Initial View' position='4.03051 8.68874 13.722' orientation='-0.88229514413955 0.453268840456667 0.126896165816148 0.614515168672339' centerOfRotation='8.88178e-16 -3.55271e-15 1.77636e-15'/> <Background DEF='White' skyColor='1 1 1'/> <Fog DEF='Fog' fogType='EXPONENTIAL' visibilityRange='39'/> <Transform DEF='Boxes'> <Transform> <Transform DEF='Box' translation='-4 0 4'> <Shape DEF='_1'> <Appearance> <Material DEF='Rococo24_2' ambientIntensity='0.226102' diffuseColor='0.28636 0.554905 0.904409' specularColor='0.0955906 0.0955906 0.0955906' shininess='0.078125'/> </Appearance> <Box/> </Shape> </Transform> <Transform DEF='Box_3' translation='-4 0 1'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_4' translation='-4 0 -2'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_5' translation='-4 0 -5'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_6' translation='-4 -0.133789 -8'> <Shape USE='_1'/> </Transform> </Transform> <Group> <LocalFog fogType='EXPONENTIAL' visibilityRange='62'/> <Transform translation='4 0 0'> <Transform DEF='Box_7' translation='-4 0 4'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_8' translation='-4 0 1'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_9' translation='-4 0 -2'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_10' translation='-4 0 -5'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_11' translation='-4 -0.133789 -8'> <Shape USE='_1'/> </Transform> </Transform> </Group> <Transform translation='8 0 0'> <Transform DEF='Box_12' translation='-4 0 4'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_13' translation='-4 0 1'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_14' translation='-4 0 -2'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_15' translation='-4 0 -5'> <Shape USE='_1'/> </Transform> <Transform DEF='Box_16' translation='-4 -0.133789 -8'> <Shape USE='_1'/> </Transform> </Transform> </Transform> </Scene> </X3D> |
Classic Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
#X3D V3.3 utf8 Titania V4.0.6 PROFILE Full META "comment" "World of Titania" META "created" "Sun, 26 Nov 2017 02:16:06 GMT" META "creator" "Holger Seelig" META "generator" "Titania V4.0.2, http://titania.create3000.de" META "identifier" "file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/EnvironmentalEffects/LocalFog/LocalFog.x3d" META "modified" "Sun, 26 Nov 2017 02:33:08 GMT" Viewpoint { description "Initial View" position 4.03051 8.68874 13.722 orientation -0.88229514413955 0.453268840456667 0.126896165816148 0.614515168672339 centerOfRotation 8.88178e-16 -3.55271e-15 1.77636e-15 } DEF White Background { skyColor 1 1 1 } DEF Fog Fog { fogType "EXPONENTIAL" visibilityRange 39 } DEF Boxes Transform { children [ Transform { children [ DEF Box Transform { translation -4 0 4 children DEF _1 Shape { appearance Appearance { material DEF Rococo24_2 Material { ambientIntensity 0.226102 diffuseColor 0.28636 0.554905 0.904409 specularColor 0.0955906 0.0955906 0.0955906 shininess 0.078125 } } geometry Box { } } } DEF Box_3 Transform { translation -4 0 1 children USE _1 } DEF Box_4 Transform { translation -4 0 -2 children USE _1 } DEF Box_5 Transform { translation -4 0 -5 children USE _1 } DEF Box_6 Transform { translation -4 -0.133789 -8 children USE _1 } ] } Group { children [ LocalFog { fogType "EXPONENTIAL" visibilityRange 62 } Transform { translation 4 0 0 children [ DEF Box_7 Transform { translation -4 0 4 children USE _1 } DEF Box_8 Transform { translation -4 0 1 children USE _1 } DEF Box_9 Transform { translation -4 0 -2 children USE _1 } DEF Box_10 Transform { translation -4 0 -5 children USE _1 } DEF Box_11 Transform { translation -4 -0.133789 -8 children USE _1 } ] } ] } Transform { translation 8 0 0 children [ DEF Box_12 Transform { translation -4 0 4 children USE _1 } DEF Box_13 Transform { translation -4 0 1 children USE _1 } DEF Box_14 Transform { translation -4 0 -2 children USE _1 } DEF Box_15 Transform { translation -4 0 -5 children USE _1 } DEF Box_16 Transform { translation -4 -0.133789 -8 children USE _1 } ] } ] } |
JSON Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
{ "X3D": { "encoding": "UTF-8", "@profile": "Full", "@version": "3.3", "@xsd:noNamespaceSchemaLocation": "http://www.web3d.org/specifications/x3d-3.3.xsd", "JSON schema": "http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json", "head": { "meta": [ { "@name": "comment", "@content": "World of Titania" }, { "@name": "created", "@content": "Sun, 26 Nov 2017 02:16:06 GMT" }, { "@name": "creator", "@content": "Holger Seelig" }, { "@name": "generator", "@content": "Titania V4.0.2, http://titania.create3000.de" }, { "@name": "identifier", "@content": "file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/EnvironmentalEffects/LocalFog/LocalFog.x3d" }, { "@name": "modified", "@content": "Sun, 26 Nov 2017 02:33:08 GMT" } ] }, "Scene": { "-children": [ { "Viewpoint": { "@description": "Initial View", "@position": [ 4.03051, 8.68874, 13.722 ], "@orientation": [ -0.88229514413955, 0.453268840456667, 0.126896165816148, 0.614515168672339 ], "@centerOfRotation": [ 8.88178e-16, -3.55271e-15, 1.77636e-15 ] } }, { "Background": { "@DEF": "White", "@skyColor": [ 1, 1, 1 ] } }, { "Fog": { "@DEF": "Fog", "@fogType": "EXPONENTIAL", "@visibilityRange": 39 } }, { "Transform": { "@DEF": "Boxes", "-children": [ { "Transform": { "-children": [ { "Transform": { "@DEF": "Box", "@translation": [ -4, 0, 4 ], "-children": [ { "Shape": { "@DEF": "_1", "-appearance": { "Appearance": { "-material": { "Material": { "@DEF": "Rococo24_2", "@ambientIntensity": 0.226102, "@diffuseColor": [ 0.28636, 0.554905, 0.904409 ], "@specularColor": [ 0.0955906, 0.0955906, 0.0955906 ], "@shininess": 0.078125 } } } }, "-geometry": { "Box": { } } } } ] } }, { "Transform": { "@DEF": "Box_3", "@translation": [ -4, 0, 1 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_4", "@translation": [ -4, 0, -2 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_5", "@translation": [ -4, 0, -5 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_6", "@translation": [ -4, -0.133789, -8 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } } ] } }, { "Group": { "-children": [ { "LocalFog": { "@fogType": "EXPONENTIAL", "@visibilityRange": 62 } }, { "Transform": { "@translation": [ 4, 0, 0 ], "-children": [ { "Transform": { "@DEF": "Box_7", "@translation": [ -4, 0, 4 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_8", "@translation": [ -4, 0, 1 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_9", "@translation": [ -4, 0, -2 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_10", "@translation": [ -4, 0, -5 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_11", "@translation": [ -4, -0.133789, -8 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } } ] } } ] } }, { "Transform": { "@translation": [ 8, 0, 0 ], "-children": [ { "Transform": { "@DEF": "Box_12", "@translation": [ -4, 0, 4 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_13", "@translation": [ -4, 0, 1 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_14", "@translation": [ -4, 0, -2 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_15", "@translation": [ -4, 0, -5 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } }, { "Transform": { "@DEF": "Box_16", "@translation": [ -4, -0.133789, -8 ], "-children": [ { "Shape": { "@USE": "_1" } } ] } } ] } } ] } } ] } } } |