Simple Apply Texture rule

4160
5
Jump to solution
02-03-2015 01:00 PM
ScottAulen2
New Contributor III

I'm looking for a simple rule to add textures to flat polygons, similar to the Apply Color rule found in the Essential Skills Training tutorials.  Any help?

Scott

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LR
by
Occasional Contributor III

Texture -->

  setupProjection(0, scope.xy, 1, 1) #not necessary for sides

  texture("images/bricks.jpg")

  projectUV(0)

View solution in original post

0 Kudos
5 Replies
LR
by
Occasional Contributor III

Texture -->

  setupProjection(0, scope.xy, 1, 1) #not necessary for sides

  texture("images/bricks.jpg")

  projectUV(0)

0 Kudos
by Anonymous User
Not applicable

If it is the start shape, then use scope.xz rather than scope.xy.

0 Kudos
ScottAulen2
New Contributor III

Thanks, Z R.  That worked perfectly.  Now what if I want to extrude the polygon slightly (say between 0-5 feet) but still have the textures?  It's fine if the texture is the same for the top and sides (in fact that would be preferred).

Scott

0 Kudos
LR
by
Occasional Contributor III

Here's how I do it.

Lot -->
  extrude(5)
  #comp(f){all: Texture} #this would texture everything;
  #the stuff below addresses every side on its own. side: also works, to address all sides.
  comp(f){
  left: rc |
  right: rc |
  top: Texture |
  bottom: rc |
  front: rc |
  back: rc
  }


Texture -->
  setupProjection(0, scope.xy, 1, 1)
  texture("images/bricks.jpg")
  projectUV(0)

rc --> color(rand,rand,rand) 
ScottAulen2
New Contributor III

This is correct as well.  Thanks again, Z R.

Scott

0 Kudos