1
\$\begingroup\$

So, I have started checking out UDK since yesterday, and most of it is clear and understandable.

I'm trying to create a curved road. The idea was to use a brush (Curved Staircase) and set the steps to 0 so it would be flat. This all worked well and I made a static mesh of it. Now, the problem arrives when I add a material. It doesn't rotate the material the way I want it.

Here's the way I do the example above:

  • Create a brush: Create a brush
  • Convert to Static Mesh
  • Add Static Mesh into the game: Add Static Mesh
  • Change material to "Asphalt"
  • Scale it a bit so you can notice the problem: Problem

As you can see, the stripes aren't following 'the mesh' correctly. They have to rotate 90 degrees for them to appear correctly.

How can you do this?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

To rotate the look of a material (this will apply to all instances of that material):

  1. Open the material in the Material Editor.
  2. Find the Texture Sample node you want to rotate.
  3. Create a Rotator node and leave the default values in.
  4. Connect the Rotator to the UVs of the Texture Sample.
  5. Create a Constant node.
  6. Connect the output of the Constant to the Time input of the Rotator.
  7. Play with the value of the Constant until you get the rotation you want.

To scale the above rotated material (again, for all instances):

  1. Insert a Texture Coordinates node.
  2. Connect its output to the Coordinate input of the Rotator you created above. If you don't have a rotator (perhaps you want to apply this to another, non-rotated material, later on), connect it directly to the UVs input of the Texture Sample.
  3. Adjust the parameters of the Texture Coordinates node. As a rule of thumb, values higher than 1 mean that the texture will repeat itself, while values lower than 1 mean the texture will appear partially.
\$\endgroup\$
6
  • \$\begingroup\$ I actually almost get it right with value 6.5 on Constant. Could you however still help me? It looks like this now: screencloud.net/v/y0dM \$\endgroup\$
    – user32228
    Jun 22, 2013 at 10:29
  • \$\begingroup\$ @user32228 It looks rotated to me now. Can you describe in more detail what you want it to look like? \$\endgroup\$
    – T. C.
    Jun 22, 2013 at 10:35
  • \$\begingroup\$ Like this: screencloud.net/v/hN7e (paint ftw). I want it to have 1 stripe instead of 3. \$\endgroup\$
    – user32228
    Jun 22, 2013 at 10:40
  • \$\begingroup\$ Never mind, I fixed it. I halfed down the width, so the stripes wouldn't repeat. Thank you very much for answering my rotation question. \$\endgroup\$
    – user32228
    Jun 22, 2013 at 10:49
  • \$\begingroup\$ @user32228 See my edit regarding scaling of the material. If this answer has covered your problem, please consider marking it as accepted. \$\endgroup\$
    – T. C.
    Jun 22, 2013 at 10:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .