I'm trying to make this semi-circular block of houses and can't get the texture to work on the pitched roof.
As you'll see in the attached image the texture works on it's flat roofed brother using tileUV(0, 5, 5). So is it possible to make it work on the slanty roofs?
Solved! Go to Solution.
# Make this point at your roof textures folder.
attr slopedRoofTexture = fileRandom("assets/SlopedRoofs/*.jpg")
# Set scale to your preference:
attr scaleX = 1.123 # or whatever you need.
attr scaleY = 4.567 # or whatever you need.
# Send sloped roof shapes to this rule:
RoofTexture -->
alignScopeToGeometry(zUp, any, world.lowest) # This aligns to bottom of roof shape.
setupProjection(0, scope.xy, scaleX, scaleY) # UV layer 0, projecting to XY plane, using your scale X/Y.
projectUV(0) # Must do this after projection setup.
texture(slopedRoofTexture) # Apply chosen texture
# Let me know if this works,
# Chris
# Make this point at your roof textures folder.
attr slopedRoofTexture = fileRandom("assets/SlopedRoofs/*.jpg")
# Set scale to your preference:
attr scaleX = 1.123 # or whatever you need.
attr scaleY = 4.567 # or whatever you need.
# Send sloped roof shapes to this rule:
RoofTexture -->
alignScopeToGeometry(zUp, any, world.lowest) # This aligns to bottom of roof shape.
setupProjection(0, scope.xy, scaleX, scaleY) # UV layer 0, projecting to XY plane, using your scale X/Y.
projectUV(0) # Must do this after projection setup.
texture(slopedRoofTexture) # Apply chosen texture
# Let me know if this works,
# Chris
Bingo.
Yep seems to work, thanks Chris.