Community Place Version 1.1

VRML2.0 の仕様に基づく機能対応


履歴


制限事項

全般

  1. VRML1.0, VRML2.0の wrlファイル以外、例えばVRML Draft #2 のファイル、 SE(Sony Enhanced)-VRMLのファイルは正しく動作しないことがあります。

  2. JavaScript/VrmlScript はサポートしていません。

DEF / USE 構文

  1. DEF/USE文を使用した場合、DEFで定義したオブジェクトの属性は変更 できますが、USEで定義したものは変更することができません。

  2. Script に SFNode 型のフィールドを作りその値を USE で指定することは 出来ますが、MFNode 型のフィールドは使えません。

Browser.createVrmlFromString / Browser.createVrmlFromUrl

  1. VRML2.0仕様では1つの createVrmlFromString 中に複数のノードをかくこと ができると規定していますが、定義中のトップレベルノードが Transform, Shape の いずれかが1つの場合しかサポートしていません。ただし以下のようにトップノード を Transformにすれば、そのなかに複数のノードを含むことができます。つまり、 Interpolator 等を単独で作ることは出来ません。
        String vrmlString = "Transform{children[
                                 Shape{geometry Cone{}}
                                 Shape{geometry Box{}}
                                 ]}";
    

  2. createVrmlFromUrl のときも同様で、読み込む wrl ファイル中のトップレベ ルノードは Transform, Shape のいずれかが1つである必要があります。

グループノードの addChildren イベント

  1. Java の Browser.createVrmlFromString / createVrmlFromUrl メソッドに よって作った新規ノードの追加にのみ使用可能で、既存のノードを DEF/USE で共有 するために addChildren することは出来ない。

PROTO / EXTERNPROTO

  1. VRML2.0仕様では1つの PROTO / EXTERNPROTO の定義中に複数のノードをか くことができると規定していますが、定義中のトップレベルノードが Transform, Shape のいずれかが1つの場合しかサポートしていません。ただしトップノードを Transformにすれば、そのなかに複数のノードを含むことができます。つまり、 Interpolator 等を単独で作ることは出来ません。

  2. PROTO で定義したノードを Sony_BindSharedNode の transformNode とし て使うことは出来ません。

  3. Script で PROTO インスタンスへの参照を field SFNode foo USE PROTO_INST という構文で取ることは出来ません。PROTO インスタンスのフィールド 値をアクセスするためには通常の ROUTE を経由してください。以下に動く例、動か ない例を示します。

    #VRML V2.0 utf8 # これは ROUTE を使っているので動きます。 PROTO SampleProto [exposedField SFVec3f parameter 0 0 0] {.....} # PROTO インスタンスを作る DEF PROTO_INST SampleProto{} # ROUTE を使うことで、この Script は PROTO インスタンスのフィールドを書き換 # えることが出来ます。 DEF SCRIPT Script{ url "foo.class" eventOut SFVec3f writeParam } ROUTE SCRIPT.writeParam TO PROTO_INST.set_parameter
    #VRML V2.0 utf8 # これは USE によって参照を取ろうとしているので動きません。 PROTO SampleProto [exposedField SFVec3f parameter 0 0 0] {.....} # PROTO インスタンスを作る DEF PROTO_INST SampleProto{} # この Script は PROTO_INST のフィールドにアクセスしたいのですが... Script{ url "foo.class" field SFNode referenceToInstance USE PROTO_INST # 失敗します }

  4. PROTO のインスタンスを作り、ROUTE 構文によってそのフィールドを変更す るとき、そのフィールド値を実際に変更出来るかどうかは、PROTO の定義内部で IS を使って指されている実際のノードのフィールドが実行時に書換え可能かどうかに依 存します。詳しくは、後述の各ノードごとのフィールド値書き換えの実装状況をご覧 ください。

  5. PROTO のパラメータ宣言部分で SFNode, MFNode を使ったとき、インスタン スとしてそこに指定できるのは VRML2.0 の標準ノードだけであり、ソニー独自の拡 張ノードは使うことが出来ません。

