Billboards

(From SGI's SIGGRAPH '97 VRML Course)

#VRML V2.0 utf8

Transform {
  children	[
    DEF Info1 NavigationInfo {
      avatarSize	[ 0.25, 12, 5 ]
      speed	4
      type	[ "ANY",
	        "WALK" ]
    }
    WorldInfo {
      title	"Billboard with Texture"
      info	[ "Good for foliage and signs.  
	Excerpted from Tenochtitlan. Author: Delle Maxwell",
	        "Created in CosmoWorlds",
	        "Packaged by CosmoPackage",
	        "Created in CosmoWorlds",
	        "Packaged by CosmoPackage" ]
    }
    DEF Gradation Background {
      groundAngle	1.5708
      groundColor	[ 0.1 0.25 0.1,
	        0.1 0.25 0.1 ]
      skyAngle	[ 1.38, 1.5708 ]
      skyColor	[ 0 0 0,
	        0.025 0.025 0.5,
	        0.1 0.2 0.4,
	        0.25 0.3 0.4 ]
    }
    Group {
      children	[
	Transform {
	  children	DEF _0 Transform {
	    children	[
	      DEF TreePlanter Group {
		children	Transform {
		  children	[
		    Shape {
		      appearance	Appearance {
			material	Material {
			  ambientIntensity	0.0729167
			  diffuseColor	0.02438 0.2459 0.06569
			  specularColor	0.1122 0.1122 0.1122
			  emissiveColor	0.004976 0.05019 0.01341
			  shininess	0.2
			  transparency	0
			}

			texture	NULL

			textureTransform	NULL

		      }

		      geometry	IndexedFaceSet {
			coord	Coordinate {
			  point	[ 580 3 -335,
				    620 3 -335,
				    620 3 -425,
				    580 3 -425 ]
			}

			color	NULL

			coordIndex	[ 0, 2, 3, -1, 1, 2, 0, -1 ]
			normal	NULL

			texCoord	NULL

			convex	FALSE
			creaseAngle	0.5
		      }

		    }
		    Shape {
		      appearance	Appearance {
			material	Material {
			  ambientIntensity	0.134033
			  diffuseColor	0.5918 0.5209 0.3081
			  specularColor	0.04082 0.03592 0.02125
			  emissiveColor	0.102 0.08981 0.05312
			  shininess	0.2
			  transparency	0
			}

			texture	NULL

			textureTransform	NULL

		      }

		      geometry	IndexedFaceSet {
			coord	Coordinate {
			  point	[ 576.7 3 -331.7,
				    575 -0.00122 -330,
				    623.3 3 -331.7,
				    625 -0.00122 -330,
				    623.3 3 -428.3,
				    625 -0.001589 -430,
				    575 -0.001589 -430,
				    576.7 3 -428.3,
				    580 3 -425,
				    620 3 -425,
				    580 3 -335,
				    620 3 -335 ]
			}

			color	NULL

			coordIndex	[ 0, 11, 10, -1, 10, 7, 0, -1,
				  11, 0, 2, -1, 2, 9, 11, -1,
				  7, 10, 8, -1, 8, 4, 7, -1,
				  9, 2, 4, -1, 4, 8, 9, -1,
				  1, 0, 7, -1, 7, 6, 1, -1,
				  7, 4, 5, -1, 5, 6, 7, -1,
				  2, 3, 5, -1, 5, 4, 2, -1,
				  1, 3, 2, -1, 2, 0, 1, -1 ]
			normal	Normal {
			  vector	[ 0 0.5 0.866,
				    0 0.5 0.866,
				    0.866 0.5 -1.813e-06,
				    0.866 0.5 -1.848e-06,
				    0 0.5 -0.866,
				    0 0.5 -0.866,
				    -0.866 0.5 -1.848e-06,
				    -0.866 0.5 -1.813e-06,
				    0 1 -3.064e-06,
				    -5.614e-07 1 -3.626e-06,
				    0 1 -3.064e-06,
				    6.022e-07 1 -3.666e-06 ]
			}

			texCoord	NULL

			normalIndex	[ 8, 8, 8, -1, 9, 9, 9, -1,
				  10, 10, 10, -1, 11, 11, 11, -1,
				  11, 11, 11, -1, 10, 10, 10, -1,
				  9, 9, 9, -1, 8, 8, 8, -1,
				  7, 7, 7, -1, 6, 6, 6, -1,
				  5, 5, 5, -1, 4, 4, 4, -1,
				  3, 3, 3, -1, 2, 2, 2, -1,
				  1, 1, 1, -1, 0, 0, 0, -1 ]
			creaseAngle	0.5
		      }

		    }
		  ]
		}

	      }
	      Transform {
		children	Billboard {
		  children	DEF Tree Transform {
		    children	Group {
		      children	Shape {
			appearance	Appearance {
			  material	NULL

			  texture	ImageTexture {
			    url	"tree.gif"
			    repeatS	TRUE
			    repeatT	TRUE
			  }

			  textureTransform	TextureTransform {
			    translation	0 0
			    scale	1 1
			    center	0.5 0.5
			  }

			}

			geometry	IndexedFaceSet {
			  coord	Coordinate {
			    point	[ -1 -1 0,
				      1 -1 0,
				      1 1 0,
				      -1 1 0 ]
			  }

			  color	NULL

			  coordIndex	[ 3, 0, 1, -1, 3, 1, 2, -1 ]
			  normal	NULL

			  texCoord	TextureCoordinate {
			    point	[ 0 0,
				      1 0,
				      1 1,
				      0 1 ]
			  }

			  ccw	TRUE
			  solid	TRUE
			  creaseAngle	0.5
			}

		      }

		    }

		    translation	0 -1.65568e-09 0
		  }

		  axisOfRotation	0 1 0
		}

		translation	600.956 22.1162 -374.171
		rotation	0 0 1  0
		scale	18.5324 18.5323 18.5328
	      }
	    ]
	    translation	-600.956 0.0237727 380
	    rotation	0 0 1  0
	  }

	  translation	-74.78 4.07003 -172.7
	  rotation	0 0 1  0
	}
	DEF Ground Transform {
	  children	Shape {
	    appearance	Appearance {
	      material	Material {
		ambientIntensity	0
		diffuseColor	0 0 0
		specularColor	0 0 0
		emissiveColor	0.0979427 0.276596 0.0910096
		shininess	0.393939
		transparency	0
	      }

	      texture	NULL

	      textureTransform	NULL

	    }

	    geometry	IndexedFaceSet {
	      coord	Coordinate {
		point	[ -10 10 10,
			  10 10 10,
			  10 10 -10,
			  -10 10 -10 ]
	      }

	      color	NULL

	      coordIndex	[ 3, 0, 1, 2, -1 ]
	      colorIndex	[  ]
	      normal	NULL

	      texCoord	NULL

	      creaseAngle	0.5
	    }

	  }

	  translation	-0.000466997 -10 0.00104846
	  rotation	-3.98219e-06 1 -3.98216e-06  1.5708
	  scale	25 1 25
	  scaleOrientation	-4.7845e-06 1 1.67119e-06  1.5708
	}
	DEF VP1 Viewpoint {
	  position	-32.6405 8.70152 119.855
	  orientation	0.353359 0.881392 -0.313506  0.0900846
	  fieldOfView	0.785398
	  description	"viewpoint1"
	}
      ]
    }
  ]
}
DEF Light1 PointLight {
  location	-264.608 267.735 -143.698
}
Transform {
  children	USE _0

  translation	-74.7793 4.06819 -62.6679
  rotation	0 0 1  0
}
Transform {
  children	USE _0

  translation	-74.78 4.07003 51
  rotation	0 0 1  0
}
Transform {
  children	USE _0

  translation	5 4.07003 -172.7
  rotation	0 0 1  0
}
Transform {
  children	USE _0

  translation	5 4.07003 -62.67
  rotation	0 0 1  0
}
Transform {
  children	USE _0

  translation	5 4.07003 51
  rotation	0 0 1  0
}


mrl