14
$\begingroup$

I have a skyscraper building but I only want the glass in the texture to be glossy. How would I accomplish this?


Ok, I have done a test and here are the results.

Here is the original: enter image description here

here is an adjusted image enter image description here

$\endgroup$
6
$\begingroup$

You could use a specular map. It's a texture where the whiteness determins the amount and location of the shininess.

As a simple example, I created two simple textures - the regular texture and the specular texture. The specular have white where the windows are and black for the rest:

enter image description here

I then make a plane mesh in Blender for this demonstration, and apply a material to it. Also I add a Sun lamp with an angle so it's easy to see the specularity. In the textures properties, I add the diffuse and specular:

enter image description here

Note that I haven't touched the specular (Texture.001) properties yet, so the plane looks like it has completely flat shininess:

enter image description here

But if you go to the specular texture and under "Influence", deselect "Diffuse color" and select some or all of "Specular Color"/"Specular hardness"/"Specular intensity":

enter image description here

Then it looks like this:

enter image description here

$\endgroup$
  • $\begingroup$ Great answer. I'm trying both of these suggestions. I'll try this first. I will post my result when done. $\endgroup$ – yodamon Nov 24 '13 at 14:57
  • $\begingroup$ @LesTaylor okay - just rember this is a very basic example, I would add varying degree of greyscale to make in even less flat, add black to the window frames etc. Maybe even a normal map, too. $\endgroup$ – David S. Nov 24 '13 at 18:10
12
$\begingroup$

Cycles

You can use a mix node with a black and white texture as the Factor:

enter image description here

Result:

enter image description here

Blender Internal:

This can be done in blender internal by adjusting the influence map texture in Properties > Textures > Influence:

enter image description here

Note that you must have Mirror enabled in the material for the map texture to influence reflections.

Result:

enter image description here

Creating a mask:

So for a building texture you could make a mask texture for all the windows in an external image editor, or you could try making the image with blender:

  1. Add your texture as a background image:

  2. Add a plane and edit it to match the windows:

    enter image description here

  3. Add two Array modifiers to the plane (one for each axis):

    enter image description here

  4. Position the camera so it points straight at the window array (see this post), and set the camera to Orthographic in Object data > Lens:

    enter image description here

  5. Set the output resolution to the same as the texture and adjust the Orthographic scale of the camera in Object data > Lens until the array object and the texture line up:

    enter image description here

  6. Give the object a pure black material and set the world color to pure white.

  7. Render. (If you are using cycles, you may want to set the number of samples to 1, this will give a mask with only black and white.):

    enter image description here

  8. Save the image to a file (F3) You now have a mask image file you can use as an Image texture in a material.

Example material: (click for full size)

enter image description here

Notes:

  • You may want a little bit of diffuse reflection on the windows, so I added a Brightness Contrast node to make the black on the windows a dark gray, which will result in a mix of the glossy and diffuse shaders. You can think of this as each pixel in image containing a value between 0 (black) and 1 (white), which will set the Mix factor for that specific pixel.

  • You may also want some subtle displacement, as windows are rarely perfectly flat. I added a noise texture and multiplied it with the inverted map, so the noise texture is only on the windows. (the rest is white). This is then plugged into the Displacement socket.

Result:

Rendered building


Also see this tutorial on BlenderGuru.

$\endgroup$
  • $\begingroup$ Great answer. I'm trying both of these suggestions. I'll try this second. I like what you did with the nodes. I will post my result when done. $\endgroup$ – yodamon Nov 24 '13 at 14:58
3
$\begingroup$

You could also assign two materials to the object and assign them based on your vertex selection in edit mode. two-materials on one object

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.