VRML2.0 の各ノードへの対応

表の意味について

各欄は以下のような意味を持つ。 各記号は以下のような意味を持つ。

各ノードの実装状況

以下の表はVRML 2.0 Specification (Aug 4, 1996)で分類されている。

Anchor

func route read write
eventIn MFNode addChildren X X - X
eventIn MFNode removeChildren X X - X
exposedField MFNode children O X X X
exposedField SFString description O O O O
exposedField MFString parameter O O O O
exposedField MFString url * O O O
field SFVec3f bboxCenter * - - -
field SFVec3f bboxSize * - - -

注釈:
urlフィールドでは、"#ViewpointName"で記述される初期の視点は実装されていない。 視点を記述した場合、それは無視される。
bboxの位置/大きさは、Anchor内のオブジェクトから自動的に計算されるので、これら を設定することはできない。

Appearance

func route read write
exposedField SFNode material O X X X
exposedField SFNode texture O X X X
exposedField SFNode textureTransform O X X X

AudioClip

func route read write
exposedField SFString description O O O O
exposedField SFBool loop O O O O
exposedField SFFloat pitch O O O O
exposedField SFTime startTime O O O O
exposedField SFTime stopTime O O O O
exposedField MFString url O X X X
eventOut SFTime duraction_changed - X X -
eventOut SFBool isActive - O X -

Background

func route read write
eventIn SFBool set_bind - X - X
exposedField MFFloat groundAngle X O O O
exposedField MFFloat groundColor X O O O
exposedField MFString backUrl O O O O
exposedField MFString bottomUrl O O O O
exposedField MFString frontUrl O O O O
exposedField MFString leftUrl O O O O
exposedField MFString rightUrl O O O O
exposedField MFString topUrl O O O O
exposedField MFFloat skyAngle X O O O
exposedField MFFloat skyColor * O O O
eventOut SFBool isBound - X X -

注釈:
レンダリングエンジンの制約により、背景はskyColor[0]の値を用いて描画され、 skyColor[i] (i>0)、groundAngle、groundColor、skyAngleの値は無視される。

Billboard

func route read write
eventIn MFNode addChildren - X - X
eventIn MFNode removeChildren - X - X
exposedField SFVec3f axisOfRotation * O O O
exposedField MFNode children O X X X
field SFVec3f bboxCenter * - - -
field SFVec3f bboxSize * - - -

注釈:
axisOfRotation に指定した値に関係なく、(0, 0, 0) を指定したときと同じ挙動を する。
bboxの位置/大きさは、Billboard内のオブジェクトから自動的に計算されるので、 これらを設定することはできない。
本来は、children の中身全体をまとめて回転させるはずなのだが、children の中の 各 Shape ノード単位で Billboard に囲まれているのと同じ回転の仕方をする。

Box

func route read write
field SFVec3f size O - - -

Collision

func route read write
eventIn MFNode addChildren X X - X
eventIn MFNode removeChildren X X - X
exposedField MFNode children O X X X
exposedField SFBool collide O X X X
field SFVec3f bboxCenter X - - -
field SFVec3f bboxSize X - - -
field SFNode proxy O - - -
eventOut SFTime collideTime - X X -

Color

func route read write
exposedField MFColor color O O O O

ColorInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFColor keyValue O O O O
eventOut SFColor value_changed - O O -

Cone

func route read write
field SFFloat bottomRadius O - - -
field SFFloat height O - - -
field SFBool side O - - -
field SFBool bottom O - - -

Coordinate

func route read write
exposedField MFVec3f point O O O O

CoordinateInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFVec3f keyValue O O O O
eventOut MFVec3f value_changed - O O -

Cylinder

func route read write
field SFBool bottom O - - -
field SFFloat height O - - -
field SFFloat radius O - - -
field SFBool side O - - -
field SFBool top O - - -

