STOP, before runing this notebook, make sure you can display the examples in the caveMathematica notebook in the CAVE/CUBE

This works, but it will be better to define your own SZGSphere and SZGCylinder instead of overriding the system Sphere and Cylinder

Unprotect[Sphere]
Unprotect[Cylinder]
Unprotect[Cuboid]

Sphere[{x_,y_,z_},rr_]:=ParametricPlot3D[{x+rr  Cos[theta]*Cos[rho],y+ rr Sin[theta]*Cos[rho],z+rr Sin[rho] },{rho,-Pi/2,Pi/2},{theta,0,2π},PlotPoints->12,MaxRecursion->0,Mesh->All,BoxRatios->Automatic][[1]]
Sphere[{{x_,y_,z_}},rr_]:=Sphere[{x,y,z},rr]
Sphere[p_List]:=Sphere[p,1.0]

Cylinder[{P_,Q_}, rr_]:=Module[{X,Y,V,W},
      X=P-Q; Y=If[Cross[X,{1,0,0}]≠{0,0,0}, {1,0,0}, {0,1,0}];   
     V=Cross[X,Y]; V=V/Norm[V];
     W=Cross[V,X]; W=W/Norm[W];
     ParametricPlot3D[rr V Cos[theta] + rr W Sin[theta] + P (1-h) + h Q ,
   {theta, 0, 2  π} , {h,0,1},PlotPoints->12,MaxRecursion->0,Mesh->All,BoxRatios->Automatic][[1]] ]

Define the geometry here, use Polygon, Sphere, Cylinder and Cuboid. DO NOT use Graphics3D[] here, just define a list of primitives.

