Lighthouse3d.com

uW(.JUMLO-O)ͭKLSW(L)ɰU7TWHL(3RRl bJP< 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

Z6y ];CƼ.YN%s*[Tlש-Ϭ "AcBёd<)Hu)n4ݛ0cյ~\׷B [튂OX(<~X1C]Kl:/e}ݝ8y6K9fԏu{jS[@O4t<^UմGiׯiZ¹[_Dk- Wf8{PF{F/*T  b ,n[tfQҖñA$xs1 y̧w2B1o5WzN{Ubߦ(avώ\C I5x)&gA{lJċ&cd12h@S=\7K(sRQ`EF@IN ~Ur]mohV(ƷyRL }|dJ!lvKO܁d,^M ’&^z!K0lɆB0I0;crUuq)gYЁTh+Qb$m%鬩,80Ds m2cc=3ϜG㠍E3u8! (IӗOxzVng_(uNIA.D7Q@x'b U'[\?I^{͵у28R~L|qXwSEN#zs;hf=g"^yKϷ@QT.EH?`nVv m?s! U٤0j-BH?6^Y",Ry0C)sg,k;WWļgQ`]F-E_߿o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ܜZh^7%67sUJzn4X4S=jxmo=sJyR%munh^oS%~,UJ ^zIɿhD>}|}c"l!45d8_nZ"-`jl , ]\`]ŕpq'C q=>6i:>6dJ2n{wXg%|37p$1Tˋ͢ݸb-`'?8uA[٧Y\['{Hmr'w.a: RNh{蟊O9b]koFY~QD^8N>h],@ ņ"U{̐CR P$;CTʒlቀj(_?C^XE)]1EOS閶,gx#6&rLxSV'uOP.Djú[,JvlźC[Cihq$5krL?tLFIjɿIee%QG{t5l HHK= ؑ}N: !NO`%I\R$Crp']!Ȗ~| NW?ZWDZ?x 4M܏AʥsC&ܮiB[K 4c;JINڒ~:IMֈ ZЯUSj/ Ø;e/4KX蚫9-Q]msJҲ0Σ$ 'xL;65Vaao߼xs=~{^Q맷qh6$bϘ+\xd0թ֊yV L'^.Qʛ\Ǟ4-.m]j6[_$S?Ѫj/ ii+V$ka@*V9{.2C%Ur /+kDbajِפI/8~G~ RM(Ou$>/%ʪ[㠾/\DkJ\l۵6T 3Q] KZ+;=:n.LR $Z@CV,,Yx 6 Dͻ* x `q/7c=nUkqF` Ml ~w:U֏g=Pˑ.@4в'PBjhi/&ia93U%rhRf܈ +/v_{K߀1q-&C܂;5*:ED@a 9ARNY8#*N(VwB_^ƁI[$&dfmm.L: QFi/stcAs`NdRrR5@kb<q&H6T!(҅6nGϲhމ58ٌ5$}~l/S&UKYQ6J|~V/ cQ;2Y/uNcwyo../_\]o#u1| UڱW'v\Huy!|a Ne*)X|SSG͒Wy8[En d! _r¶UmՕ~jEN$BϓBB;4&;fy,8mXxy OǾEZ iiEl.s>|G .fOz'''fdz@d*ÇAڼ)]{O"z1]W ǿ~Mܼ(q[|;mQs6=mypwj8zvRijxsX2}9vi8Syx

PixelTexture Node


This node specifies the location of the image to be used for texturing the shape, as well as if the image is to be repeated vertically, or horizontally, along each of the faces of the shape.

Three fields are present in this node:
  • image which defines the image using pixels.
  • repeatS which specifies if the image is to be repeated vertically.
  • repeatT which specifies if the image is to be repeated horizontally.
  • The first three values of the image field define the width of the image (in pixels), the height of the image (in pixels), and the number of bytes used for each pixel. Possible values for the number of bytes are:
  • 1: Grayscale
  • 2: Grayscale with alpha channel for transparency
  • 3: RGB
  • 4: RGB with alpha channel for transparency
  • All fields are optional, the default values being applied if the field is not specified. Note: if you do not specify the image field, then no texturing takes place.

    Specifying an image pixel by pixel may seem like hard work, however some interesting effects can be achieved with little effort. For example see the following PixelTexture node:

    PixelTexture { image 2 1 1 0 255}

    Note that the color values for the PixelTexture node range from 0 to 255, as opposed to 0 to 1 as in the VRML color model used for all the other nodes.

    This node specifies an image with two pixels wide, 1 pixel tall, the first pixel is black, and the second is white. If this image is applied as a texture to a face then, because the image is scaled to fit the face, a gradient should be displayed starting from black on the left side and progressively turning to white as the right side is reached (note: some browsers do not yet implement this feature and instead will produce a two color image, the left half black and the right half white).

    This node can also be used to create patterns, although a pattern editor is probably the best option for this task.

    Syntax:
    PixelTexture {
    image 0 0 0
    repeatS TRUE
    repeatT TRUE
    }


    Note: for the example on the right the image will be repeated twice in each direction if the values for repeatS and repeatT are set ot TRUE. See the node TextureTransform to see how to set the repetition rate.