CylinderSensor

未実装。

DirectionalLight

func route read write
exposedField SFFloat ambientIntensity X O O O
exposedField SFColor color O O O O
exposedField SFVec3f direction O O O O
exposedField SFFloat intensity O O O O
exposedField SFBool on O O O O

注釈:
レンダリングエンジンの制約により、ambientIntensityの機能は提供されていない。

ElevationGrid

func route read write
eventIn MFFloat set_height - O - O
exposedField SFNode color O X X X
exposedField SFNode normal O X X X
exposedField SFNode texCoord O X X X
field MFFloat height O - - -
field SFBool ccw O - - -
field SFBool colorPerVertex * - - -
field SFFloat creaseAngle * - - -
field SFBool normalPerVertex O - - -
field SFBool solid O - - -
field SFInt32 xDimension O - - -
field SFFloat xSpacing O - - -
field SFInt32 zDimension O - - -
field SFFloat zSpacing O - - -

Extrusion

func route read write
eventIn MFVec2f set_crossSection - X - X
eventIn MFRotation set_orientation - X - X
eventIn MFVec2f set_scale - X - X
eventIn MFVec3f set_spine - X - X
field SFBool beginCap O - - -
field SFBool ccw O - - -
field SFBool convex * - - -
field SFFloat creaseAngle X - - -
field MFVec2f crossSection O - - -
field SFBool endCap O - - -
field MFRotation orientation O - - -
field MFVec2f scale O - - -
field SFBool solid O - - -
field MFVec3f spine O - - -

注釈:
テクスチャマッピングはまだ実装されていない。 変数"convex"は評価されない。

Fog

func route read write
exposedField SFColor color * O O O
exposedField SFString fogType * O O O
exposedField SFFloat visibilityRange O O O O
eventIn SFBool set_bind - X - X
eventOut SFBool isBound - X X -

注釈:
PCがディスプレイモードが16ビットの場合、colorフィールドは自動的に(0,0,0)に 設定される。
'fogType'フィールドは無視され、 LINEAR blendingが想定される。
最後に定義されたFogのみが機能する。

FontStyle

func route read write
field SFString family O - - -
field SFBool horizontal X - - -
field MFString justify O - - -
field SFString language X - - -
field SFBool leftToRight O - - -
field SFFloat size O - - -
field SFFloat spacing O - - -
field SFString style O - - -
field SFBool topToBottom O - - -

注釈:
現在の実装では、マルチバイト文字には対応せず。

Group

func route read write
eventIn MFNode addChildren - X - X
eventIn MFNode removeChildren - X - X
exposedField MFNode children O X X X
field SFVec3f bboxCenter * - - -
field SFVec3f bboxSize * - - -

注釈:
bboxの位置/大きさは、Group内のオブジェクトから自動的に計算されるので、 これらを設定することはできない。

ImageTexture

func route read write
exposedField MFString url O O O O
field SFBool repeatS * - - -
field SFBool repeatT * - - -

注釈:
レンダリングエンジンの制約により、repeatS = repeastT = TRUEの場合のみ機能する。 テクスチャの繰り返し回数は32回以下に制限されている。 レンダリングエンジンの制約により、高さが幅の整数倍となっているImageTexture はMovieTextureとして扱われる。 また,ImageTextureの色はMaterialの色を反映しないが、Materialの色の総和として の明るさを反映する。

IndexedFaceSet

func route read write
eventIn MFInt32 set_colorIndex - X - X
eventIn MFInt32 set_coordIndex - X - X
eventIn MFInt32 set_normalIndex - X - X
eventIn MFInt32 set_texCoordIndex - X - X
exposedField SFNode color O * X *
exposedField SFNode coord O X X X
exposedField SFNode normal O X X X
exposedField SFNode texCoord O X X X
field SFBool ccw O - - -
field MFInt32 colorIndex O - - -
field SFBool colorPerVertex * - - -
field SFBool convex * - - -
field MFInt32 coordIndex O - - -
field SFFloat creaseAngle * - - -
field MFInt32 normalIndex O - - -
field SFBool normalPerVertex O - - -
field SFBool solid O - - -
field MFInt32 texCoordIndex O - - -

