Closed binoclard2005 closed 2 years ago
If you only use skyColor/Angle, skyAngle can only be maximum PI (half circle). Your value 4.5 is far away of that. If you use sky and ground the angles can only be PI/2 (quarter circle). A complete reference for Background node can be found here: https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/environmentalEffects.html#Backgrounds.
Sometimes an image says more than thousand words, here is an example background to study:
DEF Summer Background {
skyAngle [
0.8,
1.3,
1.4,
1.5708
]
skyColor [
0.21 0.31 0.59,
0.33 0.45 0.7,
0.57 0.66 0.85,
0.6 0.73 0.89,
0.7 0.83 0.98
]
groundAngle [
0.659972,
1.2,
1.39912,
1.5708
]
groundColor [
0.105712 0.156051 0.297,
0.187629 0.255857 0.398,
0.33604 0.405546 0.542,
0.3612 0.469145 0.602,
0.39471 0.522059 0.669
]
}
ok i use your code but , he is not working ;(
Note, that the Background must be bound if it is not the first Background in the scene. For this case the Background node has a set_bind
field, which must be set to TRUE
.
DEF Summer Background { skyAngle [ 0.8, 1.3, 1.4, 1.5708 ] skyColor [ 0.21 0.31 0.59, 0.33 0.45 0.7, 0.57 0.66 0.85, 0.6 0.73 0.89, 0.7 0.83 0.98 ] groundAngle [ 0.659972, 1.2, 1.39912, 1.5708 ] groundColor [ 0.105712 0.156051 0.297, 0.187629 0.255857 0.398, 0.33604 0.405546 0.542, 0.3612 0.469145 0.602, 0.39471 0.522059 0.669 ] }
NavigationInfo { type "WALK" speed 1 headlight FALSE }
Viewpoint { position 0 1 0 }
DirectionalLight{ intensity 1 direction 0 -1 0 }
this is good ?
I have tested it and It looks good. Another example of a scene with Background can be found here https://create3000.github.io/media/examples/EnvironmentalEffects/Background/example.html.
tomorow i test this code :p
Your Background is in an Inline node, and therefore not bound. You have to bind it per Script, or VisibilitySensor, or ProximitySensor, or you put the Background directly in the file you load.
The load order is as following:
You can directly load every file by using the src
attribute, then your Viewpoint, Background, NavigationInfo specified in test_monde.wrl
will be bound on load:
<X3DCanvas src="http://starenda.info/test_monde.wrl"></X3DCanvas>
Describe the bug
Background { skyColor [0 0 1,.9 .9 1] skyAngle 4.5 }
To Reproduce Steps to reproduce the behavior: in blaxxun contact :
in x_ite :
Desktop (please complete the following information):
how make a sky ? Thank :) Marco