Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

ZF~ 4 Xy,ox³rXRlL{E@\O66 MjbFB^WYݛ0KիkU¯ok 3=ӱHC{Qx 08K8|>\bI}(-$qҙlcFX'&1E,DCsUu˺^ͺuu%,|Ϳ6k$Z[o1XUz5y}ݫDg%4?Ou|{Q,^8(usZߛY%p`"m-\ Iԧw2Be#?j̯}"Y*xv2%H6H ? Pb3/Nهg3U0 h'fz.#1!tӱҧT $'_*H-I@Ƿ,Dir+ƷyR\ƌ>zt> bJI?yt%ҧ_ @4^C ’&^zaʼ0lɆB0I0;cru qijQЁ6Wܲ4!yx$&Ƴ4ć)BЦ Bv:yu3AO) IJ5BCR#$/x:*7E#JS :]& (d[삡jT>{J7?O h}44Ma,, IGb-t#9nv4Ck=g"nyKϷ@Ql*"&!zg*|HgU!f^#e,qﮅ S>) )B.yJ(/ "%Qh=.)[gxdq ɐ*@Jx(t. e}Jj@i_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^Kmmm57E-9",7&M @xbZ@TQgY:I!N5MAl]ҰRʇOYN F^эABzB鞈izl7NyD*Md2<o^!Pߠ‹ ~ace)xPptX1ز< ?O$ogo!YUe]/⪰"F?ԊhqM Q0=, .:6}7sY5K'(uO68?+=YjLLeBsգ7 {`>}ɞ,] DM?Js$钏{ͦz2W~"ܾ>߾m^mű *)ny̿gxZ0XeSˆ#˜-Beu}=OZ; - {8ͽ=mRNThb+W:7NADYؑQg Ia#AyzyX{LÝzCAVz i&-f v43VLuӘkr ͽ {Ѥb94g5UpP3s;[ޔ=_ obDWtۧ4Ss<*}{~/tztTA{/ppʩ겜j%E|xbVO{Sn@(;yLfM'2 PJ%I}U;+`kFVz0:pyH,ŚNe\PWFvWfFS`ON'L.Ŵjzi?.uYe-u/>v^Q"/ K׮ Lg d~"GDtqF)]][\@1*T*Zr0+Uz{%Tѹ916ݏ5OSPe40Lz0O5I5f'C۪GE/e/Lc@)H3 t ):oMb%/f=.Z2y#Eʹjuղ&IJiB~F~RM(MmI} %GcU͕Ko3E_qZT^ɪa Z+:>n|E 8\d@Cϙ>\6 DW h. `QʟZc=E븂+@Ml@4U7HݮTY#]h]e>jӗ!L T0':HXf*QCM5ޚ[vRW`IT`IA G|C@Q۰@C B1#,y!Ld+0=_<2IKK|},/RdNEE|Q(9}{r}rhu~yěqc,mn-yvԓ3\Pl}fj_ 7ܢ{* u#VIn>p!TC #-BȲ OhOK+l0cU+&ܺq]v_ݾO_nc/PVdl>꓎ux[js}Ҙ7QFSU]O ^>}7)*
PointLight Node

If you're new to lighting in VRML, there is a Lighting section in this tutorial which discusses general features of lighting in VRML. In here only the aspects which are particular to Point Lights are discussed.

Point Lights define a light source in a specified location. The light rays from this type of lights go in all directions. This implies that, as opposed to Directional Lights, Point Lights have a location but not a direction field. The following figure attempts to define a Point Light graphically (the point where the light rays start is the light location.

This light lits all nodes regardless of their position in the file, i.e. this light is not scoped. There is however a way of limiting the volume which is lit by this light, one can specify a radius which defines the maximum distance that the light rays can travel. Objects which are further away from the light source than the radius are not lit by the light source.

There is still another way to control the attenuation within the sphere defined by the radius. Using the attenuation field one can specify how the light grows dimmer with distance, within the sphere defined by the radius.

The following fields are present in this node:
  • on specifies if the light is active. This is a boolean field.
  • intensity has values between 0.0 and 1.0. Higher values specify stronger lights.
  • ambientIntensity specifies how much this light contributes to the overall lighting .Values must be between 0.0 and 1.0
  • color is a RGB field to specify the color of the light..
  • location which specifies a vector in 3D defining the coordinates of the light in your world.
  • attenuation is a 3D vector that specifies how the light looses its intensity as distance from the light source increases. All vector values must be greater than or equal to zero
  • radius specifies the maximum distance for the light rays to travel. Must be greater than or equal to zero.


  • Syntax:
    PointLight {
    on TRUE
    intensity 1
    ambientIntensity 0
    color 1 1 1
    location 0 0 0
    attenuation 1 0 0
    radius 100
    }


    Note: On the VRML world presented as example the sphere is placed at -2.5 0 0, the cone is placed at the origin, and the cylinder is placed at 2.5 0 0. If you're not familiar with placing shapes other than at the origin see the Transform node.