注釈:
Colorノードのcolorフィールドを変更することでフェースの色を変えることが可能。
colorPerVertexがTRUEであっても、頂点毎のcolorの設定は機能せず。 代わりに、フェース中の全ての頂点のcolorの平均値がフェースに与えられる。
変数"convex"は評価されない。
変数"normalPerVertex"は、以下のような効果を及ぼす。
normalPerVertexフィールドがTRUEの場合、スムーズシェーディングが用いられ、 normalVertexフィールドがFALSEの場合、フラットシェーディングが用いられる。 変数"creaseAngle"は、以下のような効果を及ぼす。
normalPerVertexフィールドがTRUEでnormalフィールドがNULLの場合、スムーズ シェーディングのための各頂点のノーマルベクトルが計算される。 creaseAngleの値は無視される。

IndexedLineSet

func route read write
eventIn MFInt32 set_colorIndex - X - X
eventIn MFInt32 set_coordIndex - X - X
exposedField SFNode color O * X *
exposedField SFNode coord O X X X
field MFInt32 colorIndex O - - -
field SFBool colorPerVertex * - - -
field MFInt32 coordIndex O - - -

注釈:
colorフィールドに記述されたColorノードのcolorフィールドを変更することで ラインの色を変えることが可能。
colorPerVertexフィールドがTRUEの場合、各線部品 (PiPj)は、その部品の2つの 頂点の色(Ci, Cj)のグラデーションで描かれるのではなく、初めの頂点色(Ci)で のみ描かれる。 レンダリングエンジンの制約により、画面に対して水平あるいは垂直な線は 描画されないことがある。

Inline

func route read write
exposedField MFString url * X X X
field SFVec3f bboxCenter * - - -
field SFVec3f bboxSize * - - -

注釈:
2つ以上のURLを設定した場合、最初の1つのみがロードされる。 worldを含む全てのファイルは、worldへの進入の最初のステージでロードされる。
bboxの位置/大きさは、Inline内のオブジェクトから自動的に計算されるので、これら を設定することはできない。

LOD

func route read write
exposedField MFNode level O X X X
field SFVec3f center O - - -
field MFFloat range O - - -

注釈:
level としては、Transform などのグルーピングノード、Shape、Sound のみを記述 できます。

Material

func route read write
exposedField SFFloat ambientIntensity * O O O
exposedField SFColor diffuseColor O O O O
exposedField SFColor emissiveColor O O O O
exposedField SFFloat shininess X O O O
exposedField SFColor specularColor * O O O
exposedField SFFloat transparency O O O O

注釈:
shininessの値は無視され、specularColorは、我々のレンダリングエンジンでは 式(0.32r + 0.57g + 0.11b)を用いてspecular係数に変換される。 レンダリングエンジンがambientIntensityの機能を実装していない為、 ambientIntensity(k)は、emissiveColor(k,k,k)に変換される。

MovieTexture

func route read write
exposedField SFBool loop O O O O
exposedField SFFloat speed O O O O
exposedField SFTime startTime O O O O
exposedField SFTime stopTime O O O O
exposedField MFString url O X X X
field SFBool repeatS X - - -
field SFBool repeatT X - - -
eventOut SFFloat duration_changed - X X -
eventOut SFBool isActive - X X -

NavigationInfo

func route read write
eventIn SFBool set_bind - X - X
exposedField MFFloat avatarSize X O O O
exposedField SFBool headlight O O O O
exposedField SFFloat speed O O O O
exposedField MFString type O O O O
exposedField SFFloat visibilityLimit O O O O
eventOut SFBool isBound - X X -

