Sloped curved textures

3873
2
Jump to solution
01-30-2015 01:54 PM
benleslie
New Contributor II

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?

slope_curve_roof.png

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

# 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

View solution in original post

2 Replies
by Anonymous User
Not applicable

# 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

benleslie
New Contributor II

Bingo.

Yep seems to work, thanks Chris.

0 Kudos