DHJenkins

Corner Tile Textures and LOD OBJ tiles

Discussion created by DHJenkins on Aug 7, 2013
Latest reply on Aug 19, 2013 by MBuehler-esristaff
Hi everyone,

I have a simple question regarding my code. I am following a technical workshop from the 2012 User Conference and need some help.

I don't have any errors in my code but I would like the corner of my building to be textured differently then the original facade.

Also I added in the LOD attr to add in an obj window but when switching from Low to high my textures disapear.

Can anyone see the error in my coding/logic?



/**
 * File:    GenericOfficeBuilding.cga
 * Created: 7 Aug 2013 14:41:17 GMT
 * Author:  djenkins
 */

version "2012.1"

attr height = rand (15, 35)
attr lod    = "high"


Lot-->extrude(height) Mass

Mass-->comp(f) { top : Roof | side : Facade3}

Roof-->
 texture("roof/Concrete.png")
 setupProjection(0, scope.xy, -10, -10)
 projectUV(0)
 
Facade3-->case lod == "high": Facade2
    else : Facade
    
Facade2-->
 split(y) {-3 : Floor}*

 
Floor-->
 split(x) { 2 : Corner | {-3 : Tile } * | 2 : Corner }

Tile-->
 i("facade/tiles/win.single.05.sashwindow.obj")

Corner-->
 texture("facade/Brick_wall.png")
 setupProjection(0, scope.xy, -2, -2)
 projectUV(0) 

Facade-->
 texture("facade/Office_window.png")
 setupProjection(0, scope.xy, -3, -3)
 projectUV(0)




Thanks in advance!

Outcomes