注釈:
visibilityLimitの値が0.0の場合、それは無限大を表す10000.0に変換される。

Normal

func route read write
exposedField MFVec3f vector O X X X

NormalInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFVec3f keyValue O O O O
eventOut MFVec3f value_changed - O O -

OrientationInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFRotation keyValue O O O O
eventOut SFRotation value_changed - O O -

PixelTexture

未実装。

PlaneSensor

func route read write
exposedField SFBool autoOffset * X X X
exposedField SFBool enabled * X X X
exposedField SFVec2f maxPosition * X X X
exposedField SFVec2f minPosition * X X X
exposedField SFVec3f offset * X X X
eventOut SFBool isActive - X X -
eventOut SFVec3f trackPoint_changed - X X -
eventOut SFVec3f translation_changed - O X -

Notes:
全てのフィールドはデフォルト値を設定されているとして機能する。

PointLight

func route read write
exposedField SFFloat ambientIntensity X O O O
exposedField SFVec3f attenuation X O O O
exposedField SFColor color O O O O
exposedField SFFloat intensity O O O O
exposedField SFVec3f location O O O O
exposedField SFBool on O O O O
exposedField SFFloat radius X O O O

注釈:
レンダリングエンジンの制約により、ambientIntensityは実装されていない。 レンダリングエンジンとVRML2.0の仕様の半径の意味の相違(*1)から来る混乱を避ける 為、radiusフィールドとattenuationフィールドは無視し、radiusは常に無限大と している。(減衰しない)
(*1)前者は半径位置から減衰し始めるのに対し、後者のそれは半径位置で0になる。

PointSet

func route read write
exposedField SFNode color * X X X
exposedField SFNode coord O X X X

注釈:
colorフィールドに記述されたColorノードのcolor[0]の値が用いられ、 それ以降の値は無視される。

PositionInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFVec3f keyValue O O O O
eventOut SFVec3f value_changed - O O -

ProximitySensor

func route read write
exposedField SFVec3f center O O O O
exposedField SFVec3f size O O O O
exposedField SFBool enabled O O O O
eventOut SFBool isActive - O O -
eventOut SFVec3f position_changed - O O -
eventOut SFRotation orientation_changed - O O -
eventOut SFTime enterTime - O O -
eventOut SFTime exitTime - O O -

ScalarInterpolator

func route read write
eventIn SFFloat set_fraction - O - O
exposedField MFFloat key O O O O
exposedField MFFloat keyValue O O O O
eventOut SFFloat value_changed - O O -

Script

func route read write
exposedField MFString url O X X X
field SFBool directOutput * - - -
field SFBool mustEvaluate * - - -

注釈:
現在の実装では、directOutputフィールドは常にTRUEを仮定している。 現在の実装では、mustEvaluateフィールドは常にTRUEを仮定している。

Shape

func route read write
exposedField SFNode appearance O X X X
exposedField SFNode geometry O X X X

Sound

func route read write
exposedField SFVec3f direction O O O O
exposedField SFFloat intensity O O O O
exposedField SFVec3f location O O O O
exposedField SFFloat maxBack O O O O
exposedField SFFloat maxFront O O O O
exposedField SFFloat minBack O O O O
exposedField SFFloat minFront O O O O
exposedField SFFloat priority O O O O
exposedField SFNode source O X X X
field SFBool spatialize O - - -

Sphere

func route read write
field SFFloat radius O - - -

SphereSensor

func route read write
exposedField SFBool autoOffset * X X X
exposedField SFBool enabled * X X X
exposedField SFRotation offset * X X X
eventOut SFBool isActive - X X -
eventOut SFRotation rotation_changed - O X -
eventOut SFVec3f trackPoint_changed - X X -

Notes:
全てのフィールドはデフォルト値を設定されているとして機能する。

SpotLight

