AnsweredAssumed Answered

Paris example: How can I get the front facade on all sides and back of a building?

Question asked by re_mei on Jun 8, 2017
Latest reply on Jun 12, 2017 by re_mei

Hi,

I am using the Paris example for an experiment. My blocks have offset subdivision, so there are inner yards (cour interieure) sometimes. The original paris.cga rule creates generic back facades and special facades if sides of buidlings touch each other ("shared wall"):

 

I need the building's side and back to be exactly the same as the front (green circle in nextscreenshot). I am aware that it's not "natural" if the side of a building has "entrance doors" and shops, but it's for the sake of the experiment.

 

In the code, I think this is done with the getGenMurAveugleTexture function.

Original code looks like this:

################
# Back Facades
################

 

BlindFacade -->
    30%:
        split(x){ 'rand(0.2,0.7) : BlindFacadeTextured | ~1: YardFacade }
    5%:
        split(x){ 'rand(0.1,0.4) : BlindFacadeTextured | ~1: YardFacade | 'rand(0.1,0.4) : BlindFacadeTextured }
    5%:
        split(x){ 'rand(0.1,0.4) : YardFacade | ~1: BlindFacadeTextured | 'rand(0.1,0.4) : YardFacade }
    else:
        YardFacade
        
BlindFacadeTextured -->
    alignScopeToAxes(y)
    setupProjection(0,scope.xy,16,scope.sy,16)
    projectUV(0)
    texture(getGenMurAveugleTexture)

 

BlindFacadeGF -->
    alignScopeToAxes(y)
    setupProjection(0,scope.xy,16,Groundfloor_Height*6,16)
    projectUV(0)
    texture("genMurAveugle1.png")
    BlindFacade.

 


YardFacade -->
    FacadeSets(0)

 


floorindex(textureOffset) =
    case textureOffset == 1 : split.index + textureOffset
    else : textureOffset

 


Floor(textureOffset) -->
    case !LOD_HIGH : Floor. # lores floor
    case comp.sel == "back": Floor. # lores floor on the back
    case textureOffset == 0: GroundFloor. # no hires for groundfloors
    else :     
        split(y){~Floor_Height : FloorDetails(floorindex(textureOffset))}* # split repeated mid floors again for High LOD

 

I changed the getGenMurAveugleTexture to gettexture, like this:

################
# Back Facades
################
// these are the facades that are on the back side of buildings (inner yards..)

 

BlindFacade -->
    30%:
        split(x){ 'rand(0.2,0.7) : BlindFacadeTextured | ~1: YardFacade }
    5%:
        split(x){ 'rand(0.1,0.4) : BlindFacadeTextured | ~1: YardFacade | 'rand(0.1,0.4) : BlindFacadeTextured }
    5%:
        split(x){ 'rand(0.1,0.4) : YardFacade | ~1: BlindFacadeTextured | 'rand(0.1,0.4) : YardFacade }
    else:
        YardFacade
        
BlindFacadeTextured -->
    alignScopeToAxes(y)
    setupProjection(0,scope.xy,16,scope.sy,16)
    projectUV(0)
    //texture(getGenMurAveugleTexture)
    texture(gettexture)

 

BlindFacadeGF -->
    alignScopeToAxes(y)
    setupProjection(0,scope.xy,16,Groundfloor_Height*6,16)
    projectUV(0)
    //texture("genMurAveugle1.png")
    texture(gettexture)
    BlindFacade.

 


YardFacade -->
    FacadeSets(0)

 


floorindex(textureOffset) =
    case textureOffset == 1 : split.index + textureOffset
    else : textureOffset

 


Floor(textureOffset) -->
    case !LOD_HIGH : Floor. # lores floor
    case comp.sel == "back": Floor. # lores floor on the back
    case textureOffset == 0: GroundFloor. # no hires for groundfloors
    else :     
        split(y){~Floor_Height : FloorDetails(floorindex(textureOffset))}* # split repeated mid floors again for High LOD

 

However, that has not resulted in what I need yet:

The ground floor is repeated (red circles), so there are doors on the second floor of side parts and back parts. How can I get the same structure / texture on all sides of my building? What am I missing? I did not find the

comp (f){front: ...
            |back : ...
            |side : ...
            }

part anywhere.

 

Outcomes