tiger={Green,Cuboid[{5.5,3,-.2},{-5,-3,-2}],Orange,Cylinder[{{4,1,0},{2,1,0}},.8],Cylinder[{{4,-1,0},{2,-1,0}},.8],Sphere[{{4,-1,0}},.8],Sphere[{{4,1,0}},.8],Sphere[{{2,1,0}},.8],Sphere[{{2,-1,0}},.8],Sphere[{{3,0,1.7}},1.25],Sphere[{{4,0,1.2}},.8],Cylinder[{{2,0,0},{-2,0,0}},1.5],Sphere[{{2,0,0}},1.5],Sphere[{{-2,0,0}},1.5],Sphere[{{-2,-.6,0}},1.3],Sphere[{{-2,.6,0}},1.3],Cylinder[{{-2,-.8,0},{0,-.8,0}},1],Cylinder[{{-2,.8,0},{0,.8,0}},1],Sphere[{{0,-.9,0}},1],Sphere[{{0,.9,0}},1],Cylinder[{{-2,0,-1},{-4,0,1}},.4],Sphere[{{-4,0,1}},.4],Cylinder[{{-4,0,1},{-4,-1,2}},.4],Sphere[{{-4,-1,2}},.4],Cylinder[{{-4,-1,2},{-3,-2,2}},.4],Sphere[{{-3,-2,2}},.4],Cylinder[{{-3,-2,2},{-2,-2,1.5}},.4],Sphere[{{-2,-2,1.5}},.4],Black,Sphere[{{3.9,.4,2}},.3],Sphere[{{3.9,-.4,2}},.3],Red,Sphere[{{4.6,0,1.3}},.3],Orange,Polygon[{{3.4,1.2,3.2},{3.4,1,2},{3,.7,2.5}}],Polygon[{{3.4,1.2,3.2},{3,-.2,2.5},{3,.7,2.5}}],Polygon[{{3.4,-1.2,3.2},{3.4,-1,2},{3,-.7,2.5}}],Polygon[{{3.4,-1.2,3.2},{3,.2,2.5},{3,-.7,2.5}}],Black,Cylinder[{{1.5,.05,0},{1.4,.05,0}},1.5],Cylinder[{{1.1,-.05,0},{1,-.05,0}},1.5],Cylinder[{{.7,.05,0},{.6,.05,0}},1.5],Cylinder[{{.2,0,.15},{.1,0,.15}},1.4],Cylinder[{{-.4,0,.15},{-.5,0,.15}},1.4],Cylinder[{{-1,0,.15},{-1.1,0,.15}},1.4],Cylinder[{{-1.6,0,.15},{-1.7,0,.15}},1.4],Cylinder[{{-2.3,0,.15},{-2.4,0,.15}},1.34],Cylinder[{{-2.9,0,.15},{-3,0,.15}},1.1],Cylinder[{{4.05,-1.01,0},{4.05,-.99,0}},.75],Cylinder[{{4.05,1.01,0},{4.05,.99,0}},.75],Cylinder[{{4.1,1.41,0},{4.1,1.39,0}},.6],Cylinder[{{4.1,-1.41,0},{4.1,-1.39,0}},.6],Cylinder[{{4.1,.61,0},{4.1,.59,0}},.6],Cylinder[{{4.1,-.61,0},{4.1,-.59,0}},.6],Cylinder[{{3.9,1,.05},{4,1,.05}},.8],Cylinder[{{3.9,-1,.05},{4,-1,.05}},.8],Cylinder[{{3.2,-1.01,0},{3.3,-1.01,0}},.8],Cylinder[{{3.2,1.01,0},{3.3,1.01,0}},.8],Cylinder[{{2.5,-1.01,0},{2.6,-1.01,0}},.8],Cylinder[{{2.5,1.01,0},{2.6,1.01,0}},.8],Cylinder[{{1.9,-1.01,0},{2,-1.01,0}},.8],Cylinder[{{1.9,1.01,0},{2,1.01,0}},.8],Cylinder[{{-.7,-.82,0},{-.6,-.82,0}},1],Cylinder[{{-.7,.82,0},{-.6,.82,0}},1],Cylinder[{{-1.3,-.82,0},{-1.2,-.82,0}},1],Cylinder[{{-1.3,.82,0},{-1.2,.82,0}},1],Cylinder[{{-1.9,-.8,.1},{-1.8,-.8,.1}},1.1],Cylinder[{{-1.9,.8,.1},{-1.8,.8,.1}},1.1],Cylinder[{{-3.8,0,.8},{-4,0,1}},.41],Cylinder[{{-4,-1,2},{-4,-.9,1.9}},.41],Cylinder[{{-4,0,1},{-4,-.1,1.1}},.41],Cylinder[{{-4,-.55,1.55},{-4,-.45,1.45}},.41],Cylinder[{{-4,-1,2},{-4.1,-.9,2}},.41],Cylinder[{{-3,-2,2},{-3.1,-1.9,2}},.41],Cylinder[{{-3.55,-1.45,2},{-3.45,-1.55,2}},.41],Cylinder[{{-3,-2,2},{-3.1,-2,2.05}},.41],Cylinder[{{-2,-2,1.5},{-2.1,-2,1.55}},.41],Cylinder[{{-2.55,-2,1.775},{-2.45,-2,1.725}},.41]};

Test your model in Mathematica

Graphics3D[tiger,Boxed->False,ColorFunction:>MyColorFunction]

This is an undocumented functions in Mathematica used to convert polygons into GraphicsComplex, this is necessary for the cave polygon processing code. If this works, you should be ready to display your model in the CAVE!!

Graphics`Mesh`GeometryPlot3D[tiger]

If the previous command displayed your model, now you can use the RenderSZG[] displayfunction to show your 3 D model in the CAVE. If you were able to display the examples in the caveMathematica notebook before running this notebook, then this will display your model!

You need a ColorFunction, otherwhise you will get a Part[] error message and the model will be displayed all in white. For now we do not support flat colors, only VertexColors based which are generated with the ColorFunctions option.

MyColorFunction[x_,y_,z_]:=If[z<-.2,Green,Orange];

Graphics`Mesh`GeometryPlot3D[tiger,ColorFunction->MyColorFunction,DisplayFunction:>((RdnerSZG[#];#)&)]