func route read write
exposedField SFFloat ambientIntensity X O O O
exposedField SFVec3f attenuation X O O O
exposedField SFFloat beamWidth * O O O
exposedField SFColor color O O O O
exposedField SFFloat cutOffAngle X O O O
exposedField SFVec3f direction O O O O
exposedField SFFloat intensity O O O O
exposedField SFVec3f location O O O O
exposedField SFBool on O O O O
exposedField SFFloat radius X O O O

注釈:
レンダリングエンジンの制約により、ambientIntensityは実装されていない。 レンダリングエンジンとVRML2.0の仕様の半径の意味の相違(*1)から来る混乱を避ける 為、radiusフィールドとattenuationフィールドは無視し、radiusは常に無限大と している。(減衰しない)
beamWidthフィールドはレンダリングエンジン側でデフォルト値を設定されている。 (*1)前者は半径位置から減衰し始めるのに対し、後者のそれは半径位置で0になる。

Switch

func route read write
exposedField MFNode choice O X X X
exposedField SFInt32 whichChoice O O O O

注釈:
choice としては、Transform などのグルーピングノード、Shape、Sound のみを記述 できます。

Text

func route read write
exposedField MFString string O O O O
exposedField SFNode fontStyle * X X X
exposedField MFFloat length O X X X
exposedField SFFloat maxExtent O X X X

注釈:
現在の実装では、マルチバイト文字には対応せず。

TextureCoordinate

func route read write
exposedField MFVec2f point O X X X

TextureTransform

func route read write
exposedField SFVec2f center O O X X
exposedField SFFloat rotation O O X X
exposedField SFVec2f scale O O X X
exposedField SFVec2f translation O O X X

TimeSensor

func route read write
exposedField SFTime cycleInterval O O O O
exposedField SFBool enabled O O O O
exposedField SFBool loop O O O O
exposedField SFTime startTime O O O O
exposedField SFTime stopTime O O O O
eventOut SFTime cycleTime - O O -
eventOut SFFloat fraction_changed - O O -
eventOut SFBool isActive - O O -
eventOut SFTime time - O O -

TouchSensor

func route read write
exposedField SFBool enabled O O O O
eventOut SFVec3f hitNormal_changed - X X -
eventOut SFVec3f hitPoint_changed - X X -
eventOut SFVec2f hitTexCoord_changed - X X -
eventOut SFBool isActive - O O -
eventOut SFBool isOver - O O -
eventOut SFTime touchTime - O O -

Transform

func route read write
eventIn MFNode addChildren - * - X
eventIn MFNode removeChildren - X - X
exposedField SFVec3f center O O O O
exposedField MFNode children O X X X
exposedField SFRotation rotation O O O O
exposedField SFVec3f scale O O O O
exposedField SFRotation scaleOrientation O O O O
exposedField SFVec3f translation O O O O
field SFVec3f bboxCenter * - - -
field SFVec3f bboxSize * - - -

注釈:
bboxの位置/大きさは、Transform内のオブジェクトから自動的に計算されるので、これら を設定することはできない。
制限事項 で述べたように、addChildren は 制限付きで実装されている。

Viewpoint

func route read write
eventIn SFBool set_bind - O - O
exposedField SFFloat fieldOfView O O O O
exposedField SFBool jump O O O O
exposedField SFRotation orientation O O O O
exposedField SFVec3f position O O O O
field SFString description * - - -
eventOut SFTime bindTime - X X -
eventOut SFBool isBound - X X -

注釈:
"Go"メニューでViewpointの記述がリストされ、このうち1つを選択することで viewpoint をバインドすることができる。

VisibilitySensor

func route read write
exposedField SFVec3f center O O O O
exposedField SFBool enabled O O O O
exposedField SFVec3f size O O O O
eventOut SFTime enterTime - O O -
eventOut SFTime exitTime - O O -
eventOut SFBool isActive - O O -

WorldInfo

func route read write
field MFString info O - - -
field SFString title O - - -